-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How to revert half-performed conversion? #33
Comments
The commands are correct, but it seems that |
Thanks for your response. The filesystem is XFS. I tried to use fstransform command to convert XFS into EXT4, but the /dev/loop0 stored as EXT4 is empty, and the original data converted as loop-file with XFS filesystem. |
Update: there is a mismatch in the paths you're using. You mount At least one of the paths you are using is wrong. |
Let me clarify what I want to do. I want to remap the loop-file into original files. According to the instruction in the webpage, I thought I need an empty disk to store the original files. "/dev/loop0" is an empty disk mounted in "/tmp/weiwei2". The data is in "centos_arya-home" disk mounted in "/tmp/fstransform.mount.23404/.fstranform.loop.26458" directory. Please correct me if I misunderstood the fsremap command. If I'm wrong, do you know how to convert the loop-file back to the original files. Thanks a lot for your help. |
Now it's clearer, thanks. You want to undo the half-executed conversion, not to finish it. If your target disk there is no need to use Then a regular sudo -s
mkdir /tmp/loop-src
mount -o ro /tmp/fstransform.mount.23404/.fstranform.loop.26458 /tmp/loop-src
cp -av /tmp/loop-src/. /tmp/weiwei2 |
It depends, there are a lot of files and mountpoints involved. [Update] what you say "do the instruction again for the two loop files" is needed only if you took the half-converted disk and attempted to convert it again. |
Then yes: do the instruction again for the two loop files. This is because the conversion was attempted again (at least two times) on a half converted disk. You need to undo all the nesting (russian doll style) created by the multiple conversion attempts. In othe words, after you have extracted the content of those two |
I have one more question. When I do "cp -av /tmp/loop-src/. /tmp/weiwei2", should the disk mounted in "tmp/weiwei2" be empty. Or can I create a directory and copy the content in /tmp/loop-src into it? Thanks for your help! |
No, there is no need for the destination disk of The only caveat is: be careful not to run out of space in the destination disk ( |
Some of the $ file .fstransform.loop.22262
.fstransform.loop.22262: data If instead it contains a mountable file system, it will be detected: $ file .fstransform.loop.22263
.fstransform.loop.22263: Linux rev 1.0 ext4 filesystem data, UUID=36f7e75a-0b26-4076-8dc6-cc31ffaf7184 (extents) (64bit) (large files) (huge files) |
You can run a filesystem check, to detect and (where possible) fix errors: sudo e2fsck /data/loop-src/.fstransform.loop.2262 To fix errors, the file must be inside a writeable file-system (not read-only). |
If |
Hi,
I tried to use fsremap to convert the loop file into the device, but I got the error showing in the following screenshot. Any idea about how to solve it. Thanks!
The text was updated successfully, but these errors were encountered: