$ cp ext3-2.4-0.x.y.patch.gz /usr/src $ gunzip ext3-2.4-0.x.y.patch.gz $ patch -p0 < ext3-2.4-0.x.y.patch $ cd /usr/src/linux $ make mrproper $ make menuconfig Under the filesystems menu, select ext3. Please also select "JBD debugging support", as it will produce useful diagnostics if something goes wrong. The filesystem may be compiled into the kernel or built as a module. Building it into the kernel can simplify the gathering of diagnostic information if something fails. WARNING : If u are converting your existing ext2 root file system to ext3 than compile ext3 support in the kernel since u will need it on startup :-) Debian Users : ------------ Once the above make menuconfig step is over, just type make-kpkg --revision=ext31.0 kernel-image to start compilation of the kernel. This will create a deb file in /usr/src with your customised kernel with ext3 support. Just type dpkg -i kernel-image* to install the new kernel :-) Edit your LILO (/etc/lilo.conf) or GRUB (/boot/grub/menu.lst) configuration file to reflect the new kernel. Update the MBR by giving the appropriate command for your boot loader. ( lilo -v for LILO ) Redhat Users : ------------ Redhat users are not so lucky as Debian users. You guys will have to type the following commands to compile and install the kernel: $ make dep $ make clean $ make bzImage $ make install $ make modules $ make modules_install Edit your LILO (/etc/lilo.conf) or GRUB (/boot/grub/menu.lst) configuration file to reflect the new kernel. Update the MBR by giving the appropriate command for your boot loader. ( lilo -v for LILO ) Voila !!! A major headache over .......... Hush.............
An ext2 filesystem maybe converted to ext3 by creating a journal file on it. To do this, run tune2fs -j /dev/hdXX on the target filesystem. The filesystem is now ext3! Note that the filesystem need not be unmounted for this operation.
Simply run mke2fs -j /dev/hdXX to create a new ext3 filesystem on that device.
A feature of e2fsck is that it will regularly force a check of a filesystem even if the filesystem is marked clean. Typically, this happens on every twentieth mount or every 180 days, whichever comes first. This still happens with ext3, and is quite possibly not what you want to happen - one of the reasons you chose ext3 was to avoid the downtime which is caused by a long fsck. So it is a good idea to turn this feature off for ext3. Use the command tune2fs -i 0 /dev/hdxx To disable the checking.
This is very important. Just change ext2 to ext3 in /etc/fstab For ex. : /dev/hda3 / ext2 defaults,errors=remount-ro 0 1 change this to /dev/hda3 / ext3 defaults,errors=remount-ro 0 1
Since an ext3 filesystem will not normally be checked at boot time, one option for long-running systems is to use the LVM snapshot feature to create a read-only snapshot of a filesystem and run a read-only e2fsck on the snapshot to ensure that your filesystem has not been corrupted by bad RAM, cables, disk drive, or kernel. You need to have your filesystem on an LVM Logical Volume, and you need the "LVM VFS Enhancement" patch applied for this to work properly (although it may work without the VFS enhancement patch on non-busy filesystems). For example, to run such a check on a Logical Volume (can be done at any time while the system is running, even from a cron script). This assumes that you will not change more than 64MB of data in a single Logical Volume during the course of the e2fsck, and that you have this much space free in each volume group you want to test): # simple but stupid LV listing (hardcoded LV names to check) #for LV in /dev/vg00/lv1 /dev/vg00/lv2 /dev/vg01/lvA /dev/vg01/lvB; do # this assumes that all LVs have ext2/ext3 filesystems on them for LV in `lvscan | sed -n -e '/ACTIVE/s/[^\"]*\"//' -e 's/\".*//p'`; do SNAP=lvtempsnap SNAPDEV=`dirname $lv`/$SNAP lvcreate -L 80M -s -n $SNAP $LV [ $? -ne 0 ] && echo "**** WARNING **** unable to check $LV" && continue e2fsck -fn $SNAPDEV [ $? -ne 0 ] && echo "**** ERROR **** problem with filesystem on $LV" lvremove -f $SNAPDEV [ $? -ne 0 ] && echo "**** WARNING **** unable to remove $SNAP" done