linux 8t硬盘分区,linux 磁盘分区

创建一个扩展分区:

[root@qing init.d]# 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):

Command (m for help): p

Disk /dev/sdb: 5368 MB, 5368709120 bytes

255 heads, 63 sectors/track, 652 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: 0x3c8b5df6

Device

Boot     Start        End     Blocks  Id System

Command (m for help): n

Command action

e  extended

p  primary partition (1-4)

e

Partition number (1-4): 1

First cylinder (1-652, default 1):

Using default value 1

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

652):

Using default value 652

Command (m for help): p

Disk /dev/sdb: 5368 MB, 5368709120 bytes

255 heads, 63 sectors/track, 652 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: 0x3c8b5df6

Device

Boot     Start        End     Blocks  Id System

/dev/sdb1              1        652    5237158+  5 Extended

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@qing init.d]#

格式化:

问题,扩展分区不能格式化,需要创建逻辑分区后格式化

[root@qing init.d]# mkfs -t ext3 /dev/sdb1

mke2fs 1.41.12 (17-May-2010)

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@qing init.d]#

创建逻辑分区:

1、查看分区信息

[root@qing init.d]# fdisk -l

Disk /dev/sda: 26.8 GB, 26843545600 bytes

255 heads, 63 sectors/track, 3263 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: 0x00062b86

Device

Boot     Start        End     Blocks  Id System

/dev/sda1  *          1         64     512000  83 Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2             64       3264   25701376  8e Linux LVM

Disk /dev/sdb: 5368 MB,

5368709120 bytes

255 heads, 63 sectors/track, 652 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: 0x3c8b5df6

Device

Boot     Start        End     Blocks  Id System

/dev/sdb1            1        652    5237158+  5 Extended

Disk /dev/mapper/vg_qing-lv_root: 24.2 GB, 24234688512 bytes

255 heads, 63 sectors/track, 2946 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

Disk /dev/mapper/vg_qing-lv_root doesn't contain a valid partition

table

Disk /dev/mapper/vg_qing-lv_swap: 2080 MB, 2080374784 bytes

255 heads, 63 sectors/track, 252 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

Disk /dev/mapper/vg_qing-lv_swap doesn't contain a valid partition

table

2、开始创建逻辑分区

[root@qing init.d]# 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):

Command (m for help): n

Command action

l  logical (5 or over)

p  primary partition (1-4)

l

First cylinder (1-652, default 1):

Using default value 1

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

652):

Using default value 652

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@qing init.d]#

3、查看创建的逻辑分区

[root@qing init.d]# fdisk

-l

Disk /dev/sda: 26.8 GB, 26843545600 bytes

255 heads, 63 sectors/track, 3263 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: 0x00062b86

Device

Boot     Start        End     Blocks  Id System

/dev/sda1  *          1         64     512000  83 Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2             64       3264   25701376  8e Linux LVM

Disk /dev/sdb: 5368 MB, 5368709120 bytes

255 heads, 63 sectors/track, 652 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: 0x3c8b5df6

Device

Boot     Start        End     Blocks  Id System

/dev/sdb1              1        652    5237158+  5 Extended

/dev/sdb5           1        652    5237127  83 Linux

Disk /dev/mapper/vg_qing-lv_root: 24.2 GB, 24234688512 bytes

255 heads, 63 sectors/track, 2946 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

Disk /dev/mapper/vg_qing-lv_root doesn't contain a valid partition

table

Disk /dev/mapper/vg_qing-lv_swap: 2080 MB, 2080374784 bytes

255 heads, 63 sectors/track, 252 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

Disk /dev/mapper/vg_qing-lv_swap doesn't contain a valid partition

table

4、格式化分区

[root@qing init.d]# mkfs -t ext3 /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

327680 inodes, 1309281 blocks

65464 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=1342177280

40 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

Writing inode tables:

done

Creati

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值