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

Error unmounting before disk check - how to proceed? #48

Open zomk3 opened 2 years ago

zomk3 commented 2 years ago

I am running fstransform to convert a XFS LVM group to EXT4 (in order to shrink it later) I was running fstransform with nohup, cause I run it on a headless server. When the error occurred the process got abwartet and I could not enter the CONTINUE, as it was not interactive.

During the run the following error occurred:

2022-09-05 18:42:25 fsmove: progress: 99.2% done,  18.4 gigabytes still to move, estimated 15 minutes left
2022-09-05 18:45:04 fsmove: using backward copy and truncate for file `/tmp/fstransform.loop.11454/.fstransform.loop.9759': less than 8.19 terabytes free space left
2022-09-06 00:05:41 fsmove: using backward copy and truncate for file `/tmp/fstransform.loop.11454/.fstransform.loop.11249': less than 8.19 terabytes free space left
2022-09-06 05:31:44 fsmove: skipped `/srv/single/.fstransform.loop.11454', matches exclude list
2022-09-06 05:31:44 fsmove: job completed.
2022-09-06 05:31:44 fstransform: unmounting and running '/usr/sbin/fsck' (disk check) on loop file '/srv/single/.fstransform.loop.11454'
2022-09-06 05:31:45 fsck: fsck from util-linux 2.37.2
2022-09-06 05:31:53 fsck: /dev/loop19: Inode 78578626 extent tree (at level 1) could be shorter.  IGNORED.
2022-09-06 05:32:02 fsck: /dev/loop19: Inode 197985782 extent tree (at level 1) could be shorter.  IGNORED.
2022-09-06 05:32:02 fsck: /dev/loop19: Inode 197987857 extent tree (at level 1) could be shorter.  IGNORED.
2022-09-06 05:32:02 fsck: /dev/loop19: Inode 198050450 extent tree (at level 1) could be shorter.  IGNORED.
2022-09-06 05:32:02 fsck: /dev/loop19: Inode 198050740 extent tree (at level 1) could be shorter.  IGNORED.
2022-09-06 05:32:26 fsck: /dev/loop19: 196609/274714624 files (11.9% non-contiguous), 592666591/2197694464 blocks
2022-09-06 05:32:26 fstransform: disconnected loop device '/dev/loop19' from file '/srv/single/.fstransform.loop.11454'
2022-09-06 05:32:26 fstransform: unmounting device '/dev/mapper/groupCD-unmirrored' before disk check
2022-09-06 05:32:26 umount: /srv/single: target is busy.
2022-09-06 05:32:26 ERROR! fstransform: command '/usr/bin/umount /dev/mapper/groupCD-unmirrored' failed (exit status 32)
                          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 '/usr/bin/umount /dev/mapper/groupCD-unmirrored'
                          (or something equivalent)
                          and finally resume this script by typing CONTINUE and pressing ENTER:
2022-09-06 05:32:26 fstransform: exiting.

I can manually unmount the partition and run xfs_repair without error. The file /srv/single/.fstransform.loop.11454 is there and also fsck.ext4 it without error. Can I continue/restart the process or do I need to restart and run for another 30 hours?

cosmos72 commented 2 years ago

Hi @zomk3, From your logs, the first half of the conversion (fsmove) completed successfully, and only the second half (fsremap) still needs to run. You can continue the process, and you "just" need to execute fsremap manually. It will probably take another ~30 hours.

If /dev/mapper/groupCD-unmirrored is still mounted on /srv/single and it contains the only the file .fstransform.loop.11454, the procedure is (as root):

mount -o remount,ro /dev/mapper/groupCD-unmirrored

fsremap -v /dev/mapper/groupCD-unmirrored /srv/single/.fstransform.loop.11454

Remember to run fsck again after fsremap finishes successfully (do NOT run fsck in case fsremap exits with some error - post them here instead)