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。
相关文章
- 运行python程序时出现错误“SyntaxError: Non-ASCII character 'xe8' in file variable.py on line 1, but no encod”
- Using Google Consent Mode to Adjust Tag Behavior Based on Consent
- Telnet shows blank screen on port 443 but TCP handshake not done 【openssl s_client -connect】
- 报错(未解决):Offset commit failed on partition xxx at offset 957: The coordinator is not aware of this member.
- Building Apache Thrift on CentOS 6.5
- sit on the fence
- Hands-On Learning Through Racing
- SPOJ QTREE Query on a tree
- 116Echarts - 热力图(Heatmap on Cartesian)
- 如何选择满足需求的SQL on Hadoop/Spark系统
- 使用git send-email报:Please install an MTA on this system if you want to use sendmail如何处理?
- Android Studio解决unspecified on project app resolves to an APK archive which is not supported
- 论文阅读:SkillMaN—A skill-based robotic manipulation framework based on perception and reasoning
- Deploy custom service on non hadoop node with Apache Ambari
- Error in v-on handler: “TypeError: this.$refs.popup.isShow is not a function“
- Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案
- Redis_MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk问题解决
- Vue3实践指南:Prettier代码格式化工具、格式化Vue出现单引号变双引号及分号问题、useRouter执行后undefined问题、Property 'value' does not exist on type 'HTMLElement'、error Unexpected mutation of “xxxx“ prop
- [ceph_deploy][ERROR ] ExecutableNotFound: Could not locate executable 'ceph-disk' make sure it is installed and available on ceph-node1
- Odoo16 SyntaxError: Failed to execute ‘querySelectorAll‘ on ‘Element‘: ‘footer:not(field footer)‘ is
- C和指针 (pointers on C)——第十二章:利用结构和指针
- Installing Windows Identity Foundation on Windows 8 - The Certificate for the signer of the message is invalid or not found.
- PHP Warning: date() [function.date]: It is not safe to rely on the system's timezone
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?