Linux硬盘分区

[root@com Desktop]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x75e69255.
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): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition’s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-13054, default 1): 1
Last cylinder, +cylinders or +size{K,M,G} (1-13054, default 13054): +15G

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition’s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

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

Device Boot Start End Blocks Id System
/dev/sdb1 1 1959 15735636 83 Linux

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (1960-13054, default 1960):
Using default value 1960
Last cylinder, +cylinders or +size{K,M,G} (1960-13054, default 13054): +15G

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

Device Boot Start End Blocks Id System
/dev/sdb1 1 1959 15735636 83 Linux
/dev/sdb2 1960 3918 15735667+ 83 Linux

Command (m for help): n
Command action
e extended
p primary partition (1-4)
e
Partition number (1-4): 3
First cylinder (3919-13054, default 3919):
Using default value 3919
Last cylinder, +cylinders or +size{K,M,G} (3919-13054, default 13054):
Using default value 13054

Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (3919-13054, default 3919):
Using default value 3919
Last cylinder, +cylinders or +size{K,M,G} (3919-13054, default 13054): +15G

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

Device Boot Start End Blocks Id System
/dev/sdb1 1 1959 15735636 83 Linux
/dev/sdb2 1960 3918 15735667+ 83 Linux
/dev/sdb3 3919 13054 73384920 5 Extended
/dev/sdb5 3919 5877 15735636 83 Linux

Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l
First cylinder (5878-13054, default 5878):
Using default value 5878
Last cylinder, +cylinders or +size{K,M,G} (5878-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: 0x75e69255

Device Boot Start End Blocks Id System
/dev/sdb1 1 1959 15735636 83 Linux
/dev/sdb2 1960 3918 15735667+ 83 Linux
/dev/sdb3 3919 13054 73384920 5 Extended
/dev/sdb5 3919 5877 15735636 83 Linux
/dev/sdb6 5878 13054 57649221 83 Linux

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition’s system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
You have new mail in /var/spool/mail/root
[root@com Desktop]# mkfs.ext4 /dev/sdb5
mke2fs 1.41.12 (17-May-2010)
文件系统标签=
操作系统:Linux
块大小=4096 (log=2)
分块大小=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
983488 inodes, 3933909 blocks
196695 blocks (5.00%) reserved for the super user
第一个数据块=0
Maximum filesystem blocks=4030726144
121 block groups
32768 blocks per group, 32768 fragments per group
8128 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

正在写入inode表: 完成
Creating journal (32768 blocks): 完成
Writing superblocks and filesystem accounting information: 完成

This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@com Desktop]# mount /dev/sdb5 /mnt
[root@com Desktop]# vi /etc/fstab
这里写图片描述
[root@com Desktop]# df -h
文件系统 容量 已用 可用 已用%% 挂载点
/dev/sda3 46G 3.2G 40G 8% /
tmpfs 935M 224K 935M 1% /dev/shm
/dev/sda1 291M 37M 240M 14% /boot
/dev/sr0 4.1G 4.1G 0 100% /media/CentOS_6.4_Final
/dev/sdb5 15G 166M 14G 2% /mnt
[root@com Desktop]#

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值