Saturday, January 12, 2013

How to change ext2 to ext3 file system in Linux

Hi All,

Thanks for visiting my blog. It feels good and nice on your every visit.

Today, I learnt changing of ext2 filesystem to ext3 file system. first of all would like to share that, i was not aware of how to make an ext3 file system in RHEL linux. so i learnt that, next i learn how to change from ext2 file system to ext3 file system i.e. migrating to ext3 file sysetm.

method of creating ext2 file system is :-

#pvcreate /dev/sdb

message will appear that pv is created successfully.

#vgcreate vgdb /dev/sdb

by this we are creating vg named as vgdb on /dev/sdb disk of any size.

#lvcreate -L " desired size" -n "name of the desire lv" /dev/vgdb

now the command for creation of ext2 file system comes i.e.

#mkfs /dev/vgdb/"name of the lv"

this will create the file system as ext2, after mounting the file system, you can see the same with

#df -hT

command , this will show the type of file system also.

for mounting the file system, you should have a directory with you. which can be created with.

#mkdir -p /name with location of the directory you want to mount the file system on

# mount /dev/vgdb/lvname /mountpoint or directory created.

Now the point comes to change the filesystem type i.e. from ext2 to ext3.  I know this much haven't learn changing from ext3 to ext2 till now. when i will learn will post.

the command is :-

#tune2fs -j /dev/

this block device you can get from /etc/fstab also, please remember to change the type of file system after running the tune2fs command in /etc/fstab too. so that as system reboot it doesn't find any conflict. and reboots properly.

Thanks for the visit, bye for now. will keep post and always appreciate your visit.

Love all.
Amit Chopra


No comments: