en ru
SF.net Project Page Download Forums


Section: Maintenance Commands (8)
Updated: 19 Jan 2008


anyconvertfs - converts filesystem.  


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         


--tmpdir directory
Directory for temporary files (by default "/tmp")
--blocksize blocksize
Blocksize for new filesystem. By default -- 4096.
It needs for converting on image, not block device.
Dry run. Prints converting parameters, do nothing else.
--inodetable inodetable
Inode table. It is necessary if you have existing inode table for converting from anyfs.
Enable color highlight (by default if output to terminal).
Disable color highlight (by default if output to pipe or file).
--label label
New filesystem label. By default the script would try to save the old filesystem label.
Debug mode. Prints the general convert commands with its options (build_it, reblock, build_xfs, build_e2fs)
Removes inode table NEVER. By default it removes inode table in case if convertion process was break on step before first step which destroy the old filesystem.
Removes inode table if the last convertion step was success. By default it removes inode table in case if converting process was break on step before first step which destroy the old filesystem.
Don't stop. By default the script suggests attentively check converting parameters before starting and waits for "Enter" pressing. The option talks to the script: "I sure".
--pause seconds
Seconds of pause before destroying the old filesystem. By default the script give you chance till 7 second to press Ctrl+C for saving old filesystem.
Use anyfs kernel module as anyfs driver (by default if its found)
Use anyfuse FUSE module as anyfs driver (by default if anyfs kernel module not found)
The end of not necessarily options.
Device (or image) for FS converting.
Source filesystem. By default the script would try mount the device without option -t to know source filesystem, or will know filesystem from `mount`, if the device was mounted already. But ntfs-3g in any case you need to specify as source filesystem, so as the script will see it as fuse or fuseblk filesystem.
Destination filesystem. At the moment supported ext2/ext3/xfs/any. If specified anyfs destination filesystem, the script creates inode table and may be reblock it. The really filesystem would not create on the device in this case.



In comparison with other closed-source utilities anyconvertfs has the next advantages:

+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.



Base development plans of the utility is destination filesystems list expansion.

Most likely the next will JFS building.



For converting /dev/hda1 to xfs print
# anyconvertfs /dev/hda1 xfs

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



Nikolaj Krivchenkov aka unDEFER <undefer@gmail.com>



Messages about any problem with using anyfs-tools package send to undefer@gmail.com



You can obtain the last version of package at http://anyfs-tools.sourceforge.net



anyfs-tools(8), build_it(8), reblock(8), build_e2fs(8), build_xfs(8), anyfs(8), anyfuse(8)




This document was created by man2html (from man 1.5o1), using the manual pages.
Time: 21:52:21 GMT, August 16, 2008
SourceForge.net Logo Valid HTML 4.0 Transitional