[root@ecs-b15f ~]# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vda 253:0 0 40G 0 disk ââvda1 253:1 0 40G 0 part / vdb 253:16 0 10G 0 disk
3.磁盘分区
[root@ecs-b15f ~]# fdisk /dev/vdbWelcome to fdisk(util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table Building a new DOS disklabel with disk identifier 0xb7e5d6cb. Command (m forhelp): n Partition type: p primary (0 primary, 0 extended, 4free) e extended Select (default p): p Partition number (1-4, default 1): First sector (2048-20971519, default 2048): Using default value 2048Last sector, +sectors or +size{K,M,G}(2048-20971519, default 20971519): Using default value 20971519Partition 1 of type Linux and of size 10 GiB is setCommand (m forhelp): w The partition table has been altered!Calling ioctl() to re-read partition table. Syncing disks.
4.格式化磁盘
[root@ecs-b15f ~]# mkfs.ext4 /dev/vdb1mke2fs1.42.9 (28-Dec-2013)Filesystem label=OS type: Linux Block size=4096(log=2)Fragment size=4096(log=2)Stride=0 blocks, Stripe width=0 blocks 655360 inodes, 2621184 blocks 131059 blocks (5.00%) reserved for the super user First data block=0Maximum filesystem blocks=215167795280 block groups32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632Allocating group tables: doneWriting inode tables: doneCreating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: done