Device does not contain a recognized partition table 使用磁盘标识符 0xb714020b 创建新的 DOS 磁盘标签。
命令(输入 m 获取帮助):m 命令操作 a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition g create a new empty GPT partition table G create an IRIX (SGI) partition table l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only)
命令(输入 m 获取帮助):n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): p 分区号 (1-4,默认 1):1 起始 扇区 (2048-241172479,默认为 2048): 将使用默认值 2048 Last 扇区, +扇区 or +size{K,M,G} (2048-241172479,默认为 241172479): 将使用默认值 241172479 分区 1 已设置为 Linux 类型,大小设为 115 GiB
命令(输入 m 获取帮助):wq The partition table has been altered!
[root@demo ~]# mkfs.ext3 /dev/vdb1 mke2fs 1.42.9 (28-Dec-2013) 文件系统标签= OS type: Linux 块大小=4096 (log=2) 分块大小=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 7536640 inodes, 30146304 blocks 1507315 blocks (5.00%) reserved for the super user 第一个数据块=0 Maximum filesystem blocks=4294967296 920 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, 23887872
Allocating group tables: 完成 正在写入inode表: 完成 Creating journal (32768 blocks): 完成 Writing superblocks and filesystem accounting information: 完成
4. 挂载
这里演示挂载在/data下
1 2
[root@demo ~]# mkdir /data [root@demo ~]# mount /dev/vdb1 /data