User Tools

Site Tools


lvm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lvm [2016/08/16 16:47]
k2patel [Add drive to LVM]
lvm [2017/03/23 15:56] (current)
k2patel [Add drive to LVM]
Line 19: Line 19:
 ==== Add drive to LVM ==== ==== Add drive to LVM ====
 <code bash> <code bash>
 +# Rescan the machine if not found.
 +echo "- - -" > /​sys/​class/​scsi_host/​host0/​scan
 +# Cont.
 fdisk /dev/xvdk ## Comment "​Specify Type 8e by option t" fdisk /dev/xvdk ## Comment "​Specify Type 8e by option t"
 mkfs.ext3 /​dev/​xvdk1 ​ mkfs.ext3 /​dev/​xvdk1 ​
Line 46: Line 49:
 e2fsck -y /​dev/​mapper/​VolGroup00-LogVol02 e2fsck -y /​dev/​mapper/​VolGroup00-LogVol02
 lvextend -L+512M /​dev/​mapper/​VolGroup00-LogVol02 lvextend -L+512M /​dev/​mapper/​VolGroup00-LogVol02
 +OR
 +lvextend -l +100%FREE /​dev/​mapper/​VolGroup00-LogVol02
 resize2fs /​dev/​mapper/​VolGroup00-LogVol02 resize2fs /​dev/​mapper/​VolGroup00-LogVol02
 mount /opt mount /opt
Line 53: Line 58:
  
 <code bash | history> <code bash | history>
 +#rescan the device
 +echo "- - -" > /​sys/​class/​scsi_device/​1\:​0\:​0\:​0/​device/​rescan
 +#list devices and confirm you are going to update which drive.
 fdisk -l fdisk -l
 +### Delete and recreate the partition 'make sure start block is the same'
 fdisk /dev/sda ## Comment "​Specify Type 8e by option t" fdisk /dev/sda ## Comment "​Specify Type 8e by option t"
 +### Reprobe partition table.
 +partprobe -s
 mkfs.ext3 /dev/sda1 mkfs.ext3 /dev/sda1
 vgextend VolGroup00 /dev/sda1 vgextend VolGroup00 /dev/sda1
lvm.1471366058.txt.gz ยท Last modified: 2016/08/16 16:47 by k2patel