- [root@localhost /]# fdisk -l
- Disk /dev/xvdb: 429.5 GB, 429496729600 bytes
- 255 heads, 63 sectors/track, 52216 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@localhost /]# fdisk /dev/xvdb
- Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
- Building a new DOS disklabel with disk identifier 0x7f095069.
- Changes will remain in memory only, until you decide to write them.
- After that, of course, the previous content won't be recoverable.
- Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
- WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
- switch off the mode (command 'c') and change display units to
- sectors (command 'u').
- Command (m for help): n 输入n进行分区
- Command action
- e extended
- p primary partition (1-4)
- p 输入p为主分区,e为逻辑分区
- Partition number (1-4): 1 (由于是新盘我们输入1来分第一个主分区,共可以分4个主分区)
- First cylinder (1-52216, default 1): 1 (选择该分区的起始磁盘数,如无特殊需求强烈建议选择默认,也就是1来分区(可直接按回车))
- Last cylinder or +size or +sizeM or +sizeK (1-52216, default 52216):
- 定义该分区的大小,如果按默认(按回车)即是使用全部可用存储额,如分一个1G的空间,输入+1024m
- Using default value 52216
- Command (m for help): w 写入分区
- The partition table has been altered!
- Calling ioctl() to re-read partition table.
- Syncing disks.
- [root@localhost /]#
- fdisk -l
- Disk /dev/xvdb: 429.5 GB, 429496729600 bytes
- 255 heads, 63 sectors/track, 52216 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: 0x90b7ee49
- Device Boot Start End Blocks Id System
- /dev/xvdb1 1 52216 419424988+ 83 Linux
新闻热点
疑难解答
图片精选