Linux磁盘分区(二):删除
***********************************************声明************************************************
原创作品,出自 “深蓝的blog” 博客,欢迎转载,转载时请务必注明出处(http://blog.csdn.net/huangyanlong)。
表述有错误之处,请您留言或邮件(hyldba@163.com)指明,不胜感激。
*****************************************************************************************************
续接上篇:“举例:将sdb1格式化为ext3文件系统”点击打开链接
*****************************************************************************************************
Linux硬盘分区(二):删除
*****************************************************************************************************
*************************
举例:对sdb1进行umount
*************************
- [root@hyl /]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/sda1 9.7G 5.4G 3.9G 59% /
- /dev/sda3 35G 17G 17G 50% /home
- tmpfs 1006M 0 1006M 0% /dev/shm
- /dev/sdb1 1.9G 35M 1.8G 2% /data1
- [root@hyl /]# umount /data1
- [root@hyl /]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/sda1 9.7G 5.4G 3.9G 59% /
- /dev/sda3 35G 17G 17G 50% /home
- tmpfs 1006M 0 1006M 0% /dev/shm
- [root@hyl /]# fdisk -l
- Disk /dev/sda: 53.6 GB, 53687091200 bytes
- 255 heads, 63 sectors/track, 6527 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Device Boot Start End Blocks Id System
- /dev/sda1 * 1 1305 10482381 83 Linux
- /dev/sda2 1306 1827 4192965 82 Linux swap / Solaris
- /dev/sda3 1828 6527 37752750 83 Linux
- Disk /dev/sdb: 10.7 GB, 10737418240 bytes
- 255 heads, 63 sectors/track, 1305 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Device Boot Start End Blocks Id System
- /dev/sdb1 1 250 2008093+ 83 Linux
- /dev/sdb2 251 500 2008125 83 Linux
- /dev/sdb3 501 750 2008125 83 Linux
- /dev/sdb4 751 1305 4458037+ 5 Extended
- /dev/sdb5 751 875 1004031 83 Linux
- /dev/sdb6 876 1000 1004031 83 Linux
- /dev/sdb7 1001 1305 2449881 83 Linux
*************************
对第二块磁盘操作(即/dev/sdb)
*************************
- [root@hyl /]# fdisk /dev/sdb
- The number of cylinders for this disk is set to 1305.
- 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): m
- Command action
- a toggle a bootable flag
- b edit bsd disklabel
- c toggle the dos compatibility flag
- d delete a partition
- l list known partition types
- m print this menu
- n add a new partition
- o create a new empty DOS partition table
- p print the partition table
- q quit without saving changes
- s create a new empty Sun disklabel
- t change a partition's system id
- u change display/entry units
- v verify the partition table
- w write table to disk and exit
- x extra functionality (experts only)
- Command (m for help): p
- Disk /dev/sdb: 10.7 GB, 10737418240 bytes
- 255 heads, 63 sectors/track, 1305 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Device Boot Start End Blocks Id System
- /dev/sdb1 1 250 2008093+ 83 Linux
- /dev/sdb2 251 500 2008125 83 Linux
- /dev/sdb3 501 750 2008125 83 Linux
- /dev/sdb4 751 1305 4458037+ 5 Extended
- /dev/sdb5 751 875 1004031 83 Linux
- /dev/sdb6 876 1000 1004031 83 Linux
- /dev/sdb7 1001 1305 2449881 83 Linux
- </span>
*************************
删除分区:sdb1及其它
*************************
- Command (m for help): d
- --输入删除指令
- Partition number (1-7): 1
- --输入删除的分区号
- Command (m for help): p
- --打印分区表
- Disk /dev/sdb: 10.7 GB, 10737418240 bytes
- 255 heads, 63 sectors/track, 1305 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Device Boot Start End Blocks Id System
- /dev/sdb2 251 500 2008125 83 Linux
- /dev/sdb3 501 750 2008125 83 Linux
- /dev/sdb4 751 1305 4458037+ 5 Extended
- /dev/sdb5 751 875 1004031 83 Linux
- /dev/sdb6 876 1000 1004031 83 Linux
- /dev/sdb7 1001 1305 2449881 83 Linux
- --可以看到sdb1已经被删除了
- --接下来同理,删除其它分区
- Command (m for help): d
- Partition number (1-7): 2
- Command (m for help): d
- Partition number (1-7): 3
- Command (m for help): d
- Partition number (1-7): 4
- Command (m for help): p
- Disk /dev/sdb: 10.7 GB, 10737418240 bytes
- 255 heads, 63 sectors/track, 1305 cylinders
- Units = cylinders of 16065 * 512 = 8225280 bytes
- Device Boot Start End Blocks Id System
- Command (m for help): w
- --保存退出
- The partition table has been altered!
- Calling ioctl() to re-read partition table.
- Syncing disks.
- --现在可以移除磁盘了
***********************************************声明************************************************
原创作品,出自 “深蓝的blog” 博客,欢迎转载,转载时请务必注明出处(http://blog.csdn.net/huangyanlong)。
表述有错误之处,请您留言或邮件(hyldba@163.com)指明,不胜感激。
*****************************************************************************************************
Linux磁盘分区(二):删除的更多相关文章
- Linux磁盘分区(二)之挂载卸载常用命令
Linux磁盘分区(二)之挂载卸载常用命令 转自:https://blog.csdn.net/qq_36183935/article/details/81053383 https: ...
- 调整Linux磁盘分区的大小的方法
昨天数据入库时,一直报错,说磁盘满了,,df -h 一看,发现/目录下只有50G空间,已使用49G:我的程序和dbss都安装在/目录下,ftp到的数据放在/data下的一个子目录下,分解完的 ...
- Linux磁盘分区与格式化
磁盘分区格式说明 linux分区不同于windows linux下分区标示: 例如:hda1 hd这两个字母表示分区所在的设备类型,hd标示IDE类型硬盘,sd表示SCSI类型硬盘 第三字母a标示硬盘 ...
- Linux fdisk命令参数及用法详解---Linux磁盘分区管理命令fdisk
fdisk 命令 linux磁盘分区管理 用途:观察硬盘之实体使用情形与分割硬盘用. 使用方法: 一.在 console 上输入 fdisk -l /dev/sda ,观察硬盘之实体使用情形. 二.在 ...
- linux磁盘 分区 物理卷 卷组 逻辑卷 文件系统加载点操作案例
转自:truemylife.linux磁盘 分区 物理卷 卷组 逻辑卷 文件系统加载点操作案例 基本概念: 磁盘.分区.物理卷[物理部分] 卷组[中间部分] 逻辑卷.文件系统[虚拟化后可控制部分] 磁 ...
- Linux crond任务调度(定时任务),Linux磁盘分区/挂载
一.crond任务调度 1.基本语法 crontab [选项] -e : 编辑 crontab定时任务 -l : 查询crontab -r : 删除当前用户所有的crontab任务 例子: 每分钟执行 ...
- Linux磁盘分区(四)之分区大小调整
Linux磁盘分区(四)之分区大小调整在学习调整分区大小之前,先了解linx分区的概念.参考如下博客:[1]linux 分区 物理卷 逻辑卷 https://www.cnblogs.com/liuch ...
- Linux磁盘分区(一)之fdisk命令
Linux磁盘分区(一)之fdisk命令转自:https://www.cnblogs.com/machangwei-8/p/10353683.html 一.fdisk 的介绍fdsik 能划分磁盘成为 ...
- linux磁盘分区模式
linux磁盘分区模式 模式一:MBR 1)主分区不超过四个 2)单个分区容量最大2TB 模式二:GPT 1)主分区个数"几乎"没有限制(原因:在GPT的分区表中最多可以支持128 ...
- <实训|第七天>横扫Linux磁盘分区、软件安装障碍附制作软件仓库
期待已久的linux运维.oracle"培训班"终于开班了,我从已经开始长期四个半月的linux运维.oracle培训,每天白天我会好好学习,晚上回来我会努力更新教程,包括今天学到 ...
随机推荐
- Abp异常-找不到方法:“System.String Abp.Runtime.Security.SimpleStringCipher.Decrypt(System.String, System.String, Byte[])”
解决方法:升级Abp.Zero版本到2.0.2
- Codeforces 376C. Socks
C. Socks time limit per test 2 seconds memory limit per test 256 megabytes input standard input outp ...
- 【JDK1.8】JDK1.8集合源码阅读——LinkedHashMap
一.前言 在上一篇随笔中,我们分析了HashMap的源码,里面涉及到了3个钩子函数,用来预设给子类--LinkedHashMap的调用,所以趁热打铁,今天我们来一起看一下它的源码吧. 二.Linked ...
- vue初级学习--组件的使用(自定义组件)
一.导语 突然冒出四个字,分即是合,嗯,优点道理....................... 二.正文 在搞的仿淘宝demo,之前加入购物车是与商品详情一块的,今天把它单独拆出来,复用性高点,那这样 ...
- 分享如何将git项目导入GitHub(附创建分支)
前言:我们应该很多都会有自己的私有项目,大多情况都是存放在自己的硬盘中,今天我分享一下怎么讲自己的私有项目更新到GitHub上,这样再也不用担心项目丢失了. 一:下载git 下载链接git链接,根据自 ...
- 动态代理:JDK动态代理和CGLIB代理的区别
代理模式:代理类和被代理类实现共同的接口(或继承),代理类中存有指向被代理类的索引,实际执行时通过调用代理类的方法.实际执行的是被代理类的方法. 而AOP,是通过动态代理实现的. 一.简单来说: JD ...
- 如何优雅的设计React组件
如何优雅的设计 React 组件 如今的 web 前端已被 React.Vue 和 Angular 三分天下,一统江山十几年的 jQuery 显然已经很难满足现在的开发模式.那么,为什么大家会觉得 j ...
- EAS(学生管理系统)初建
一.确定开发使用的技术 本次开发EAS示例网站,使用Servlet+JSP+MySQL技术,其中包括使用bootstrap工具完成简易前端页面设计.所有数据实体与数据关系皆用数 ...
- Docker Register安装与基本认证
准备 基本事项 Docker环境 登录授权方式 镜像存放地址 HTTPS外网访问 启动Docker Registry 1. 基本事项 本篇涉及到的数据文件都放在/data目录下, 其中会有三个子目录 ...
- js如何判断对象和数组
var a = {}; var b = []; console.log(Object.prototype.toString.call(a) === '[object Object]');//判断对象 ...