硬盘警告:partition X does not end on cylinder boundary,字面意思是:分区X并没有在柱面边缘结束,所以可能意味着数据分区被覆盖的危险,因此会显示硬盘警告。
[root@localhost svn]# fdisk -l
Disk /dev/cciss/c0d0: 146.8 GB, 146778685440 bytes
255 heads, 32 sectors/track, 35132 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0009b2d4
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 126 512000 83 Linux
<span style="font-size:18px;color:#ff0000;"><strong>Partition 1 does not end on cylinder boundary.</strong></span>
/dev/cciss/c0d0p2 126 35132 142825536 83 Linux
Disk /dev/mapper/VolGroup-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 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: 0x00000000
Disk /dev/mapper/VolGroup-lv_swap: 8388 MB, 8388608000 bytes
255 heads, 63 sectors/track, 1019 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: 0x00000000
Disk /dev/mapper/VolGroup-lv_home: 84.2 GB, 84175486976 bytes
255 heads, 63 sectors/track, 10233 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: 0x00000000
其实这是因为 This was a bit disconcerting at first, but after a few minutes of thinking it dawned on me that modern systems use LBA (Logical Block Addressing) instead of CHS (Cylinder/Head/Sector) to address disk drives. If we view the partition table using sectors instead of cylinders:
翻译下来就是:“现代操作系统使用LBA(Logical Block Addressing) 而不是CHS (Cylinder/Head/Sector)来记录硬盘分区”,如果不用柱面(Cylinder)而用扇区(Sector)来看,一切就正常了!
在fdisk指令用使用“u”命令,将用扇区代替柱面来显示,然后再按“p”,就会发现在扇区上其实并不重叠,如下:那么这个硬盘警告就可以排除了:
[root@localhost svn]# fdisk -u -l
Disk /dev/cciss/c0d0: 146.8 GB, 146778685440 bytes
255 heads, 32 sectors/track, 35132 cylinders, total 286677120 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: 0x0009b2d4
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 2048 1026047 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/cciss/c0d0p2 1026048 286677119 142825536 83 Linux
Disk /dev/mapper/VolGroup-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders, total 104857600 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: 0x00000000
Disk /dev/mapper/VolGroup-lv_swap: 8388 MB, 8388608000 bytes
255 heads, 63 sectors/track, 1019 cylinders, total 16384000 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: 0x00000000
Disk /dev/mapper/VolGroup-lv_home: 84.2 GB, 84175486976 bytes
255 heads, 63 sectors/track, 10233 cylinders, total 164405248 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: 0x00000000
也可以使用这个命令查看:
[root@localhost svn]# sfdisk -uS -l
Disk /dev/cciss/c0d0: 35132 cylinders, 255 heads, 32 sectors/track
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/cciss/c0d0p1 * 2048 1026047 1024000 83 Linux
start: (c,h,s) expected (0,64,1) found (0,32,33)
end: (c,h,s) expected (125,188,32) found (63,221,30)
/dev/cciss/c0d0p2 1026048 286677119 285651072 83 Linux
/dev/cciss/c0d0p3 0 - 0 0 Empty
/dev/cciss/c0d0p4 0 - 0 0 Empty
Disk /dev/mapper/VolGroup-lv_root: 6527 cylinders, 255 heads, 63 sectors/track
Disk /dev/mapper/VolGroup-lv_swap: 1019 cylinders, 255 heads, 63 sectors/track
Disk /dev/mapper/VolGroup-lv_home: 10233 cylinders, 255 heads, 63 sectors/track