Linux How to add a new disk to LVM

转自:http://blog.itpub.net/7191998/viewspace-772060/

1.check old diskspace and device list
df -hal
free -m
fdisk -l

2.add a new hardsik into server
fdisk /dev/sdb(hdb)
action: n #create a new partition
action: p #primary partition
action: 1-4 # how many partition
action: enter #default is ok

action: t # change a partition's system id
action: 8e # Linux LVM

action: w #save and exit
3.active the new disk as below or reboot
partprobe ro reboot
fdisk -l

4.check the LVM -create the PV and add into Group
vgs
pvcreate /dev/sdb1
vgextend VolGroup /dev/sdb1
vgdisplay

5.create and resize and effect LV
lvresize -L +21.96G /dev/VolGroup00/LogVol00
resize2fs /dev/VolGroup00/LogVol00

posted on 2015-08-29 22:44  baxk2001  阅读(311)  评论(0编辑  收藏  举报

导航