Sunday, May 25, 2014

How To Convert Ext3 to Ext4 and Ext2 to Ext4 In Linux

3:46 PM

Ext4 provides some additional benefits and perforce over ext3  & ext2 file system. You can easily convert ext3 to ext4 file system and ext2 to ext4.

Converting from Ext3 to Ext4 file system.

1.  Login into linux system as root user.

2. Check current linux file system in fstab.

root@linuxstorage:~#cat /etc/fstab

which display all mount partition and current file system.


3. Unmount the mounted partition.

root@linuxstorage:~#umount /dev/sda5

4.tune2fs command is one of the advanced unix commands which allows you to adjust various tunable parameters of the ext2/ext3 filesystems. Naturally, it also helps you confirm the existing parameters configured for your filesystems.

 root@linuxstorage:~#tune2fs -O extents,uninit_bg,dir_index /dev/sda5

5. e2fsck is to check a Linux ext2/ext3 file system. e2fsck is a file system check utility that check the file systems for bad sectors , I/O errors related to HDD . e2fsck is used to check and optionally repair one or more Linux file systems. 

root@linuxstorage:~# e2fsck -pf /dev/sda5

6.Remount the converted file system.


 root@linuxstorage:~#mount /dev/sda5 /

7.Reboot the system.

 root@linuxstorage:~#init 6

8. Test all the above command in testing server. While doing in production server please backup all data's and implement these above command.



Converting from Ext2 to Ext4 file system


1.  Login into linux system as root user.

2. Check current linux file system in fstab.

root@linuxstorage:~#cat /etc/fstab

which display all mount partition and current file system.


3. Unmount the mounted partition.

root@linuxstorage:~#umount /dev/sda5

4. .tune2fs command is one of the advanced unix commands which allows you to adjust various tunable parameters of the ext2/ext3 filesystems. Naturally, it also helps you confirm the existing parameters configured for your filesystems.

root@linuxstorage:~#tune2fs -O dir_index,has_journal,uninit_bg /dev/sda5

5.e2fsck is to check a Linux ext2/ext3 file system. e2fsck is a file system check utility that check the file systems for bad sectors , I/O errors related to HDD . e2fsck is used to check and optionally repair one or more Linux file systems. 


 root@linuxstorage:~# e2fsck -pf /dev/sda5

6.Remount the converted file system.


 root@linuxstorage:~#mount /dev/sda5 /

7.Reboot the system.

 root@linuxstorage:~#init 6

8. Test all the above command in testing server. While doing in production server please backup all data's and implement these above command.

Written by

0 comments :

Post a Comment

 

© 2014 Linux Storages | Updated . All rights resevered. Designed by Templateism