5

Is there a tool to convert a reiserfs partition to ext3?

5 Answers 5

6

Since it's recommended anyway to have backups before filesystem conversions, you'd better copy everything (do not forget file permissions) somewhere, create an ext3 filesystem on that partition, then copy everything back.

3

Converting between filesystems is generally not possible. If you have space constraints your best bet is to

  • either get an external storage to migrate
  • use squashfs if you have just enough storage for a compressed image available
1

I very much doubt you will find a tool that will perform such a complex operation in-place.

You will need to create the new filssystem on another drive and sync the content over with something like rsync -aH /oldfs/ /newfs/. If you know there are no hard-links on the filesystem you can speed this up by removing the "H" option from the rsync command. If you use ACLs or other extended properties then you need to add the "A" and "X" options as appropriate (adding the H A and X options will not do any harm if they are not needed other than to make the sync take longer as extra checks are done and mean rsync will take much more memory during the operation with the H option).

The other option would be just to restore from backups onto the new filesystem.

1

This blog post explains the necessary steps: Convert Filesystem from reiserFS to ext3 and the command sequence you'll have to execute:

Conversion Plan:

  • Create an ext3 clone of my existing reiserFS /home partition on an unused 30GB partition using star.
  • Use this new /home with my current SUSE 10 configuration to be sure the transfer is correct before erasing the data from the reiserFS /home partition. In particular, I want to verify that the symbolic and hard links have been transferred correctly.
  • Reformat the old reiserFS 80GB partition to ext3, then run star a second time to move the /home filesystem back onto the 80GB partition.

This procedure requires a spare disk or disk partition, whereas doing a backup & restore to a file only requires enough free space on an existing partition to hold the backup file. But on the plus side, I never destroy my correctly functioning partition until I’ve fully tested the new one. If something goes wrong, I just fall back to previous step and try again.

1

Have a look at http://tzukanov.narod.ru/convertfs/

Using this tool you can convert any filesystem to any other filesystem in-place as long as the source filesystem supports sparse files.

It works flawlessly but I found it to be much slower than copying the whole fs to another place, re-create the filesystem of the wanted type and then copy everything back.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .