Partition does not start on physical sector boundary

今天给一块硬盘分区,用fdisk按照默认步骤执行,遇到这个问题:

[root@bogon ~]# fdisk /dev/sdf
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x59c8eb29.
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): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-121597, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-121597, default 121597):
Using default value 121597

Command (m for help): p

Disk /dev/sdf: 1000.2 GB, 1000171331584 bytes
255 heads, 63 sectors/track, 121597 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disk identifier: 0x59c8eb29

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1      121597   976727871   83  Linux
Partition 1 does not start on physical sector boundary.

在网上搜了一圈,说是逻辑扇区与物理扇区的大小不一样的原因。可是我这机器的逻辑扇区与物理扇区的大小是一样的啊

Sector size (logical/physical): 512 bytes / 512 bytes

好在还是找到了解决办法。办法有两种,一是按u切换到以扇区为单位,二是按c关闭dos兼容模式。前者最简单,如下:

[root@bogon ~]# fdisk /dev/sdf
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xc466de3d.
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): u
Changing display/entry units to sectors

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First sector (63-1953459631, default 512):
Using default value 512
Last sector, +sectors or +size{K,M,G} (512-1953459631, default 1953459631):
Using default value 1953459631

Command (m for help): p

Disk /dev/sdf: 1000.2 GB, 1000171331584 bytes
255 heads, 63 sectors/track, 121597 cylinders, total 1953459632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes
Disk identifier: 0xc466de3d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1             512  1953459631   976729560   83  Linux

Command (m for help):

注意到fdisk给出的默认起始扇区是512,按这个值生成的分区是对齐的。我们可以算出物理扇区大小应该是512*512=262144,为毛显示成512呢?

Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 262144 bytes / 262144 bytes

仔细一看,I/O size显示的正好是262144。这么说物理扇区大小显示错了?不解。这个系统是64位Redhat6.4。

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值