Wednesday, February 17, 2010

Converting from ext2 to ext3 filesystem

Before Convertion:

[root@vmxdb02 backup]# mount
...
...
/dev/mapper/VolGroup00-testlv on /testfs type ext2 (rw)


[root@vmxdb02 ~]# fsck -V /dev/VolGroup00/testlv
fsck 1.39 (29-May-2006)
[/sbin/fsck.ext2 (1) -- /dev/VolGroup00/testlv] fsck.ext2 /dev/VolGroup00/testlv
e2fsck 1.39 (29-May-2006)
/dev/VolGroup00/testlv: clean, 12/180224 files, 25310/720896 blocks


Performing Convertion:

[root@vmxdb02 ~]# umount /testfs


[root@vmxdb02 ~]# tune2fs -j /dev/VolGroup00/testlv
tune2fs 1.39 (29-May-2006)
Creating journal inode: done
This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.


[root@vmxdb02 ~]# mount /dev/VolGroup00/testlv /testfs

After Convertion:

[root@vmxdb02 ~]# fsck -V /dev/VolGroup00/testlv
fsck 1.39 (29-May-2006)
[/sbin/fsck.ext3 (1) -- /dev/VolGroup00/testlv] fsck.ext3 /dev/VolGroup00/testlv
e2fsck 1.39 (29-May-2006)
/dev/VolGroup00/testlv: clean, 12/180224 files, 41760/720896 blocks


[root@vmxdb02 ~]# mount
...
...
/dev/mapper/VolGroup00-testlv on /testfs type ext3 (rw)