Изменение размера диска LVM

Обновление диска lvm

fdisk -l /dev/sdb1
Disk /dev/sdb1: 200 GiB, 214747299328 bytes, 419428319 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

echo «1» > /sys/class/block/sdb/device/rescan

parted /dev/sdb

cfdisk /dev/sdb

pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 vg_ubuntu lvm2 a— 25.53g 0
/dev/sdb1 vg_ubuntu lvm2 a— 200.00g 0
[custis] root@build-server /home/flant/e.timoshenko # vgs
VG #PV #LV #SN Attr VSize VFree
vg_ubuntu 2 2 0 wz—n- 225.53g 0
[custis] root@build-server /home/flant/e.timoshenko # lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv_root vg_ubuntu -wi-ao—- 221.80g
lv_swap vg_ubuntu -wi-ao—- 3.72g

vgdisplay
— Volume group —
VG Name vg_ubuntu
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 7
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 225.53 GiB
PE Size 4.00 MiB
Total PE 57735
Alloc PE / Size 57735 / 225.53 GiB
Free PE / Size 0 / 0
VG UUID SJc6Z0-5PY2-qwBd-ZFJO-OZNn-FFyq-HIxuHC

pvresize /dev/sdb1

vgdisplay
— Volume group —
VG Name vg_ubuntu
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 8
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 325.41 GiB
PE Size 4.00 MiB
Total PE 83306
Alloc PE / Size 57735 / 225.53 GiB
Free PE / Size 25571 / 99.89 GiB
VG UUID SJc6Z0-5PY2-qwBd-ZFJO-OZNn-FFyq-HIxuHC

[custis] root@build-server /home/flant/e.timoshenko # lvextend /dev/vg_ubuntu/lv_root -l +100%FREE

resize2fs /dev/vg_ubuntu/lv_root

Без рубрики

Related Articles

0 Comment

Leave a Comment

Ваш адрес email не будет опубликован.