----LVM --------- --> Logical Volume Management -- Shirish Shukla
PV -- Physical Volume
VG -- Volume Group
LV -- Logical Volume
---------Create LVM partition------- /myvol/vo
# fdisk /dev/sda
create new partition 1200Mb of type LVM(8e)
# partprobe -s
# fdisk -l (Check )
-------------LVM-----------
# pvcreate /dev/sda10
# vgcreate myvol /dev/sda10 (will create VG "myvol")
# vgdisplay (Varify VG)
# lvcreate -L1000M -n vo myvol
# lvdisplay
LV Name /dev/myvol/vo
# mkfs.ext3 /dev/myvol/vo
# vi /etc/fstab
Comment
Label=/home ....
and make below entry
/dev/myvol/vo /home ext3 defaults 1 2
#umount /home
#mount -a
#mount (Varify /home)
xxxxxxxxxxxxxxxxxxxx
Q: Resize LVM to 300M.
Check lvm status by using
# lvdisplay
# vgdisplay
# df –h
Case I: current < 300M
#lvextend -L 300M /dev/myvol/vo
#resize2fs /dev/myvol/vo
#lvdisplay …check lvsize
#df -h ….varify size on /home
Case II: current > 300M
#umount /home
#e2fsck –f /dev/myvol/vo
#resize2fs /dev/myvol/vo 300M
#lvreduce -L 300M /dev/myvol/vo
---: type yes
#lvdisplay ..varify lv size must be 300M
#mount -a
#mount …..varify
#df -h …..varify
# Faced any problem Feedback in above contact me
#======================== ===Scratch===============================#
# AND Many More .....................Linux is Endless #
#========================== Hope you Liked IT =========================#
# LVM-- BY Shirish Shukla #
# RHC Engineer 2010 #
# shirish.linux@gmail.com #
# shirishlinux.blogspot.com #
# "Give Respect To Time One Day At Right Time, Time Will Respect You" #
#==================================================================#
# TRy Hard theres nothing that are un-achievable by HARDdd-WORKkk #
#==================================================================#
PV -- Physical Volume
VG -- Volume Group
LV -- Logical Volume
---------Create LVM partition------- /myvol/vo
# fdisk /dev/sda
create new partition 1200Mb of type LVM(8e)
# partprobe -s
# fdisk -l (Check )
-------------LVM-----------
# pvcreate /dev/sda10
# vgcreate myvol /dev/sda10 (will create VG "myvol")
# vgdisplay (Varify VG)
# lvcreate -L1000M -n vo myvol
# lvdisplay
LV Name /dev/myvol/vo
# mkfs.ext3 /dev/myvol/vo
# vi /etc/fstab
Comment
Label=/home ....
and make below entry
/dev/myvol/vo /home ext3 defaults 1 2
#umount /home
#mount -a
#mount (Varify /home)
xxxxxxxxxxxxxxxxxxxx
Q: Resize LVM to 300M.
Check lvm status by using
# lvdisplay
# vgdisplay
# df –h
Case I: current < 300M
#lvextend -L 300M /dev/myvol/vo
#resize2fs /dev/myvol/vo
#lvdisplay …check lvsize
#df -h ….varify size on /home
Case II: current > 300M
#umount /home
#e2fsck –f /dev/myvol/vo
#resize2fs /dev/myvol/vo 300M
#lvreduce -L 300M /dev/myvol/vo
---: type yes
#lvdisplay ..varify lv size must be 300M
#mount -a
#mount …..varify
#df -h …..varify
# Faced any problem Feedback in above contact me
#======================== ===Scratch===============================#
# AND Many More .....................Linux is Endless #
#========================== Hope you Liked IT =========================#
# LVM-- BY Shirish Shukla #
# RHC Engineer 2010 #
# shirish.linux@gmail.com #
# shirishlinux.blogspot.com #
# "Give Respect To Time One Day At Right Time, Time Will Respect You" #
#==================================================================#
# TRy Hard theres nothing that are un-achievable by HARDdd-WORKkk #
#==================================================================#
Nice Article ...!
ReplyDeleteMany thnaks ..!