anyconvertfs [--tmpdir directory] [--blocksize blocksize] [-f] [--dry] [--inodetable inodetable] [--color|--no-color] [--label label] [--debug] [--dont-delete-it] [--success-delete-it] [--dontstop] [--pause seconds] [--use-anyfs|--use-anyfuse] [--] device [source_fs] destination_fs
The script will try to do all that possible, so you not need to read this (and other) manuals to the end.
So I talks to you how to run it:
$ anyconvertfs /dev/hda1 xfs
Where /dev/hda1 -- your device, xfs -- destination filesystem for the device. It's all. The remaining script will talks self. You may not read more, if it's not interesting for you.
anyconvertfs converts device filesystem by 5 steps, moreover 2 of its in the most cases would skipped. Describe its steps sequentially.
Step 1. Building inode table (with build_it).
The step may be skipped, if you convert from anyfs using existing
inode table only.
Step 1a. Rescue (copy) files not aligned with block boundaries.
This step executed only with converting from
ntfs-3g
for copy compressed/crypted at filesystem level files.
Step 2. Noops (check if enough space) reblock anyfs (with reblock).
The step would executed if new FS blocksize not equals old FS blocksize.
reblock
may return message "Not Enough Space". In this case script
would suggest to clear some space for new filesystem.
Step 3. Reblock anyfs (with reblock).
The step also would executed only its necessary. If new blocksize
more than old one, the step is first one, when the old filesystem
may be destroyed, and the script would warning about it and
suggest to press Ctrl+C, if you change your mind.
Step 4. Noops (check if enough space) build new filesystem
(with build_e2fs/build_xfs).
The step may be skipped if you convert to anyfs (it needs only in external
inode table). At this stage the build_FS utility may return message
"Not enough space", and the script would suggest to clear some space
in this case.
Step 5. Build new filesystem (with build_e2fs/build_xfs).
The step is stage at which old filesystem would destroyed for certain,
because (if its didn't destroyed at the fifth step), the script
may suggest to press Ctrl+C, if you change your mind.
anyconvertfs don't demand unmount the filesystem -- it mounts the filesystem anyway. If FS already was mounted, it uses it, and gets mounting option with `mount`.
Step 5a. Move rescued files to new filesystem.
The step also as 1a executedonly with converting
from
ntfs-3g.
anyconvertfs doesn't demand to unmount filesystem so as it will mount it self, so if filesystem was mounted it will know mount options (exception in case convertion from ntfs-3g).
Also, if filesystem already was mounted, anyconvertfs
would mount the new filesystem at the same mount point
+1. Open source. You know what it makes for sure.
+2. You know what to do, if anything goes not the way. In any case when you apply anyfs-tools there is external inode table file. So with anyfs driver you can read files even if fiesystem was damaged. And also there is anysurrect.
+3. Converting from ISO9660 :-). Indeed it is rather side effect, but anyconvertfs would not think for along time if you give to it ISO-image as source filesystem.
Disadvantages in comparison with other closed-source utilities:
-1. While short list of destination filesystems.
-2. Maybe speed. So as there is one method for all conversions, we cannot to use some similars in filesystems structures.
Advantages in comparison with open-source convertfs (http://tzukanov.narod.ru/convertfs/):
+1. More long source filesystems. convertfs in spite of the cool idea has one essential disadvantage: source filesystem driver cannot be read-only, it must be read-write(!), what is more it must support sparse-files. So convertfs cannot convert for example from vfat.
+2. Speed. In comparison with convertfs anyconvertfs must be more quickly (in times), so as it's not need in copying all filesystem tree.
+3. Documentation. convertfs documentation leaves much to be desired.
Besides I conduct one simple test (converting 607 Mb image), and discover that convertfs damaged two files. I e-mail bug-report to convertfs author, but he doesn't reply.
Disadvantages in comparison open-source convertfs:
-1. While short list of destination filesystems.
-2. convertfs is very compact!
?3. anyfs-tools idea more simple and obvious.
Advantages in comparison with always available cp && mkfs && cp:
+1. Size of extra using space. User rarely have space to simply copy all files from partition..
+2. Speed. cp && mkfs && cp -- is more slow than even convertfs -- double full copying!
Disadvantages in comparison with always available cp && mkfs && cp:
-1. While short list of destination filesystems.
-2. cp && mkfs && cp doesn't demand filesystem ioctl FIBMAP support. Enough to have read possibility!
-3. cp && mkfs && cp safety is infinite.. If only not damaged intermediate disk.
Most likely the next will JFS building.
For converting /path/image image to ext3fs:
# anyconvertfs -f /path/image ext3
Converting /dev/sda1 to ext2fs with 2048 blocksize:
# anyconvertfs --blocksize 2048 /dev/sda1 ext2
Converting /dev/hdb2 to xfs with "White label" label:
# anyconvertfs --label "White label" /dev/hdb2 xfs
anyfs-tools(8), build_it(8), reblock(8), build_e2fs(8), build_xfs(8), anyfs(8), anyfuse(8)