之前不小心用 fdisk 把 sda 中加了一个分区
Device Boot Start End Blocks Id System
/dev/sda1 1 6528 52428799+ ee GPT
/dev/sda2 6528 65270 471852475 83 Linux
然后 df -h 的话
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-Vol_root
45G 4.0G 39G 10% /
tmpfs 1.9G 228K 1.9G 1% /dev/shm
/dev/sda2 190M 79M 101M 44% /boot
/dev/sda1 200M 264K 200M 1% /boot/efi
我在 fdisk 中删除 sda2 会不会把 df -h 中的 sda2 给删除了啊
[[email protected] ~]# vgs
VG #PV #LV #SN Attr VSize VFree
VolGroup 1 2 0 wz--n- 49.61g 0
[[email protected] ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 VolGroup lvm2 a-- 49.61g 0
如果是 应该怎么操作啊,把这 500G 还原出来
use testdisk or gdisk
你为啥不用 gdisk 呢
Disk /dev/sda: 1048576000 sectors, 500.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7C732A22-1471-4543-B522-6EFC1F318607
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1048575966
Partitions will be aligned on 2048-sector boundaries
Total free space is 943722429 sectors (450.0 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 411647 200.0 MiB EF00
2 411648 821247 200.0 MiB 0700
3 821248 104855551 49.6 GiB 8E00
现在还有 450G 空余的空间 怎么扩大到 3 中啊
Disk /dev/sda: 1048576000 sectors, 500.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7C732A22-1471-4543-B522-6EFC1F318607
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1048575966
Partitions will be aligned on 2048-sector boundaries
Total free space is 943722429 sectors (450.0 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 411647 200.0 MiB EF00
2 411648 821247 200.0 MiB 0700
3 821248 104855551 49.6 GiB 8E00
现在还有 450G 空余的空间 怎么扩大到 3 中啊
楼主你建的 LVM 想扩大的话再建一个 450G 的分区, 加入 VG, 最后 resize2fs 就行了. LVM 底层分区感觉上没法扩大
啊. 忘了. 用 pvresize 确实可以.