今天给一块硬盘分区,用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。

Partition does not start on physical sector boundary的更多相关文章

  1. 【解决办法--实测可行】Partition 1 does not start on physical sector boundary.

    新的硬盘使用fdisk进行划分的时候有提示Partition 1 does not start on physical sector boundary.后面按网上找的办法,在fdisk进行分区的时候, ...

  2. Partition 1 does not start on physical sector boundary.分区信息不正常

    [root@v1 ~]# df -h Filesystem      Size  Used Avail Use% Mounted on /dev/sda2        20G  3.3G   16G ...

  3. Ubuntu 针对 SSD 的优化方案

    . . . . . 首先看下 LZ 的分区情况: >$ sudo fdisk -l Disk /dev/sda: bytes heads, sectors/track, cylinders, t ...

  4. 解决grub引导错误的一次经历

    我的电脑上一共是两块硬盘,1块固态硬盘(sda)装了win7,另外一块普通硬盘(sdb)装了ubuntu和centos两个系统,系统启动的引导是装在sdb上面的ubuntu的grub2,它负责选择不同 ...

  5. Linux 增量系统备份和部分还原策略

    . . . . . 完全用 Linux 已经有快半年的时间了,一直想要全盘备份一下数据,但是却一直没有做,为什么呢? 一方面是东西比较多,备份一次要很长的时间:另一方面是一直在纠结用哪种方式备份比较好 ...

  6. Linux查看硬件信息命令

    一.查看服务器硬件信息 (1)查看服务器型号.序列号 [root@Master ~]# dmidecode|grep "System Information" -A9|egrep  ...

  7. ubuntu 备忘

    卷组扩容 Linux mint采用默认卷组的安装方式 sain@Linux ~ $ df -hl Filesystem Size Used Avail Use% Mounted on udev .7G ...

  8. 在linux下新增一块硬盘的操作。(包含大于2T的硬盘在linux下挂载操作)

    转自:http://blog.csdn.net/season_hangzhou/article/details/36423223 一.安装硬盘到物理机上. 二.查看硬盘是否正确安装. 使用“fdisk ...

  9. hp raid配置

    http://www.cnblogs.com/zhangxinglong/p/5585139.html [root@192e168e100e27 ~]# fdisk -l Disk /dev/nvme ...

随机推荐

  1. [kata]数值内3和5的倍数的总和求解

    这个题是这样的,方法参数接受一个数值,以3,5为基数,返回小于这个参数的3,5的倍数,加上3,5本身总和. 朋友段帅说头疼,估计是天气原因吧,好起来吧,还得战斗呢.

  2. LightOJ 1030 Discovering Gold (期望)

    https://vjudge.net/problem/LightOJ-1030 题意: 在一个1×N的格子里,每个格子都有相应的金币数,走到相应格子的话,就会得到该格子的金币. 现在从1格子开始,每次 ...

  3. python 读空的json文件

    读空的json文件,python2和python3 的错误提示是不一样的 python2: ValueError: No JSON object could be decoded python3: j ...

  4. Java中泛型区别以及泛型擦除详解

    一.引言 复习javac的编译过程中的解语法糖的时候看见了泛型擦除中的举例,网上的资料大多比较散各针对性不一,在此做出自己的一些详细且易懂的总结. 二.泛型简介 泛型是JDK 1.5的一项新特性,一种 ...

  5. flask学习(十三):过滤器

    1. 介绍和语法 介绍:过滤器可以处理变量,把原始的变量经过处理后再展示出来,作用的对象是变量

  6. Coderforce-574C Bear and Poker(素数唯一分解定理)

    题目大意:给出n个数,问能不能通过让所有的数都乘以2的任意幂或乘以3的任意幂,使这n个数全都相等. 题目分析:最终n个数都是相等的,假设那个数为x,根据素数唯一分解定理,x能分解成m*2p3q.所以, ...

  7. IE兼容BUG汇总及解决方案(持续更新)

    本篇为总结开发过程当中遇到的各种IE兼容性的小问题,比较复杂的会单开一篇文章来讲解. 另:我手头目前只有原生IE8,原生IE9,原生IE11,以及IE11模拟的IE5,7,8,9,10.因IE6太过古 ...

  8. IE8下的typeof(console.log)为"object"的BUG

    今天发现IE8在开启过控制台后,console.log虽然可用,也是确实是一个函数,但是对其执行typeof操作返回的确是"object" 原生IE8:

  9. BigDecimal 、BigInteger

    package com.BigDecimal; public class BigDecimalDemo { /* * 下面的运算的结果出乎我们的意料,有些准确,有些不准确 * 这是为什么呢? * 我们 ...

  10. 免费获取一年 AVG Internet Security 2014 和 Antivirus Pro 2014

    华为版的 AVG 2014 系列出炉了,用过华为版 2013 系列的童鞋都知道是什么回事,内置一年多的序列号不用那么麻烦去找了. 下载地址: 内置的许可证是:IBY9X-ESYXT-W4BZQ-QI4 ...