Create and Extend Logical Volumes Flashcards
What command makes a partition in a single line for setting them to Linux LVM?
parted /dev/<device> mkpart <partition> <Starting> <Ending></Ending></Starting></partition></device>
What command sets a partition o Linux LVM type?
parted dev/<device> set <partition#> lvm on</device>
What command registers a new partition with the kernel?
udevadm settle
What command labels partitions as physical volumes?
pvcreate /dev/<partition></partition>
What command creates a volume group from a physical volume?
vgcreate <volume> /dev/<physical></physical></volume>
What command creates a logical volume with a specified size?
lvcreate -n <name> -L <Length/size> <Volume></Volume></name>
What command formats a logical volume with the XFS file system?
mkfs -t xfs /dev/<volume_group>/<logical_volume></logical_volume></volume_group>
What command views Physical Volume status information?
pvdisplay /dev/<physical_volume></physical_volume>
What command views the status of a Volume group?
vgdispaly <volume_group></volume_group>
What command displays logical volume information?
lvdisplay /dev/<volume_group/<logical_volume></logical_volume>
What command view the free disk space in human-readable units?
df -h /<mountpoint></mountpoint>
What command extends a volume group by using a physical volume?
vgextend <volume_group> /dev/<physical_volume></physical_volume></volume_group>
What command extends a logical volume a specified length?
lvextend -L 700M /dev/<volume_group/<logical_volume></logical_volume>
What command extends an XFS file system to use the free space on a logical volume?
xfs_growfs </mountpoint>