在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. 利用SkyDrive Pro 迅速批量下载SharePoint Server 上已上传的文件

    在上一篇<SharePoint Server 2013 让上传文件更精彩>,我们一起了解了如何快速的方便的上传批量文件到SharePoint Server 2013 ,而在这一篇日志中您将 ...

  2. spring in action 4th --- quick start

    读spring in action. 环境搭建 quick-start依赖注入 面向切面 1.环境搭建 jdk1.8 gradle 2.12 Intelij idea 2016.2.1 1.1创建一个 ...

  3. Competing Consumers Pattern (竞争消费者模式)

    Enable multiple concurrent consumers to process messages received on the same messaging channel. Thi ...

  4. CSS3橙色的星球绕轨道公转动画

    效果:http://hovertree.com/texiao/css3/24/ 效果图: 代码如下: <!DOCTYPE html> <html lang="zh" ...

  5. .NET多线程总结和实例介绍

    摘要:.Net提供了许多多线程编程工具,可能是因为太多了,所以掌握起来总是有一些头疼,我在这里讲讲我总结的一些多线程编程的经验,希望对大家有帮助. 1.多线程的总结 不需要传递参数,也不需要返回参数 ...

  6. WEB架构师成长系列索引

    WEB架构师成长系列索引 http://www.cnblogs.com/seesea125/archive/2012/04/17/2453256.html

  7. 从零开始学Python06作业源码(仅供参考)

    Python Version 2.7x 一,bin目录:程序启动入口 SelectLesson_start.py #!usr/bin/env python # -*- coding:utf-8 -*- ...

  8. Ext.Net MVC 配置(2)

    在VS2012中使用NuGet类库管理器配置EXT.NET MVC环境在“Ext.Net MVC 配置(1)”文章已经写到,方法很简单也很方便,但就是不知道它在安装这些库时对项目做了什么很不爽. 通过 ...

  9. OData V4 系列 Action 与 Function

    OData 学习目录 了解过WebApi的都知道,WebApi默认方法 Get.Post.Put,如果增加其它过多Post方法即不能识别,还需增加其它配制,请求的Url还需加上Controller及A ...

  10. [python]沪深龙虎榜数据导入通达信的自选板块,并标注于K线图上

    将沪深龙虎榜数据导入通达信的自选板块,并标注于K线图上 原理:python读取前一次处理完的计算5日后涨跌幅输出的csv文件 文件名前加"[paint]" 安照通达信的画图文件和板 ...