My first experience with reiserfs

At home, I have an old pentium 90 with a 20GB hard-drive, serving my other computers with movies and music, among other things. It runs Debian GNU/Linux 2.2r2, but with the 2.4.1 kernel. Among the new features in 2.4.1 is the ReiserFS journaling filesystem. Being bored with long fsck's after powerlosses, I decided to give it a shot. Besides, I like to try out new technology once in a while :)

However, I had one big problem: All of my harddrive was partitioned, and I had no other free space to store the data temporarily while changing the filesystem type. How could this be solved?

As just about 55% of the space was utilized, I thought of doing some resizing and repartitioning. One solution would be to create two partitions, copy the data to the other, make the first partition reiserfs and copy it back. Then, the second partition could be removed, the first resized to the end of the disk and finally enlarging reiserfs.

So, I removed some unnecessary files to get below 50% utilization. I unmounted the partition and ran ext2resize /dev/hda3 9g. This shrunk the filesystem to 9 gigabytes, perfect! However, the partition table still said the partition was 19GB. Searching the net, I found the GNU parted program, which claimed to be able to resize partitions. I gave it a shot, and did parted resize 3 823.645 10001.403 (note: the numbers are dependent upon your own setup, do not try it yourself!). Using the regular fdisk, I then created /dev/hda4 with the free space.

I made an ext2 FS on hda4, mounted and copied all data to that location. Then /dev/hda3 was finally made into reiserfs! About 90 minutes later, all the data was copied onto the new filesystem.

I am planning of running with these dual partitions for a while, to be sure there are no problems with it. Then, I plan to remove the hda4 partition. hda3 will be grown to the end of the disk with the parted program. Finally, resize_reiserfs will do its job :)
-- SA, 9 Feb 2001

I will update this page along the way to let you know how things are going.

Update 15-Feb-2001
I have removed the hda4 partition. When using parted to grow the partition size, it complainted about not knowing anything about reiserfs.
This was fixed by doing an sfdisk ('sfdisk' is to 'fdisk' what 'sed' is to 'ed') dump, changing the numbers and writing it back to the drive.
However, resize_reiserfs did not want to play the game with me. For example, resize_reiserfs +1M /dev/hda3 indicated that all went well, but after mounting, nothing had changed. The homepage also suggests mounting the disk with -o remount,resize=XXX, but this mount option was not even recognized.

The conclusion is that I await further releases from namesys of their tools. I have a gigabyte to play with while they fix the problem.

Update 15-Feb-2001 (later that day)
I figured I'd report the problem to namesys, and got a very quick response about my trouble.

So, the conclusion is that my transition from ext2 to reiserfs has progressed well and without any real hassle. One more story before I go: Some nights ago, I had to 'pull the plug' because the network card went crazy when the TP cable was disconnected. Imagine my joy when, instead of getting an eternity of fsck when my machine rebooted, got this:

Feb 14 00:01:24 kossan kernel: reiserfs: checking transaction log (device 03:03) ...
Feb 14 00:01:32 kossan kernel: reiserfs: replayed 3 transactions in 8 seconds
	

Stefan Alfredsson