[ Bloke.com || Linux || JavaScript || Java || Volleyball || Link Me ]
Free: [ Guestbook || MessageBot || Plugins || Counter || AusPrices || Advertise ]
www.bloke.com

Home - Linux - Ext3

Red Hat 7.2 recommends ext3. Ext3 is a journalling file system which means that it writes a journal which contains a list of the transactions that are to go to disk. This is very similar to a "roll-back" log in a database. The beauty of this scheme is that if the computer crashes, you can recovert the drive very quickly since you can just re-run the last disk transactions. There are other benefits, but nothing that we really care about, our biggest pain was running fsck on a 60gig drive, and it taking forever. And in many cases requiring human intervention. And if the computer crashes, we just want it to come back as soon as possible. On most of the servers, all the data we have can be reproduced or is not important (so could be lost).

It has worked very well for us, we had tried reiserfs, but had lots of problems with various kernels, and eventually gave up with the number of kernel hangs (but as it turned out these where known problems with the kernel we used and reiserfs, but the kernels required were not available from red hat, and I didn't feel like mucking around customizing the kernel to suit our needs).

When RH 7.2 came long, it recommended ext3, and we ran it on our test servers, and it seemed to be fine (they also recommend the grub boot loader which has been great!). So when any machine needed an upgrade we moved to ext3. Our servers reboot much nicer, and with much less human intervention. But we did have a problem when a /var file partition went bad under ext3 (a look at the problem after the fact showed that /var was full, so I assume the problem was with this). I tried to recover partition by converting it to ext2 but since the dirty bit was set I had a lot of problems. When this happens I assumed the solution to recover the partition, without any reinstall, would be long and painful, and I certainly didn't care. All the data I needed was backuped elsewhere, so I just did a re-install. The bad thing is that the installer wouldn't allow me to overwrite /var, so I had to format the disk before doing a clean install.

Arghh .. it just happened again (Apr 8, 2002). A file system /home filled up, and hosed everything. When the file system was accessed (I tried to delete files), it SEGV'ed on the /bin/rm, and then hung the kernel. One hour on the phone to co-lo in the US (from australia), and I got the machine up and running without /home. Now going to blow away /home. Scarely, it's super easy. (of course the partition file can't be mounted when you run this command)

This command will delete all data on the partition:

mkfs /dev/sda8
This actually makes an ext3 file system .. then use tune2fs to "convert" it to ext3.
tune2fs -j /dev/sda8
and now you can mount it as ext3. I kind of remember that the label is not there, so you might have to change your /etc/fstab to have a line something like:
/dev/sda8               /home                   ext3    defaults        1 2
Also /dev/sdaX the s is for scsi. For many people this will be /dev/hdaX or /dev/hdbX or /dev/sdbX etc...

For future machines we leave / and /var as ext2. And we have some monitor software that we wrote to monitor the disk space.

But, with just this one glitch it has been well worth it, saving us lots of time on reboots and crashes (one of our machines has a bad CPU, so it crashes about once a day!).

Last Change: Monday, 10-Jan-2005 07:40:51 EST

Disclaimer

The information provided within these pages is provided AS IS, and without any warranty. Following these directions may (but not limited to) crash your computer, delete all the information on your hard disk, open up security holes or cause your house to burn down. I made these pages to provide some information about the setup that I have done, but I did not proofread it for correctness, and in most cases did not test it. There are commands in these pages that would definately delete or corrupt all the data on your computer (especially the dualboot section). In fact it happened to me.... So you are on your own!


Cameron Gregory