ボリュームグループの管理2008/08/15 |
[1] | ボリュームグループの作成 |
[root@dlp ~]#
vgcreate vg_dlp /dev/sdb1 # ボリュームグループ 'vg_dlp' を作成 Volume group "vg_dlp" successfully created # 複数デバイスを指定するときは以下のようにスペース区切りで入力 [root@dlp ~]# vgcreate VZ /dev/sdb1 /dev/sdd1 Volume group "vg_dlp" successfully created |
[2] | ボリュームグループの表示 |
[root@dlp ~]# vgdisplay --- Volume group --- VG Name vg_dlp 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 100.00 GiB PE Size 4.00 MB Total PE 25599 Alloc PE / Size 0 / 0 Free PE / Size 25599 / 100.00 GiB VG UUID eoFugC-cEfQ-0qeq-xMuu-yynx-wZA0-qTMt3x
|
[3] | ボリュームグループの名前変更 |
[root@dlp ~]#
Volume group "vg_dlp" successfully renamed to "vg_data"vgrename vg_dlp vg_data # 名前を 'vg_dlp' から 'vg_data' に変更 [root@dlp ~]# vgdisplay --- Volume group --- VG Name vg_data 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 100.00 GiB PE Size 4.00 MB Total PE 25599 Alloc PE / Size 0 / 0 Free PE / Size 25599 / 100.00 GiB VG UUID eoFugC-cEfQ-0qeq-xMuu-yynx-wZA0-qTMt3x
|
[4] | ボリュームグループのレポート出力 |
[root@dlp ~]# vgs VG #PV #LV #SN Attr VSize VFree vg_data 1 0 0 wz--n- 100.00g 100.00g vg_dlp 1 3 0 wz--n- 29.51g 0 |
[5] | ボリュームグループのスキャン |
[root@dlp ~]# vgscan Reading all physical volumes. This may take a while... Found volume group "vg_data" using metadata type lvm2 Found volume group "vg_dlp" using metadata type lvm2 |
[6] | ボリュームグループの拡張 |
[root@dlp ~]# vgextend vg_data /dev/sdc1 # vg_data に sdc1 の領域を追加 Volume group "vg_data" successfully extended [root@dlp ~]# vgdisplay --- Volume group --- VG Name vg_data System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 4 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 199.99 GiB PE Size 4.00 MB Total PE 51198 Alloc PE / Size 0 / 0 Free PE / Size 51198 / 199.99 GiB VG UUID eoFugC-cEfQ-0qeq-xMuu-yynx-wZA0-qTMt3x
|
[7] | ボリュームグループの縮小 |
[root@dlp ~]# vgreduce vg_data /dev/sdc1 # vg_data から sdc1 を削除 Removed "/dev/sdd1" from volume group "vg_data" [root@dlp ~]# vgdisplay --- Volume group --- VG Name vg_data System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 5 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 100.00 GiB PE Size 4.00 MB Total PE 25599 Alloc PE / Size 0 / 0 Free PE / Size 25599 / 100.00 GiB VG UUID eoFugC-cEfQ-0qeq-xMuu-yynx-wZA0-qTMt3x
|
[8] | ボリュームグループの削除 |
[root@dlp ~]# vgchange -a n vg_data # まずは状態を無効にする 0 logical volume(s) in volume group "vg_data" now active [root@dlp ~]# vgremove vg_data # vg_data を削除 Volume group "vg_data" successfully removed |
Sponsored Link |