linux CentOS/redhat 6.5 LVM分区如何使用( 二 )


Disk identifier: 0x00000000
[root@cn-iss-install-01 ~]#
[root@cn-iss-install-01 Packages]# pvcreate /dev/sdb1
Writing physical volume data to disk "/dev/sdb1"
Physical volume "/dev/sdb1" successfully created
[root@cn-iss-install-01 Packages]#
[root@cn-iss-install-01 Packages]# vgcreate vg03 /dev/sdb1
Volume group "vg03" successfully created
[root@cn-iss-install-01 Packages]# lvcreate -L 83G -n vgdata vg03
[root@cn-iss-install-01 Packages]# mke2fs /dev/vg03/vgdata
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
5439488 inodes, 21757952 blocks
1087897 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
664 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, 20480000
Writing inode tables: done
Writing superblocks and filesystem accounting information:
done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@cn-iss-install-01 Packages]#
[root@cn-iss-install-01 Packages]#
[root@cn-iss-install-01 Packages]# mkf
mkfifo mkfs.cramfs mkfs.ext3 mkfs.ext4dev
mkfs mkfs.ext2 mkfs.ext4
[root@cn-iss-install-01 Packages]# mkfs.ext4 /dev/vg03/vgdata
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
5439488 inodes, 21757952 blocks
1087897 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
664 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, 20480000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@cn-iss-install-01 Packages]#
[root@cn-iss-install-01 spool]# mount /dev/vg03/vgdata /var/spool/repo/
[root@cn-iss-install-01 spool]# cd repo/
[root@cn-iss-install-01 repo]# ls
lost+found
[root@cn-iss-install-01 repo]# pwd
/var/spool/repo
[root@cn-iss-install-01 repo]#
3,常用检查命令:
[root@cn-iss-install-01 /]# pvdisplay
[root@cn-iss-install-01 /]# vgdisplay
[root@cn-iss-install-01 /]# lvdisplay
[root@cn-iss-install-01 /]# pvcreate
Please enter a physical volume path
Run `pvcreate --help' for more information.
[root@cn-iss-install-01 /]# vgcreate
Please provide volume group name and physical volumes
Run `vgcreate --help' for more information.
[root@cn-iss-install-01 /]# lvcreate
Please provide a volume group name
Run `lvcreate --help' for more information.
[root@cn-iss-install-01 /]# vgextend
Please enter volume group name and physical volume(s)
Run `vgextend --help' for more information.
[root@cn-iss-install-01 /]# lvextend
Please specify either size or extents but not both.
Run `lvextend --help' for more information.
【linux CentOS/redhat 6.5 LVM分区如何使用】[root@cn-iss-install-01 /]#

推荐阅读