# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name centos
PV Size <199.00 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 50943
Free PE 0
Allocated PE 50943
# xfs_growfs /
meta-data=/dev/mapper/centos-root isize=512 agcount=4, agsize=3276800 blks
= sectsz=4096 attr=2, projid32bit=1
= crc=1 finobt=0 spinodes=0
data = bsize=4096 blocks=13107200, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal bsize=4096 blocks=6400, version=2
= sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
data blocks changed from 13107200 to 13108224
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 50G 45G 5.3G 90% /
devtmpfs 438M 0 438M 0% /dev
tmpfs 449M 0 449M 0% /dev/shm
tmpfs 449M 12M 437M 3% /run
tmpfs 449M 0 449M 0% /sys/fs/cgroup
/dev/sda1 1014M 125M 890M 13% /boot
/dev/mapper/centos-home 147G 33M 147G 1% /home
tmpfs 90M 0 90M 0% /run/user/0
# lvextend -l+100%FREE /dev/centos/root
New size (12801 extents) matches existing size (12801 extents).
# resize2fs /dev/centos/root
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/centos/root
Couldn't find valid filesystem superblock.
# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name centos
PV Size <199.00 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 50943
Free PE 1
Allocated PE 50942
# vgdisplay
--- Volume group ---
VG Name centos
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size <199.00 GiB
PE Size 4.00 MiB
Total PE 50943
Alloc PE / Size 50942 / 198.99 GiB
Free PE / Size 1 / 4.00 MiB
# lvdisplay
--- Logical volume ---
LV Path /dev/centos/swap
LV Name swap
VG Name centos
LV Write Access read/write
LV Creation host, time localhost, 2018-06-27 15:31:27 +0300
LV Status available
# open 2
LV Size 2.00 GiB
Current LE 512
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:1
--- Logical volume ---
LV Path /dev/centos/home
LV Name home
VG Name centos
LV Write Access read/write
LV Creation host, time localhost, 2018-06-27 15:31:28 +0300
LV Status available
# open 1
LV Size 146.99 GiB
Current LE 37630
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:2
--- Logical volume ---
LV Path /dev/centos/root
LV Name root
VG Name centos
LV Write Access read/write
LV Creation host, time localhost, 2018-06-27 15:31:31 +0300
LV Status available
# open 1
LV Size 50.00 GiB
Current LE 12800
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:0
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 50G 45G 5.3G 90% /
devtmpfs 438M 0 438M 0% /dev
tmpfs 449M 0 449M 0% /dev/shm
tmpfs 449M 18M 431M 4% /run
tmpfs 449M 0 449M 0% /sys/fs/cgroup
/dev/sda1 1014M 125M 890M 13% /boot
/dev/mapper/centos-home 147G 33M 147G 1% /home
tmpfs 90M 0 90M 0% /run/user/0
Disk /dev/sda: 270.6 GB, 270582939648 bytes, 528482304 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: 0x000d9960
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 419430399 208665600 8e Linux LVM
Disk /dev/mapper/centos-root: 53.7 GB, 53687091200 bytes, 104857600 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 /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 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 /dev/mapper/centos-home: 157.8 GB, 157831659520 bytes, 308264960 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
Похоже что ваш фокус удался. 270 гигов на /dev/sda. Как теперь 50 добавить в /dev/sda2?