ボリュームグループの管理2010/06/03 |
[1] | ボリュームグループの作成 |
[root@ns ~]# vgcreate VZ /dev/sdb1 # ボリュームグループ 'VZ' を作成 Volume group "VZ" successfully created # 複数デバイスを指定するときは以下のようにスペース区切りで入力 [root@ns ~]# vgcreate VZ /dev/sdb1 /dev/sdd1 Volume group "VZ" successfully created |
[2] | ボリュームグループの表示 |
[root@ns ~]# vgdisplay --- Volume group --- VG Name VZ System ID Format lvm2 Metadata Areas 2 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 2 Act PV 2 VG Size 227.89 GB PE Size 4.00 MB Total PE 58339 Alloc PE / Size 0 / 0 Free PE / Size 58339 / 227.89 GB VG UUID AFGDj5-xi8k-e3JO-Sj0j-wVsx-pyA2-3MosMH
|
[3] | ボリュームグループの名前変更 |
[root@ns ~]# vgrename VZ RX-7 # 名前を 'VZ' から 'RX-7' に変更 Volume group "VZ" successfully renamed to "RX-7" [root@ns ~]# vgdisplay --- Volume group --- VG Name RX-7 # 変更された System ID Format lvm2 Metadata Areas 2 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 2 Act PV 2 VG Size 227.89 GB PE Size 4.00 MB Total PE 58339 Alloc PE / Size 0 / 0 Free PE / Size 58339 / 227.89 GB VG UUID AFGDj5-xi8k-e3JO-Sj0j-wVsx-pyA2-3MosMH
|
[4] | ボリュームグループのレポート出力 |
[root@ns ~]# vgs VG #PV #LV #SN Attr VSize VFree VZ 2 0 0 wz--n- 227.89G 227.89G Xen 2 35 0 wz--n- 227.06G 84.06GG |
[5] | ボリュームグループのスキャン |
[root@ns ~]# vgscan Reading all physical volumes. This may take a while... Found volume group "VZ" using metadata type lvm2 Found volume group "Xen" using metadata type lvm2 |
[6] | ボリュームグループの拡張 |
[root@ns ~]# vgdisplay --- Volume group --- VG Name VZ 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 153.38 GB PE Size 4.00 MB Total PE 39266 Alloc PE / Size 0 / 0 Free PE / Size 39266 / 153.38 GB VG UUID l4fisd-ke1o-E0HA-eICL-QuZN-jt30-652mC9 [root@ns ~]# vgextend VZ /dev/sdd1 # VZ に sdd1 の領域を追加 Volume group "VZ" successfully extended [root@ns ~]# vgdisplay --- Volume group --- VG Name VZ System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 2 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 2 Act PV 2 VG Size 227.89 GB PE Size 4.00 MB Total PE 58339 Alloc PE / Size 0 / 0 Free PE / Size 58339 / 227.89 GB VG UUID l4fisd-ke1o-E0HA-eICL-QuZN-jt30-652mC9 |
[7] | ボリュームグループの縮小 |
[root@ns ~]# vgreduce VZ /dev/sdd1 # VZ から sdd1 を削除 Removed "/dev/sdd1" from volume group "VZ" [root@ns ~]# vgdisplay --- Volume group --- VG Name VZ System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 3 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 153.38 GB PE Size 4.00 MB Total PE 39266 Alloc PE / Size 0 / 0 Free PE / Size 39266 / 153.38 GB VG UUID l4fisd-ke1o-E0HA-eICL-QuZN-jt30-652mC9
|
[8] | ボリュームグループの削除 |
[root@ns ~]# vgchange -a n VZ # まずは状態を無効にする 0 logical volume(s) in volume group "VZ" now active [root@ns ~]# vgremove VZ # VZ を削除 Volume group "VZ" successfully removed |
Sponsored Link |
|