echo "- - -" > /sys/class/scsi_host/host0/scan
fdisk -l
fdisk /dev/sdb
pvcreate /dev/sdb1
vgdisplay 查看卷组的名字
--- Volume group ---
VG Name vg_app00 卷组的名字
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 52.80 GiB
PE Size 4.00 MiB
Total PE 13517
Alloc PE / Size 12674 / 49.51 GiB
Free PE / Size 843 / 3.29 GiB
VG UUID PLXhIk-axTB-UcSH-SzBq-UBlE-WTMW-4E3gcS
vgextend vg_app00 /dev/sdb1
df -hT 查磁盘的不足的在哪
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/vg_app00-lv_root
ext4 49G 5.0G 41G 11% /
tmpfs tmpfs 1.9G 228K 1.9G 1% /dev/shm
/dev/sda1 ext4 49G 5.0G 41G 11% /boot
/dev/sr0 iso9660 3.6G 3.6G 0 100% /media/cdrom
mount 查看一下你要扩展的
/dev/mapper/vg_app00-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
/dev/sr0 on /media/cdrom type iso9660 (ro)
lvextend -l +100%FREE /dev/mapper/vg_app00-lv_root
resize2fs /dev/mapper/vg_app00-lv_root
df -hT查看/dev/mapper/vg_app00-lv_root exit4 原来有46G 又增加了3个G证明成功