我增加了用作 LVM PV 的分区的大小,但运行 pvresize 似乎没有看到额外的空间:
cuttle:~# fdisk -l /dev/vda
Disk /dev/vda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00027dbb
Device Boot Start End Blocks Id System
/dev/vda1 * 1 31 248976 83 Linux
/dev/vda2 32 2610 20715817+ 8e Linux LVM
Run Code Online (Sandbox Code Playgroud)
其中说 vda2 大约是 20gigs
cuttle:~# pvdisplay
--- Physical volume ---
PV Name /dev/vda2
VG Name debian
PV Size 4.76 GiB / not usable 3.08 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 1217
Free PE 0
Allocated PE 1217
PV UUID tehZic-5vfN-rsrm-B8lN-lpgc-yQT1-ioH1V0
Run Code Online (Sandbox Code Playgroud)
所以目前的 pv 大约是 4-5 gigs
cuttle:~# pvresize -v /dev/vda2
Using physical volume(s) on command line
Archiving volume group "debian" metadata (seqno 12).
No change to size of physical volume /dev/vda2.
Resizing volume "/dev/vda2" to 9975981 sectors.
Updating physical volume "/dev/vda2"
Creating volume group backup "/etc/lvm/backup/debian" (seqno 13).
Physical volume "/dev/vda2" changed
1 physical volume(s) resized / 0 physical volume(s) not resized
Run Code Online (Sandbox Code Playgroud)
pvresize 说“物理卷 /dev/vda2 的大小没有变化”
cuttle:~# pvdisplay
--- Physical volume ---
PV Name /dev/vda2
VG Name debian
PV Size 4.76 GiB / not usable 3.08 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 1217
Free PE 0
Allocated PE 1217
PV UUID tehZic-5vfN-rsrm-B8lN-lpgc-yQT1-ioH1V0
Run Code Online (Sandbox Code Playgroud)
并且 pv 的大小没有改变。
不知道我还能做什么来使用额外的空间。我想我可以将分区的大小调整为 pv 的大小,然后添加第二个分区,但在我看来,我在这里尝试做的事情确实应该可行。
归档时间: |
|
查看次数: |
55337 次 |
最近记录: |