Linuxのパーティションを拡張

パーティションを確認
#pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 fedora_kiku lvm2 a– 277.93g 0

#vgs
VG #PV #LV #SN Attr VSize VFree
fedora_kiku 1 3 0 wz–n- 277.93g 0

#lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv_opt fedora_kiku -wi-ao—- 100.00g
root fedora_kiku -wi-ao—- 174.03g
swap fedora_kiku -wi-ao—- 3.90g

残りを確認
#pvdisplay /dev/sda2
— Physical volume —
PV Name /dev/sda2
VG Name fedora_kiku
PV Size <277.94 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 71151
Free PE 40712
Allocated PE 30439
PV UUID 0o3Zt0-8NOb-WYr5-3Jrt-359Q-ltaa-dOXb4j

# lvdisplay /dev/mapper/fedora_kiku-root
— Logical volume —
LV Path /dev/fedora_kiku/root
LV Name root
VG Name fedora_kiku
LV UUID dp0wM9-28Li-6nQa-n4Zw-kiCZ-EEKV-CVG5Im
LV Write Access read/write
LV Creation host, time kiku.tsukuba-g.ac.jp, 2019-06-17 10:38:06 +0900
LV Status available
# open 1
LV Size 15.00 GiB
Current LE 3840
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:0

残りを追加
#lvextend -l +100%FREE /dev/mapper/fedora_kiku-root
Size of logical volume fedora_kiku/root changed from 15.00 GiB (3840 extents) to 174.03 GiB (44552 extents).
Logical volume fedora_kiku/root successfully resized.

追加されたか確認
#lvdisplay /dev/mapper/fedora_kiku-root
— Logical volume —
LV Path /dev/fedora_kiku/root
LV Name root
VG Name fedora_kiku
LV UUID dp0wM9-28Li-6nQa-n4Zw-kiCZ-EEKV-CVG5Im
LV Write Access read/write
LV Creation host, time kiku.tsukuba-g.ac.jp, 2019-06-17 10:38:06 +0900
LV Status available
# open 1
LV Size 174.03 GiB
Current LE 44552
Segments 2
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:0

#lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
lv_opt fedora_kiku -wi-ao—- 100.00g
root fedora_kiku -wi-ao—- 174.03g
swap fedora_kiku -wi-ao—- 3.90g

カテゴリー: 未分類 タグ: , パーマリンク