5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
知道命令之后就可以进行分区了
Command (m for help): p //打印分区信息,可以看到当前并没有分区
Disk /dev/sdc: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x45a3cadb
Device BootStartEndBlocksIdSystem
Command (m for help): n //创建一个新的分区
Command action
eextended//输入e为创建扩展分区
pprimary partition (1-4) //输入p为创建逻辑分区
p
Partition number (1-4): 1//划分逻辑分区
First cylinder (1-2610, default 1): //我这里直接回车,是不想把该磁盘分成多个分区,把整个磁盘作为1个分区
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-2610, default 2610):
Using default value 2610
Command (m for help): p //再次查看可以看到该磁盘已经有1个分区了
Disk /dev/sdc: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x45a3cadb
Device BootStartEndBlocksIdSystem
/dev/sdc11261020964793+83Linux
Command (m for help): w //保存分区
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
再次使用”fdisk -l”命令查看磁盘信息
Disk /dev/sdc: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x406a4c58
Device BootStartEndBlocksIdSystem
/dev/sdc11261020964793+83Linux
1
2
3
4
5
6
7
8
9
第三块磁盘/dev/sdc已经分区好了
五、格式化分区
[root@localhost ~]# mkfs.ext3 /dev/sdc1
//将/dev/sdc1格式化为ext3类型,好像大部分的磁盘都是格式化为ext3类型,具体为什么没有深入研究,暂时不清楚,想了解的朋友可以自己查一下
1
2
[root@localhost ~]# mkfs.ext3 /dev/sdc1
mke2fs 1.41.12 (17-May-2010)
文件系统标签=
操作系统:Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1310720 inodes, 5241198 blocks
262059 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=4294967296
160 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
正在写入inode表: 完成
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.Use tune2fs -c or -i to override.
推荐阅读
- 采耳视频素材直播,采耳视频播放
- 视频号的黑名单怎么去掉,视频号的黑名单是什么意思
- htmlstyle标签属性,style标签和style属性
- 汽车凝胶坐垫直播带货,汽车凝胶坐垫优缺点
- 进制转换代码java 进制转换代码c语言
- 微博的下载,微博的下载视频在哪
- 电脑顯卡怎么装,电脑显卡怎么装上去
- go语言学习数据 go语言实战
- 电脑版暴力迪吧怎么下载,暴力迪吧电脑游戏