[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 bytes255 heads, 63 sectors/track, 1305 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0003e85fDevice Boot Start End Blocks Id System
/dev/vda1 * 1 1306 10484736 83 LinuxDisk /dev/vdb: 214.7 GB, 214748364800 bytes
16 heads, 63 sectors/track, 416101 cylindersUnits = cylinders of 1008 * 512 = 516096 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000[root@appserver ~]# fdisk /dev/vdb /*用fdisk分区工具对磁盘分区*/
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding 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)ePartition number (1-4): 1First cylinder (1-416101, default 1): Using default value 1Last cylinder, +cylinders or +size{K,M,G} (1-416101, default 416101): Using default value 416101Command (m for help): w
The partition table has been altered!Calling ioctl() to re-read partition table.
Syncing disks.[root@appserver ~]# fdisk -lDisk /dev/vda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0003e85fDevice Boot Start End Blocks Id System
/dev/vda1 * 1 1306 10484736 83 LinuxDisk /dev/vdb: 214.7 GB, 214748364800 bytes
16 heads, 63 sectors/track, 416101 cylindersUnits = cylinders of 1008 * 512 = 516096 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x264c68f0Device 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