CentOS 5
Sponsored Link

物理ボリュームの管理2008/08/15

[1] 物理ボリュームの作成
[root@dlp ~]#
pvcreate /dev/sdb1
   
# 物理ボリューム作成

  Physical volume "/dev/sdb1" successfully created
# 容量指定するときは以下のように入力

[root@dlp ~]#
pvcreate --setphysicalvolumesize 50G /dev/sdb1

  Physical volume "/dev/sdb1" successfully created
[2] 物理ボリュームの状態表示
[root@dlp ~]#
pvdisplay /dev/sdb1

  --- NEW Physical volume ---
  PV Name
/dev/sdb1

  VG Name
  PV Size
50.00 GiB

  Allocatable
NO

  PE Size (KByte)
0

  Total PE
0

  Free PE
0

  Allocated PE
0

  PV UUID
hPjJK2-tEgt-RztW-CLLH-NYR3-4t4a-hNt6qT

[3] 物理ボリュームのサイズ変更
# 物理ボリュームを100Gに変更

[root@dlp ~]#
pvresize --setphysicalvolumesize 100G /dev/sdb1

  Physical volume "/dev/sdb1" changed
  1 physical volume(s) resized / 0 physical volume(s) not resized
[root@dlp ~]#
pvdisplay /dev/sdb1

  --- NEW Physical volume ---
  PV Name
/dev/sdb1

  VG Name
  PV Size
100.00 GB

  Allocatable
NO

  PE Size (KByte)
0

  Total PE
0

  Free PE
0

  Allocated PE
0

  PV UUID
hPjJK2-tEgt-RztW-CLLH-NYR3-4t4a-hNt6qT

[4] 物理ボリュームのレポート出力
[root@dlp ~]#
pvs /dev/sdb1

  PV     VG     Fmt     Attr     PSize     PFree
  /dev/sdb1     lvm2     a-     100.00G     100.00G
[5] 物理ボリュームのスキャン
[root@dlp ~]#
pvscan /dev/sdb1

  PV     /dev/sda2     vg_dlp     lvm2 [29.51 GiB / 0 free]
  PV     /dev/sdb1     lvm2 [100.00 GiB]
  Total: 2 [44.51 GiB] / in use: 1 [29.51 GiB] / in no VG: 1 [100.00 GiB]
[6] 物理ボリュームの削除
[root@dlp ~]#
pvremove /dev/sdb1

  Labels on physical volume "/dev/sdb1" successfully wiped
[root@dlp ~]#
pvdisplay /dev/sdb1

  No physical volume label read from /dev/sdb1
  Failed to read physical volume "/dev/sdb1"
関連コンテンツ