cosmos72 / fstransform

tool for in-place filesystem conversion (for example from jfs/xfs/reiser to ext2/ext3/ext4) without backup
GNU General Public License v2.0
275 stars 29 forks source link

ext4 to xfs final fsck failed #19

Open rkhadro opened 6 years ago

rkhadro commented 6 years ago

Hi,

I try to transform a logical volume (lvm) from ext4 to xfs. ./fstransform /dev/mapper/data--elastic-lvdata xfs

All goes smoothly except: The last fsck didn't pass because it's invoking fsck.ext4 instead of fsck.xfs But the volume is in good condition when i run xfs_repair

12:40:07 fstransform: running again '/sbin/fsck' (disk check) on device '/dev/mapper/data--elastic-lvdata' 12:40:07 fsck: fsck from util-linux 2.27.1 12:40:07 fsck: fsck.ext4: Bad magic number in super-block while trying to open /dev/mapper/data--elastic-lvdata 12:40:07 fsck: /dev/mapper/data--elastic-lvdata: 12:40:07 fsck: The superblock could not be read or does not describe a valid ext2/ext3/ext4 12:40:07 fsck: filesystem. If the device is valid and it really contains an ext2/ext3/ext4 12:40:07 fsck: filesystem (and not swap or ufs or something else), then the superblock 12:40:07 fsck: is corrupt, and you might try running e2fsck with an alternate superblock: 12:40:07 fsck: e2fsck -b 8193 12:40:07 fsck: or 12:40:07 fsck: e2fsck -b 32768 12:40:07 fsck:

12:40:07 ERROR! fstransform: command '/sbin/fsck -p -f /dev/mapper/data--elastic-lvdata' failed (exit status 8) this is potentially a problem. you can either quit now by pressing ENTER or CTRL+C,

            or, if you know what went wrong, you can fix it yourself,
            then manually run the command '/sbin/fsck -p -f /dev/mapper/data--elastic-lvdata'
            (or something equivalent)
            and finally resume this script by typing CONTINUE and pressing ENTER: packet_write_wait: Connection to 10.181.80.107 port 22: Broken pipe
cosmos72 commented 6 years ago

Hi,

so the filesystem is successfully converted from ext4 to xfs - it's just that fsck got confused and launched fsck.ext2 instead of xfs_repair ?

Thanks for the report, and good to know the conversion was successful.

I will override fstransform heuristic and directly execute xfs_repair on xfs instead of the generic fsck.

By the way, which version of fstransform are you using?

rkhadro commented 6 years ago

Hi,

Yes the conversion went well. I cloned it from this repo yesterday.

aurelio1 commented 5 years ago

I did a conversion from reiserfs to xfs (version 0.9.3. retrieved from OpenSuSE repository) and got the same problem. The final fsck tried to check a reiserfs filesystem (instead of xfs). A (manual) test with xfs_repair showed that the xfs conversion had been done without any problem.

cosmos72 commented 5 years ago

Thanks, I will investigate it :)