|
|
目次
LVM(Logical Volume Manager) - 論理ボリューム管理GNU Parted を利用して 2TB 超えのパーティションを作成
LVM の PV、VG、LV について
LVM では、PV(Physical Volume - 物理ボリューム)を作成し、PV を1つ以上使って VG(Volume Group - ボリュームグループ)を作成する。 PV(物理ボリューム) の作成
VG(ボリュームグループ) の作成# vgcreate vg_monster1 /dev/sdb1 Volume group "vg_monster1" successfully created # vgdisplay --- Volume group --- VG Name vg_monster1 System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 2.61 TB PE Size 4.00 MB Total PE 684826 Alloc PE / Size 0 / 0 Free PE / Size 684826 / 2.61 TB VG UUID 4YGE0j-AbaM-BKmx-9OVj-fnG8-C5jV-opCUCZ VG(ボリュームグループ) の拡張VG(ボリュームグループ) に PV(物理ボリューム) を追加する。 # vgextend vg_monster /dev/sdb1 Volume group "vg_monster" successfully extended # vgdisplay --- Volume group --- VG Name vg_monster System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 14 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 2.73 TB PE Size 4.00 MB Total PE 715291 Alloc PE / Size 30465 / 119.00 GB Free PE / Size 684826 / 2.61 TB VG UUID y9vUDl-a5tm-1919-zViH-aaMU-hmNJ-38pcfy LV(論理ボリューム) の拡張# lvdisplay --- Logical volume --- LV Name /dev/vg_monster/lv_root VG Name vg_monster LV UUID oclD9d-LSdM-tWs8-gYmh-O34O-1RJK-L3YunN LV Write Access read/write LV Status available # open 1 LV Size 115.00 GB Current LE 29441 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Logical volume --- LV Name /dev/vg_monster/lv_swap VG Name vg_monster LV UUID p3eWnk-8ifO-c8tW-uJ7Q-lO4I-0Gk7-2d1APF LV Write Access read/write LV Status available # open 1 LV Size 4.00 GB Current LE 1024 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 # lvextend -L +100G /dev/vg_monster/lv_root Extending logical volume lv_root to 215.00 GB Logical volume lv_root successfully resized LV(論理ボリューム)に合わせてファイルシステムをリサイズする。 # resize2fs /dev/vg_monster/lv_root resize2fs 1.41.4 (27-Jan-2009) Filesystem at /dev/vg_monster/lv_root is mounted on /; on-line resizing required old desc_blocks = 8, new_desc_blocks = 175 Performing an on-line resize of /dev/vg_monster/lv_root to 731409408 (4k) blocks. The filesystem on /dev/vg_monster/lv_root is now 731409408 blocks long. LV(論理ボリューム) の縮小# lvreduce -L -10G /dev/vg_monster/lv_root WARNING: Reducing active and open logical volume to 205.00 GB THIS MAY DESTROY YOUR DATA (filesystem etc.) Do you really want to reduce lv_root? [y/n]: y Reducing logical volume lv_root to 205.00 GB Logical volume lv_root successfully resized 特に明示されていない限り、本Wikiの内容は次のライセンスに従います: CC Attribution-Noncommercial-Share Alike 3.0 Unported
|
|
Copyright © 2007-2011 tomoyan.net 本ページのすべての商標と著作権はそれぞれの所有者に帰属します。 |
Powered by Geeklog ページ作成時間 0.25 秒 |