partprobe命令详解
原文链接:https://www.jb51.net/LINUXjishu/389836.html
linux上,在安装系统之后,可否创建分区并且在不重新启动机器的情况下系统能够识别这些分区?
解决方法:
你可以使用一个叫做partprobe的工具。它包含在parted的rpm软件包中。在Red Hat Enterprise Linux 3上他的版本是parted-1.6。 partprobe 是一个可以修改kernel中分区表的工具。可以使kernel重新读取分区表。如下命令可以查看你的系统是否安装了parted软件包
代码如下:
举例来说:
代码如下:
parted-1.6.3-29
你可以使用up2date命令安装这个软件包,如果在你的系统已经正确地注册到RHN上了。否则你可以从光盘上安装这个文件。
你可以使用fdisk或者其他命令创建一个新的分区,然后使用partprobe命令重新读取分区表。
代码如下:
这个命令执行完毕之后不会输出任何返回信息,你可以使用mke2fs命令在新的分区上创建文件系统。
在Linux中使用fdisk命令进行分区时,有时会遇到“WARNING: Re-reading the partition table failed with error 16: Device or resource busy.The kernel still uses the old table.The new table will be used at the next reboot.”这种告警信息。如下所示
代码如下:
The number of cylinders for this disk is set to 18928.
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/sde: 155.6 GB, 155692564480 bytes
255 heads, 63 sectors/track, 18928 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sde1 1 18275 146793906 5 Extended
/dev/sde5 1 18275 146793874+ 83 Linux
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (18276-18928, default 18276):
Using default value 18276
Last cylinder or +size or +sizeM or +sizeK (18276-18928, default 18928):
Using default value 18928
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
此时使用fdisk命令看不到新建的分区信息,可以使用partprobe命令解决这个问题而不用重启系统,因为partprobe可以使kernel重新读取分区信息,从而避免重启系统。
代码如下:
DESCRIPTION
This manual page documents briefly the partprobe command.
partprobe is a program that informs the operating system kernel of partition table changes, by requesting that the operating system re-read the partition table.
partprobe命令详解的更多相关文章
- Linux partprobe命令详解
partprobe命令 partprobe: 通知系统分区表的变化 常用的命令展示: 查看帮助 [root@localhost omc]# partprobe --help Usage: partpr ...
- [转帖]dd命令详解
dd命令详解 https://czmmiao.iteye.com/blog/1748748 之前一直对linux的命令很恐惧 现在发现 其实不是那么复杂 要仔细学习就可以了 比如 dd = disk ...
- Git初探--笔记整理和Git命令详解
几个重要的概念 首先先明确几个概念: WorkPlace : 工作区 Index: 暂存区 Repository: 本地仓库/版本库 Remote: 远程仓库 当在Remote(如Github)上面c ...
- linux yum命令详解
yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能够从指定的服务器自动下载RP ...
- Linux下ps命令详解 Linux下ps命令的详细使用方法
http://www.jb51.net/LINUXjishu/56578.html Linux下的ps命令比较常用 Linux下ps命令详解Linux上进程有5种状态:1. 运行(正在运行或在运行队列 ...
- Docker命令详解
Docker命令详解 最近学习Docker,将docker所有命令实验了一番,特整理如下: # docker --help Usage: docker [OPTIONS] COMMAND [arg ...
- linux awk命令详解
linux awk命令详解 简介 awk是一个强大的文本分析工具,相对于grep的查找,sed的编辑,awk在其对数据分析并生成报告时,显得尤为强大.简单来说awk就是把文件逐行的读入,以空格为默认分 ...
- android adb 命令详解
ADB (Android Debug Bridge) 是android SDK中的工具,需要先配置环境变量才能使用.起调试桥的作用,可以管理安卓设备.(也叫debug工具) ---------查看设 ...
- Git 常用命令详解
Git 是一个很强大的分布式版本管理工具,它不但适用于管理大型开源软件的源代码(如:linux kernel),管理私人的文档和源代码也有很多优势(如:wsi-lgame-pro) Git 的更多介绍 ...
随机推荐
- [译]OpenGL像素缓冲区对象
目录概述创建PBO映射PBO例子:Streaming Texture Uploads with PBO例子:Asynchronous Readback with PBO 概述 OpenGL ARB_p ...
- C#动态加载/卸载Assembly的解决方案
1. Assembly中的类要从MarshalByRefObject继承,如果你想从你自己的类来继承,那么请选用interface或者继续研究其他解决方案. namespace Library { ...
- Oracle 数据库纯dos代码操作
1. 安装成功后进入DOS界面操作 在进行以下操作时,需启动Oracle服务. A.进入sql界面:开始--运行--cmd:输入sqlplus 回车 提示输入正确的用户名和密码 B.开始—>所有 ...
- PAT乙级1030
1030 完美数列 (25 分) 给定一个正整数数列,和正整数 p,设这个数列中的最大值是 M,最小值是 m,如果 M≤mp,则称这个数列是完美数列. 现在给定参数 p 和一些正整数,请你从中选择 ...
- B. Our Tanya is Crying Out Loud
http://codeforces.com/problemset/problem/940/B Right now she actually isn't. But she will be, if you ...
- 解决yum安装 openssl-devel时产生的Multilib version problems found错误(转)
Error: Multilib version problems found. This often means that the root cause is something else and m ...
- oracle 判断字段相等,但类型不同引起的性能问题
最近做ogg数据同步,然后触发器加工数据放入另外一张表,由于数据量很大,一分钟几万条数据,由于一些条件字段类型不匹配,引起ogg阻塞,比较头大.最后分析发现性能问题.请看下图: phmxxh是varc ...
- Linux入门基础(一):Linux基本操作
命令行BASH基本操作 Shell 用户不能直接操作内核,所以用户操作通过shell传递给内核 shell分为两种 : GUI 图形界面 (linux一般是GNOME) CLI 命令行界面 (linu ...
- C语言学习记录_2019.02.10
sizeof:给出某个类型或某个变量在内存中占据的字节数:(1个字节8位,即8比特) 格式符 (1)%ld表示数据按十进制有符号长型整数输入或输出. (2)%d表示数据按十进制有符号整型数输入或输出. ...
- 使用promis串行化异步操作
该代码可在chrome下运行,对于低版本浏览器可以引入Q库 function async1() { var defer = Promise.defer() setTimeout(function(){ ...