もうパーティションの開始アドレスとかを気にしなくても良くなるLVMを試してみた。
LVMは物理ボリュームをグローバルボリュームとしてまとめ、論理ボリュームとして切り出して使うイメージだ。 これの使い道はkvmのディスク等いろいろ使えそう PV(=物理ボリューム) ⊆ GV(=グローバルボリューム) ⊇ LV(論理ボリューム)(1)物理ボリュームを作成 ※lvmに使うパーティションはpartedでset n lvm onをしておく。 # pvcreate /dev/sda1(2)ボリュームグループを作成 # vgcreate VG_SDA /dev/sda1(3)論理ボリュームを作成 # lvcreate -L 40G -n home.cur VG_SDA確認例 # vgdisplay -v --- Volume group --- VG Name VG_SDA System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 6 VG Access read/write VG Status resizable MAX LV 0 Cur LV 4 Open LV 3 Max PV 0 Cur PV 1 Act PV 1 VG Size <1.82 TiB PE Size 4.00 MiB Total PE 476932 Alloc PE / Size 111216 / <434.44 GiB Free PE / Size 365716 / <1.40 TiB VG UUID GKpSTs-Mwtn-KBYo-ieDQ-XhFa-3ZVh-oY8x5G --- Logical volume --- LV Path /dev/VG_SDA/home.cur LV Name home.cur VG Name VG_SDA LV UUID MRDH1I-KKj7-YcVO-ztDI-bfcO-I8yz-eh6GOv LV Write Access read/write LV Creation host, time pc001, 2018-12-02 19:06:34 +0900 LV Status available # open 1 LV Size 40.00 GiB Current LE 10240 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Logical volume --- LV Path /dev/VG_SDA/win10.img LV Name win10.img VG Name VG_SDA LV UUID EEdeJ1-SZWa-YaqP-SJLK-vd4n-wVjh-ASrj85 LV Write Access read/write LV Creation host, time pc001, 2018-12-08 08:10:55 +0900 LV Status available # open 0 LV Size <94.44 GiB Current LE 24176 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 --- Logical volume --- LV Path /dev/VG_SDA/work LV Name work VG Name VG_SDA LV UUID Z3vbrP-G9sc-7OLk-oTsV-CheY-Wy45-QT6z1b LV Write Access read/write LV Creation host, time pc001, 2018-12-08 08:13:21 +0900 LV Status available # open 1 LV Size 200.00 GiB Current LE 51200 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:2 --- Logical volume --- LV Path /dev/VG_SDA/win_work.img LV Name win_work.img VG Name VG_SDA LV UUID 5AC5rm-eo20-jNL3-b9XH-BfFe-yusp-adobt8 LV Write Access read/write LV Creation host, time pc001, 2018-12-08 10:43:29 +0900 LV Status available # open 1 LV Size 100.00 GiB Current LE 25600 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:3 --- Physical volumes --- PV Name /dev/sda1 PV UUID 4QkoE0-5YNL-LOi7-qwci-jJE6-yAvh-8fnv0Q PV Status allocatable Total PE / Free PE 476932 / 365716 PR |
|
忍者ブログ [PR] |