Powered By Blogger

Tuesday, February 28, 2012

Working on extents on Redhat LVM

If you want to create Logical volume using extents:

By default PE size for volume group is 4 MB.


PE Size 4.00 MiB

If you want to change it, you can use -s option when you are creating volume group

For example

# vgcreate -s 8 helloguruvg /dev/sdh

For now, i am using default value which is 4 MB.

I am creating Logical volume with 30 extents (which will be 30 x 4 MB size)

[root@kumar ~]# lvcreate -l 30 -n hellogurulg helloguruvg

Making ext4 filesystem:

[root@kumar ~]# mkfs.ext4 /dev/mapper/helloguruvg-hellogurulg

[root@kumar ~]# mkdir /hellogurufs

[root@kumar ~]# mount /dev/mapper/helloguruvg-hellogurulg /hellogurufs

[root@kumar ~]# df -h

/dev/mapper/helloguruvg-hellogurulg 117M 5.6M 105M 6% /hellogurufs

Edit the fstab to make it persistent

No comments:

Post a Comment

Welcome to the UNIX world