[root@centos7 ~]# uname -a
Linux centos7.example.com 3.10.0-327.el7.i686 #
[root@centos7 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
cl_centos7 1 2 0 wz--n- 19.51g 40.00m
[root@centos7 ~]# lvcreate -L 10M -n vol01 cl_centos7
Rounding up size to full physical extent 12.00 MiB
Logical volume "vol01" created.
[root@centos7 ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root cl_centos7 -wi-ao---- 17.47g
swap cl_centos7 -wi-ao---- 2.00g
vol01 cl_centos7 -wi-a----- 12.00m
[root@centos7 ~]# mkdir /devops01
[root@centos7 ~]# mkfs.ext4 /dev/cl_centos7/vol01
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
3072 inodes, 12288 blocks
614 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=12582912
2 block groups
8192 blocks per group, 8192 fragments per group
1536 inodes per group
Superblock backups stored on blocks:
8193
Allocating group tables: done
Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done
[root@centos7 ~]# mount /dev/cl_centos7/vol01 /devops01/
[root@centos7 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl_centos7-root 18G 4.7G 13G 27% /
/dev/mapper/cl_centos7-vol01 11M 204K 9.6M 3% /devops01
No comments:
Post a Comment