linux划分15G的扩展分区,Linux 分区备忘

fdisk -l

可以看到新加的硬盘

Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

这里唯一需要说明一下的是

主分区P+扩展分区E 个数最多4个

你最多只能有一个扩展分区 ( 扩展分区可以划出多个逻辑分区)

也就是说你最多可以有3个主分区一个扩展分区, 然后这个扩展分区可以划出多个逻辑区

扩展分区=逻辑区1+逻辑区2+逻辑区3

如果给一个20G的硬盘划分15G的扩展分区

然后第一次划分1G的逻辑分区, 剩余扩建全部划分给又一个逻辑分区将得到

Device     Boot   Start      End  Sectors Size Id Type

/dev/sdb1          2048 31459327 31457280  15G  5 Extended

/dev/sdb5          4096  2101247  2097152   1G 83 Linux

/dev/sdb6       2103296 31459327 29356032  14G 83 Linux

其中sdb1 不能被直接使用, 你甚至不能格式化它, 它只是下面sdb5和sdb6的总和

[root@localhost ~]# mkfs -t ext3 /dev/sdb1

mke2fs 1.42.13 (17-May-2015)

Found a dos partition table in /dev/sdb1

Proceed anyway? (y,n) y

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

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

or lower inode count (-N).

[root@localhost ~]# mkfs -t ext3 /dev/sdb5

mke2fs 1.42.13 (17-May-2015)

Creating filesystem with 262144 4k blocks and 65536 inodes

Filesystem UUID: 74a1a47a-b43d-4273-9528-e3048c99be63

Superblock backups stored on blocks:

32768, 98304, 163840, 229376

Allocating group tables: done

Writing inode tables: done

Creating journal (8192 blocks): done

Writing superblocks and filesystem accounting information: done

[root@localhost ~]# mkfs -t ext3 /dev/sdb6

mke2fs 1.42.13 (17-May-2015)

Creating filesystem with 3669504 4k blocks and 917504 inodes

Filesystem UUID: faabf431-b05e-4c98-9895-d26339371b37

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Allocating group tables: done

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值