# vgdisplay /***空き容量があることとボリュームグループ名を確認***/
--- Volume group ---
VG Name vg_centos6
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 2
Act PV 2
VG Size 2.05 TiB
PE Size 4.00 MiB
Total PE 536424
Alloc PE / Size 62053 / 242.39 GiB
Free PE / Size 474371 / 1.81 TiB
VG UUID l7l1Qm-1a6k-aLuo-f6as-Ad9W-fKUb-rlSp0Q
# lvcreate -L 20G /dev/vg_centos6 /***論理ボリュームを作成。lvol0が新規作成される***/
Logical volume "lvol0" created.
# lvdisplay /***論理ボリュームlvol0が作成されていることを確認***/
--- Logical volume ---
LV Path /dev/vg_centos6/lv_root
LV Name lv_root
VG Name vg_centos6
LV UUID 0GHTft-n48J-prcX-hV1O-fZ1R-ZlL2-dvdAWG
LV Write Access read/write
LV Creation host, time centos6, 2015-12-05 22:27:49 +0900
LV Status available
# open 1
LV Size 60.00 GiB
Current LE 15360
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Path /dev/vg_centos6/lv_home
LV Name lv_home
VG Name vg_centos6
LV UUID F6FT0Y-TKse-zeMy-dEwc-JBMW-66fG-x9GxGW
LV Write Access read/write
LV Creation host, time centos6, 2015-12-05 22:28:16 +0900
LV Status available
# open 1
LV Size 176.58 GiB
Current LE 45205
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
--- Logical volume ---
LV Path /dev/vg_centos6/lv_swap
LV Name lv_swap
VG Name vg_centos6
LV UUID 9OSVwv-wmEa-CYcA-aYn0-q3Br-0CmH-tUliqW
LV Write Access read/write
LV Creation host, time centos6, 2015-12-05 22:29:42 +0900
LV Status available
# open 1
LV Size 5.81 GiB
Current LE 1488
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
--- Logical volume ---
LV Path /dev/vg_centos6/lvol0
LV Name lvol0
VG Name vg_centos6
LV UUID aeIEuE-jj2a-pDTV-N2pL-BCSG-W8e5-NX3gw7
LV Write Access read/write
LV Creation host, time centos6, 2016-03-24 12:18:36 +0900
LV Status available
# open 0
LV Size 20.00 GiB
Current LE 5120
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3
# mkfs -t ext3 /dev/vg_centos6/lvol0 /***作成した論理ボリュームに対してファイルシステムを作成***/
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=1 blocks, Stripe width=0 blocks
1310720 inodes, 5242880 blocks
262144 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
160 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: dodone
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
# mount /dev/vg_centos6/lvol0 /var /***論理ボリュームを/varにマウント***/
# df -h /***/varに空き容量があることを確認***/
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_centos6-lv_root
59G 59G 0 100% /
tmpfs 2.9G 80K 2.9G 1% /dev/shm
/dev/sda1 477M 142M 310M 32% /boot
/dev/mapper/vg_centos6-lv_home
174G 61M 165G 1% /home
/dev/mapper/vg_centos6-lvol0
20G 173M 19G 1% /var
# echo /dev/vg_centos6/lvol0 /var ext3 defaults 1 1 >> /etc/fstab /***再起動後もマウントされる状態にする***/
参考:論理ボリューム追加
0 件のコメント:
コメントを投稿