在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. geotrellis使用(十一)实现空间数据库栅格化以及根据属性字段进行赋值

    Geotrellis系列文章链接地址http://www.cnblogs.com/shoufengwei/p/5619419.html 目录 前言 安装空间数据库 空间数据库栅格化 根据属性字段进行赋 ...

  2. C++面向对象

    此博文仅作为C++考研专业课的复习内容. 面向对象 构造函数 在对象被创建的时候将自动调用. 复制构造函数 形参是本类对象的引用.其作用是使用一个已经存在的对象,去初始化一个同类的新对象. 复制构造函 ...

  3. js实现无限极分类

    转载注明出处!!! 转载注明出处!!! 转载注明出处!!! 因为要实现部门通讯录,后台传来的数据是直接从数据库里拿的部门表,所以没有层级分类,只有parentId表示从属关系,所以分类的事情就交给我来 ...

  4. Javascript常用正则表达式汇总

    一.匹配数字和字符串 整数或者小数:^[0-9]+\.{0,1}[0-9]{0,2}$ 只能输入数字:"^[0-9]*$". 只能输入n位的数 字:"^\d{n}$&qu ...

  5. https问答篇

    https问答 SSL和TLS有什么区别? 可以说,TLS是SSL的升级版本,SSL是网景公司设计的,为了最早期的网络安全而生,它的全名叫做"安全套接层".后来,IETF在1999 ...

  6. Vagrant入门

    简单地说,Vagrant让我们可以通过代码的方式快速地.可重复地创建针对不同虚拟环境的虚拟机,包括Virtualbox.AWS.Docker等.它使得我们可以一次性地.自动创建多个环境相同的虚拟机,对 ...

  7. 实现terminal代理

    问题 作为一名Linuxer,熟练使用终端是一项必备技能,但终端中有时下载安装功能速度很慢,令人崩溃.我自然而然想到了可否加个代理,提高速度.我之前一直用shadowsocks,浏览器使用switch ...

  8. git学习之冲突解决办法

    1.如果本地项目和远程服务器的同一文件都有改动,那么就会产生冲突,导致git pull 失败,报错见下. 解决办法:先执行git stash指令,暂存当前的改动状态,再执行git pull指令,就可以 ...

  9. node.js操作mysql数据库之增删改查

    安装mysql模块 npm install mysql 数据库准备 mysql server所在的机器IP地址是192.168.0.108,登录账户就用root@123456 在mysql中创建tes ...

  10. 详解SQLServer 存储过程

    Sql Server的存储过程是一个被命名的存储在服务器上的Transacation-Sql语句集合,是封装重复性工作的一种方法,它支持用户声明的变量.条件执行和其他强大的编程功能. 存储过程相对于其 ...