Linux 格式化扩展分区(Extended)

王朝学院·作者佚名  2016-05-26
窄屏简体版  字體: |||超大  

linux 格式化扩展分区(Extended) 2015-04-14 00:40 by 潇湘隐者, ... 阅读, ... 评论, 收藏, 编辑 如果你在Linux系统中格式化磁盘时遇到如下错误,那么表示你正在格式化一个扩展分区。

[root@GETTestLNX06 ~]# mkfs.ext4 /dev/sdb1

mke2fs 1.41.12 (17-May-2010)

mkfs.ext4: inode_size (128) * inodes_count (0) too big for a

filesystem with 0 blocks, specify higher inode_ratio (-i)

or lower inode count (-N).

直接格式化扩展分区是不允许的,只能格式化主分区和逻辑分区。那么那么应该如何格式化一个扩展分区呢,我们要么删除该扩展分区,创建一个主分区;要么在扩展分区上创建逻辑分区,如下操作所示1: 创建逻辑分区

[root@GETTestLNX06 ~]# fdisk /dev/sdb

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): p

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: 0xd61351c9

Device Boot Start End Blocks Id System

/dev/sdb1 1 13054 104856223+ 5 Extended

Command (m for help): n

Command action

l logical (5 or over)

p primary partition (1-4)

l

First cylinder (1-13054, default 1): 1

Last cylinder, +cylinders or +size{K,M,G} (1-13054, default 13054):

Using default value 13054

Command (m for help): p

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: 0xd61351c9

Device Boot Start End Blocks Id System

/dev/sdb1 1 13054 104856223+ 5 Extended

/dev/sdb5 1 13054 104856192 83 Linux

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

2:格式化逻辑分区

[root@GETTestLNX06 ~]# mkfs.ext4 /dev/sdb5

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

6553600 inodes, 26214048 blocks

1310702 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4294967296

800 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

Writing inode tables: done

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航