まず -t を付けてテスト。-L がサイズの指定で -n が作成する lv の名前。最後に lv を作る vg を指定。

# lvcreate -tv -L2g -n lv001 vg001
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
    Test mode: Skipping archiving of volume group.
    Creating logical volume lv001
    Test mode: Skipping backup of volume group.
    Test mode: Skipping activation, zeroing and signature wiping.
  Logical volume "lv001" created.
    Test mode: Wiping internal cache
    Wiping internal VG cache

もし連続した領域を確保したいなら -Cy とか付けます。問題がなさそうなら -t を外して実行します。

#  lvcreate -v -L2g -n lv001 vg001
    Archiving volume group "vg001" metadata (seqno 57).
    Creating logical volume lv001
    Creating volume group backup "/etc/lvm/backup/vg001" (seqno 58).
    Activating logical volume "lv001".
    activation/volume_list configuration setting not defined: Checking only host tags for vg001/lv001.
    Creating vg001-lv001
    Loading vg001-lv001 table (253:33)
    Resuming vg001-lv001 (253:33)
    Wiping known signatures on logical volume "vg001/lv001"
    Initializing 4.00 KiB of logical volume "vg001/lv001" with value 0.
  Logical volume "lv001" created.


# lvs
  LV            VG          Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lv001         vg001       -wi-a-----  2.00g


  • wiki/linux/lvcreate
  • 最終更新: 2019/02/17 15:59