我一直在努力做到这一点并尝试了很多教程但都没有成功。
我在 Hyper-V 上安装了 Centos 7 作为客户机,需要扩展 centos 根分区上的磁盘空间。我已经在 Hyper-V 中扩展了 VHDX。我一直在关注这教程但它没有增加逻辑卷。下面是磁盘结构的输出。
[root@atlassian-01 ~]# lsblk;pvs;vgs;lvs;df -h;fdisk -l /dev/sda
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 150G 0 disk
├─sda1 8:1 0 200M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 28.8G 0 part
├─centos_atlassian--01-root 253:0 0 25.8G 0 lvm /
└─centos_atlassian--01-swap 253:1 0 3G 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom
PV VG Fmt Attr PSize PFree
/dev/sda3 centos_atlassian-01 lvm2 a-- 28.80g 0
VG #PV #LV #SN Attr VSize VFree
centos_atlassian-01 1 2 0 wz--n- 28.80g 0
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root centos_atlassian-01 -wi-ao---- 25.80g
swap centos_atlassian-01 -wi-ao---- 3.00g
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos_atlassian--01-root 26G 26G 17M 100% /
devtmpfs 3.8G 0 3.8G 0% /dev
tmpfs 3.9G 8.0K 3.9G 1% /dev/shm
tmpfs 3.9G 8.3M 3.8G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/sda2 1014M 134M 881M 14% /boot
/dev/sda1 200M 9.8M 191M 5% /boot/efi
tmpfs 780M 0 780M 0% /run/user/0
Disk /dev/sda: 161.1 GB, 161061273600 bytes, 314572800 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 62914559 31457279+ ee GPT
Partition 1 does not start on physical sector boundary.
为 centos_atlassian--01-root 分配更多空间的正确方法是什么?
谨致问候,Jacek