码迷,mamicode.com
首页 > 其他好文 > 详细

记录一次LVM磁盘初始化

时间:2016-06-17 23:54:18      阅读:459      评论:0      收藏:0      [点我收藏+]

标签:

[root@cloud ~]# 

[root@cloud ~]# fdisk -l

Disk /dev/sdb: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00051f5f

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 1306 9972736 8e Linux LVM

Disk /dev/mapper/vg_cloud-lv_root: 8128 MB, 8128561152 bytes
255 heads, 63 sectors/track, 988 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_cloud-lv_swap: 2080 MB, 2080374784 bytes
255 heads, 63 sectors/track, 252 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

[root@cloud ~]#
[root@cloud ~]#
[root@cloud ~]# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created
[root@cloud ~]# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name vg_cloud
PV Size 9.51 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 2434
Free PE 0
Allocated PE 2434
PV UUID SS6KHH-VzrH-ecFS-QoYn-Ov0g-u4ZI-Pk4kXL

"/dev/sdb" is a new physical volume of "100.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdb
VG Name
PV Size 100.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID JOjFKJ-Q3tW-EYjb-vPDD-Nwpy-eP7B-eLrtYA

[root@cloud ~]# vgcreate vg_data01 /dev/sdb
Volume group "vg_data01" successfully created
[root@cloud ~]# vgdisplay
--- Volume group ---
VG Name vg_data01
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 MiB
Total PE 25599
Alloc PE / Size 0 / 0
Free PE / Size 25599 / 100.00 GiB
VG UUID 3lD5Zq-z13B-mrkZ-OY71-yVPb-8ovT-OSzBDP

--- Volume group ---
VG Name vg_cloud
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 9.51 GiB
PE Size 4.00 MiB
Total PE 2434
Alloc PE / Size 2434 / 9.51 GiB
Free PE / Size 0 / 0
VG UUID I5k6GO-mjni-7dO0-O4TF-RcFH-RNcI-bnCFY3

[root@cloud ~]# lvcreate -L 50G -n data_vol01
Please provide a volume group name
Run `lvcreate --help‘ for more information.
[root@cloud ~]# lvcreate -L 50G -n data_vol01 vg_data01
Logical volume "data_vol01" created
[root@cloud ~]# lvcreate -n log_vol01 vg_data01
Please specify either size or extents
Run `lvcreate --help‘ for more information.
[root@cloud ~]#
[root@cloud ~]# mkfs.ext4 /dev/vg_data01/data_vol01
mke2fs 1.41.12 (17-May-2010)
文件系统标签=
操作系统:Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
3276800 inodes, 13107200 blocks
655360 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=4294967296
400 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, 7962624, 11239424

正在写入inode表: 完成
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成

This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@cloud ~]#

记录一次LVM磁盘初始化

标签:

原文地址:http://www.cnblogs.com/longzhu/p/5595369.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!