在Linux扩展LVM时,使用fdisk创建分区时,在磁盘上新建扩展分区(逻辑分区),修改分区格式,指定分区类型为8e时,报错“You cannot change a partition into an extended one or vice versa Delete it first.”。 具体操作如下所示:

[root@get-linux01 ~]# fdisk /dev/sdc

 

The number of cylinders for this disk is set to 5221.

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): p

 

Disk /dev/sdc: 42.9 GB, 42949672960 bytes

255 heads, 63 sectors/track, 5221 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot      Start         End      Blocks   Id  System

 

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

e

Partition number (1-4): 1

First cylinder (1-5221, default 1): 

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-5221, default 5221): 

Using default value 5221

 

Command (m for help): t

Selected partition 1

Hex code (type L to list codes): 8e

You cannot change a partition into an extended one or vice versa

Delete it first.

 

Command (m for help): n  

Command action

   l   logical (5 or over)

   p   primary partition (1-4)

l

First cylinder (1-5221, default 1): 

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-5221, default 5221): 

Using default value 5221

 

Command (m for help): t

Partition number (1-5): 1

Hex code (type L to list codes): 8e

You cannot change a partition into an extended one or vice versa

Delete it first.

 

Command (m for help): p

 

Disk /dev/sdc: 42.9 GB, 42949672960 bytes

255 heads, 63 sectors/track, 5221 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot      Start         End      Blocks   Id  System

/dev/sdc1               1        5221    41937651    5  Extended

/dev/sdc5               1        5221    41937619+  83  Linux

 

Command (m for help): w

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

其实出现这个错误,是因为分区号(Partition number)号弄错了(因为必须保留1-4这4个数字给主分区和扩展分区使用,所以逻辑分区的数字必须从5开始)。赤裸裸的要被鄙视啊! 按照下面操作即可解决问题。

You cannot change a partition into an extended one or vice versa Delete it first的更多相关文章

  1. I.MX6 change boot partition 1 to User area

    /************************************************************************************ * I.MX6 change ...

  2. Unix&Linux技术文章目录(2015-12-22更新)

    Unix & Linux 方面的博客整理.归纳分类,要坚持不懈的学习Unix &Linux,加油!技术需要累积和沉淀.更需要锲而不舍的精神.持之以恒的毅力!借此下面名句勉励自己! 书上 ...

  3. Linux中的LVM

    逻辑卷管理器,通过将另外一个硬盘上的分区加到已有文件系统,来动态地向已有文件系统添加空间的方法. 逻辑卷管理的核心是处理安装在系统上的硬盘分区.在逻辑卷管理的世界里,硬盘称作物理卷(Physical ...

  4. 【转】Linux中的LVM

    转自:http://www.cnblogs.com/net2012/p/3365904.html 逻辑卷管理器,通过将另外一个硬盘上的分区加到已有文件系统,来动态地向已有文件系统添加空间的方法. 逻辑 ...

  5. linux中LVM介绍及实验过程

    LVM LVM这个词不仅一次出现过,在安装Centos时,磁盘分区时,默认分区就是使用LVM方式分区:再一个就是在OpenStack部署时候用到LVM作为后端存储.对LVM的理解还是不太清晰,查询资料 ...

  6. linux 系统磁盘管理体系

    目录 linux 系统磁盘管理体系 一.磁盘的基本概念 二.磁盘的内部结构 三.磁盘的外部结构 四.磁盘的接口及类型 五.fdisk磁盘分区实践 六.gdisk 分区 七.parted 高级分区工具. ...

  7. windows raid mode重新安装系统(win10)

    常规安装模式: STEP 1 进入bios 将高级设置中,引导模式设置为传统(旧模式)模式,一般存在legacy (旧模式),uefi with csm ,uefi without csm 三个模式, ...

  8. 安装grub到U盘分区,实现多系统引导

    目录 1.分区工具及分区类型 1.1 显示分区表和分区信息 1.1.1 fdisk -l 1.1.2 gdisk -l 1.1.3 parted -l 1.2 常见分区类型 1.3 分区样例 1.3. ...

  9. System and method to prioritize large memory page allocation in virtualized systems

    The prioritization of large memory page mapping is a function of the access bits in the L1 page tabl ...

随机推荐

  1. java中hashMap的排序

    hashMap排序,示例: private void test(){ Map<String, List<String>> unSupportedDatesMap=new Has ...

  2. struts2学习笔记--使用servletAPI实现ajax的一个小Demo

    这个例子是点击网页上的一个button,然后调用action,使用response项前台打印"哎呦 不错哦",当然是以异步形式实现. jsp页面: <head> < ...

  3. Cesium原理篇:6 Render模块(6: Instance实例化)

    最近研究Cesium的实例化,尽管该技术需要在WebGL2.0,也就是OpenGL ES3.0才支持.调试源码的时候眼前一亮,发现VAO和glDrawBuffers都不是WebGL1.0的标准函数,都 ...

  4. Solr学习总结(五)SolrNet的基本用法及CURD

    上一篇已经讲到了Solr 查询的相关的参数.这里在讲讲C#是如何通过客户端请求和接受solr服务器的数据, 这里推荐使用SolrNet,主要是:SolrNet使用非常方便,而且用户众多,一直都在更新, ...

  5. 你真的会玩SQL吗?删除重复数据且只保留一条

    在网上看过一些解决方法 我在此给出的方法适用于无唯一ID的情形 表:TB_MACVideoAndPicture 字段只有2个:mac,content mac作为ID,正常情况下mac数据是唯一的,由于 ...

  6. 自动实现接口的实例,mybatis就是这样实现的

    思考 很多人用过MyBatis,或者使用过SpringData,那么和传统的jdbc相比,差别在哪里呢?传统的dao层,接口需要有实现,需要连接发出sql,需要接收返回值,但是mybatis只需要实现 ...

  7. 4-MSP430定时器_定时器中断

    一开始没写好就上传了,,,,,,,,这次来个全的 自己学MSP430是为了写一篇关于PID的文章,需要430在proteus上做仿真,一则认为在自动控制算法上PID真的很经典,PLC设备上大多是模块式 ...

  8. 登陆后设置cookie的方法

    public void SetCookie(string userName, string role,string cookieValueName) {FormsAuthentication.Form ...

  9. 移动端API架构 统一Proxy还是各自为政?

    今天首先回答上一篇的问题: 为什么APP通过运营商接入网络,连通率会那么差? 1. 域名缓存问题 运营商的localdns会缓存域名的解析结果,不向权威DNS递归查询解析 为什么要这么干呢? 1)运营 ...

  10. 使用 Visual Studio Online 进行协同开发

    Visual Studio Online(原来的 Team Foundation Service),是项目数据在云中的主页.在我们的云基础架构中只需数分钟便可启动并运行,无需安装或配置任何服务器.设置 ...