e2image reports invalid argument when used with big partitions
Bug #2063369 reported by
Jaromír Cápík
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
e2fsprogs (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
It seems e2image is unable to work correctly with large filesystems. I get the following error with etx4 on top of 48TB RAID5 array.
# e2image -pr /dev/md3 md3.e2i
e2image 1.46.5 (30-Dec-2021)
Scanning inodes...
Copying 802818 / 1547571 blocks (52%) 00:02:21 remaining at 20.50 MB/sseek_relative: Invalid argument
To post a comment you must log in.
If the file system has a limit on the size of the file (for example, ext4 has a maximum file size of 16TB), then when you do a relative seek via llseek(fd, offset, SEEK_CURR), the system call will return EINVAL. This is what is causing the error.
If you want to create a raw image of a very large file system, you'll either to write it to a block device which is sufficiently large, or you'll have to make sure the destination file system can support a file size of that particular length. (And, of course, has sufficient free space to hold the raw image in the first place.)
Another workaround is to compress the file, e.g., "e2image -pr /dev/md3 - | gzip > md3.e2i.gz"