本文主要是介绍centos 6.4 fdisk分区、格式化、挂载新硬盘,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1、# fdisk -l
查看当前磁盘信息,就会发现最下面显示新加入的硬盘不是有效分区,如下:
[root@mfsdata02 ~]# fdisk -l
Disk /dev/sda: 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 / 512bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000601be
DeviceBoot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 91 524288 82 Linux swap / Solaris
Partition 2 does not end on cylinder boundary.
/dev/sda3 91 1306 9755648 83 Linux
Disk /dev/sdb: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
2、# fdisk /dev/sdb
对新硬盘分区,并根据提示进一步操作:
[root@mfsdata02 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partitiontable, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier0x0467cb4f.
Changes will remain in memory only, until youdecide to write them.
After that, of course, the previous content won'tbe recoverable.
Warning: invalid flag 0x0000 of partition table 4will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It'sstrongly recommended to
switch off the mode (command 'c')
这篇关于centos 6.4 fdisk分区、格式化、挂载新硬盘的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!