博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CentOS ext4 磁盘分区 格式化 挂载
阅读量:5956 次
发布时间:2019-06-19

本文共 3083 字,大约阅读时间需要 10 分钟。

[root@appserver ~]# df -h /*查看现有分区情况*/

文件系统 容量 已用 可用 已用%% 挂载点
/dev/vda1 9.9G 8.2G 1.2G 88% /
tmpfs 3.9G 100K 3.9G 1% /dev/shm
/dev/sr0 368K 368K 0 100% /media/CDROM
[root@appserver ~]# fdisk -l /*查看现有DISK*/

Disk /dev/vda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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: 0x0003e85f

Device Boot Start End Blocks Id System

/dev/vda1 * 1 1306 10484736 83 Linux

Disk /dev/vdb: 214.7 GB, 214748364800 bytes

16 heads, 63 sectors/track, 416101 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

[root@appserver ~]# fdisk /dev/vdb /*用fdisk分区工具对磁盘分区*/

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x264c68f0.
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)
e
Partition number (1-4): 1
First cylinder (1-416101, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-416101, default 416101):
Using default value 416101

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.
[root@appserver ~]# fdisk -l

Disk /dev/vda: 10.7 GB, 10737418240 bytes

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

Device Boot Start End Blocks Id System

/dev/vda1 * 1 1306 10484736 83 Linux

Disk /dev/vdb: 214.7 GB, 214748364800 bytes

16 heads, 63 sectors/track, 416101 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x264c68f0

Device Boot Start End Blocks Id System

/dev/vdb1 1 416101 209714872+ 5 Extended

本篇文章来源于 Linux公社网站(www.linuxidc.com) 原文链接:http://www.linuxidc.com/Linux/2012-12/76839.htm

转载地址:http://ohexx.baihongyu.com/

你可能感兴趣的文章
day30 模拟ssh远程执行命令
查看>>
做错的题目——给Array附加属性
查看>>
Url.Action取消字符转义
查看>>
JQuery选择器大全
查看>>
HBase 笔记3
查看>>
java中通过绝对路径将图片存入数据库
查看>>
ConcurrentHashMap(Java8)源码分析
查看>>
Python文件处理之文件指针(四)
查看>>
Numpy用法详解
查看>>
DataGridView在vb.net中的操作技巧
查看>>
PMP考试冲刺进行中。。。
查看>>
大换血的代价
查看>>
RunLoop--
查看>>
chrome 2行换行省略号 ... text-ellipse
查看>>
C语言第四次作业
查看>>
Java学习-集合的理解
查看>>
iOS验证码倒计时(GCD实现)
查看>>
iOS中的过滤器和正则表达式(NSPredicate,NSRegularExpression)
查看>>
canvas和svg
查看>>
结对:复利美化版
查看>>