Converting to JFS

I finally did it! Now my root partition is, instead of a boring old ext3 a shiny new JFS parition.


The very first thing I did was build a new kernel with JFS support compiled into it. While configuring the kernel I also selected the deadline IO scheduler as the default scheduler since it tends to extract the best performance out of a JFS partition. Then I installed the new kernel. Now I needed some way to convert the existing root partition (in the device /dev/sda9) from ext3 to JFS. Since even after having installed every program I need (and two and a half desktop environments) the total size of the partition was a meager 9 GiB (compare that to a fresh installation of Windows Vista) this had a simple and safe solution – simply backup and restore the files. One nice automated way is to use some software like CloneZilla. I, however, like doing things my way. I burned an Arch Linux installation CD and started up my notebook from it.


The best part about the Arch Linux install live CD is that after booting up it gives you a very clean, no-frills bash environment to work on. Once I was up and running I did a simple mkdir /media/root and mounted the partition onto the new directory by mount /dev/sda9 /media/root. Since I was logged in as root I really did not need to use sudo or su. I also needed another partition with space to spare. I used /dev/sda5 – an ntfs partition. I mounted it by mkdir /media/backup and then mount -t ntfs-3g /dev/sda5 /media/backup. Instead of simply copying the data from /media/root to /media/backup I used TAR – cd /media/root; tar cvf * /media/backup/everything.tar. This actually sped up the process a little (or so I though) since it prevented the ntfs-3g driver from wasting time by allocating space for the tens of thousands of files. The entire thing took about twenty minutes to complete.


That done I unmounted the partition – umount /media/root and ran mkfs.jfs /dev/sda9. This warned me about losing all data and then converted the partition. The conversion, surprisingly, took only about a second or two.


Now it was time to restore the files again – I mounted the partition again using mount /dev/sda9 /media/root and extracted the tar files – cd /media/root; tar xvf /media/backup/everything.tar. Then I installed GRUB using grub-install. I restarted my system only to find the kernel unable to boot.


A little probing showed what was wrong – while initially installing Arch Linux the installer had configured my GRUB’s menu.lst to recognize my disk using its UUID. The reformatting some reset the UUID of my partitions (I really do not know how or why). I fixed that by changing the /by-uuid thingode>/dev/sda9. I know, I know - this was not the right way but it did work and I saved a lot of time. I had to fix /etc/fsatb for the same reason.


So now my computer boots faster, applications load without eating too much CPU and the system is more responsive overall.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>