复制代码代码如下: [root@localhost ~]# fdisk /dev/hdc#分区时,不要加上数字 The number of cylinders for this disk is set to 5005. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) 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#改变分区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/hdc: 41.1 GB, 41174138880 bytes#磁盘名称和大小 255 heads, 63 sectors/track, 5005 cylinders#磁头、磁区与磁柱数量,多少 Units = cylinders of 16065 * 512 = 8225280 bytes #每个磁柱的大小 Device BootStart EndBlocks IdSystem /dev/hdc1 * 113104391 83Linux /dev/hdc214128810241437+83Linux /dev/hdc312891925 5116702+83Linux /dev/hdc419265005247401005Extended /dev/hdc519262052 1020096 82Linux swap / Solaris Command (m for help): q # q是不保存退出,w不要随便输入
例c,-c 以柱面显示
复制代码代码如下: [root@server7 ~]# fdisk -cl /dev/vdb Disk /dev/vdb: 8589 MB, 8589934592 bytes 16 heads, 63 sectors/track, 16644 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: 0xce720981 Device BootStart EndBlocks IdSystem /dev/vdb1 3 206102400 83Linux /dev/vdb2 206 409102400 83Linux /dev/vdb3 409 612102400 83Linux [root@server7 ~]# fdisk -ul /dev/vdb Disk /dev/vdb: 8589 MB, 8589934592 bytes 16 heads, 63 sectors/track, 16644 cylinders, total 16777216 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xce720981 Device BootStart EndBlocks IdSystem /dev/vdb12048206847102400 83Linux Partition 1 does not end on cylinder boundary. /dev/vdb2206848411647102400 83Linux Partition 2 does not end on cylinder boundary. /dev/vdb3411648616447102400 83Linux Partition 3 does not end on cylinder boundary.