我们在现场有几台Dl360 G6.他们在raid 1中有2x 146G磁盘.在LVM之后,这显示为136G卷(文件系统损失7%).
这被刻为100M / boot,其余为LVM PV. volgroup包含2个逻辑卷,一个54G专用于交换(是的,它很多,是的,它是设计),81G专用于/.
截至今天,我们在raid 1中添加了2x 300G磁盘.这显示在操作系统中,在添加到LVM后,它显示为279G(文件系统损失7%).这显示为/ dev / cciss / c0d1.
我跑了这些命令 –
使新阵列成为LVM卷 –
pvcreate /dev/cciss/c0d1
将卷添加到现有卷组 –
vgextend VolGroup00 /dev/cciss/c0d1
扩展根分区逻辑卷以使用100%的新空间 –
lvextend -l 100%FREE /dev/VolGroup00/LogVol01
调整音量大小 –
resize2fs -p /dev/VolGroup00/LogVol01
问题是,我们似乎缺少了很多空间.大约90G准确. vgdisplay的输出显示大约82G的物理范围免费(自由PE /大小2642 / 82.56 GB),好像它忽略了我已经包含100%免费.
我在这里误读了什么吗?我做错了什么吗?任何帮助,将不胜感激.我想知道是否有可能失去LVM格式的空间,然后第二次丢失空间到ext3文件系统,导致可用空间“双重”损失.但这似乎并不能解释我在pvdisplay和vgdisplay中看到的内容.
以下是主机上LVM命令的转储:
[root@bass01 ~]# pvs PV VG Fmt Attr PSize PFree /dev/cciss/c0d0p2 VolGroup00 lvm2 a- 136.59G 0 /dev/cciss/c0d1 VolGroup00 lvm2 a- 279.34G 82.56G [root@bass01 ~]# lvs LV VG Attr LSize Origin Snap% Move Log Copy% Convert LogVol00 VolGroup00 -wi-ao 54.00G LogVol01 VolGroup00 -wi-ao 279.38G [root@bass01 ~]# vgs VG #PV #LV #SN Attr VSize VFree VolGroup00 2 2 0 wz--n- 415.94G 82.56G [root@bass01 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol01 271G 18G 240G 7% / /dev/cciss/c0d0p1 97M 19M 73M 21% /boot tmpfs 36G 0 36G 0% /dev/shm [root@bass01 ~]# free -g total used free shared buffers cached Mem: 70 12 58 0 9 0 -/+ buffers/cache: 1 68 Swap: 53 0 53 [root@bass01 ~]# pvdisplay --- Physical volume --- PV Name /dev/cciss/c0d0p2 VG Name VolGroup00 PV Size 136.60 GB / not usable 7.45 MB Allocatable yes (but full) PE Size (KByte) 32768 Total PE 4371 Free PE 0 Allocated PE 4371 PV UUID nh7cgk-3pr7-gZst-Pz6o-PAWt-X1wZ-GH4TmI --- Physical volume --- PV Name /dev/cciss/c0d1 VG Name VolGroup00 PV Size 279.37 GB / not usable 22.29 MB Allocatable yes PE Size (KByte) 32768 Total PE 8939 Free PE 2642 Allocated PE 6297 PV UUID tHEAfR-HsNd-jNUT-mOwj-Ettb-N76X-fXIf0Q [root@bass01 ~]# vgdisplay --- Volume group --- VG Name VolGroup00 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 5 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 415.94 GB PE Size 32.00 MB Total PE 13310 Alloc PE / Size 10668 / 333.38 GB Free PE / Size 2642 / 82.56 GB VG UUID dcPGvL-SUCl-l99e-pQJN-e6sA-xEKZ-Q5ZT1G [root@bass01 ~]# lvdisplay --- Logical volume --- LV Name /dev/VolGroup00/LogVol01 VG Name VolGroup00 LV UUID p7of6A-poAR-1iXs-Tgpq-lJRh-qae3-VNxBTO LV Write Access read/write LV Status available # open 1 LV Size 279.38 GB Current LE 8940 Segments 3 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Logical volume --- LV Name /dev/VolGroup00/LogVol00 VG Name VolGroup00 LV UUID X4iAo4-kKd8-ZZvJ-vfqq-fdMo-HaEM-YIsGE7 LV Write Access read/write LV Status available # open 1 LV Size 54.00 GB Current LE 1728 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1
解决方法
你的lvextend命令不正确.你告诉它’使逻辑卷的大小达到100%的可用空间.’
我想你打算说“按照100%的可用空间大小使逻辑卷增长.”
lvextend -l 100%FREE /dev/VolGroup00/LogVol01
应该:
lvextend -l +100%FREE /dev/VolGroup00/LogVol01
注意”.