WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
在 mkfs.ext4 /dev/sda2 格式化硬盘空间时,可能出现这种错误。
had this situation at office where I was told to re-partition an already existing partition. The situation was to get the below schema
/dev/sdb1 1 3040 24418768+ 83 Linux
/dev/sdb2 3041 6080 24418800 83 Linux
/dev/sdb3 6081 30515 196274137+ 83 Linux
to
/dev/sdb1 1 3040 24418768+ 83 Linux
/dev/sdb2 3041 6080 24418800 83 Linux
/dev/sdb3 6081 30515 196274137+ 5 Extended
/dev/sdb5 6081 18239 97667136 83 Linux
/dev/sdb6 18240 30515 98606938+ 83 Linux
Alright, now the partition /dev/sdb2 was in use and cannot be unmounted. So what happens when you finish the partitioning with 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.
Syncing disks.
This happends, if you are using/mounted any partitions of the HDD which you just re-partitioned. Normally we do reboot the machine to get this right. But this is not always the easy way out, when you have something running on the machine/multiple users are
on the machine working etc. So there comes the “parted” for rescue.
The package “parted” provides a tool called “partprobe“. This will do the magic for you, you just type in the command (see the man page for more info on partprobe) and this will give the information needed about your newly created partition to your kernel.
解决方法:运行下partprobe
命令
partprobe包括在parted的rpm软件包中。partprobe能够改动kernel中分区表。使kernel又一次读取分区表。
因此。使用该命令就行创建分区而且在不又一次启动机器的情况下系统可以识别这些分区。
查看是否安装该命令:
[root@db1 dev]# rpm -q parted
parted-1.8.1-23.el5
我们运行一下该命令:
[root@db1 dev]# partprobe
Warning: Unable to open /dev/hdc read-write (Read-only file system). /dev/hdc has been opened read-only.
假设还有错误。能够从错误中看出来,须要reboot重新启动然后再mkfs格式化硬盘空间就能够了。
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.的更多相关文章
- fdisk时WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
现象:划分磁盘有警告, fdisk可以看到 lsblk却没有 partprobe刷新分区还是不行 放大招 #reboot #这个是最好的方法(重启后新的分区表不一定生效) 或 # partx -a ...
- WARNING: Re-reading the partition table failed with error 22: Invalid argument
在划分磁盘分区时,遇到错误"WARNING: Re-reading the partition table failed with error 22: Invalid argument&qu ...
- android java.io.IOException: open failed: EBUSY (Device or resource busy)
今天遇到一个奇怪的问题, 测试在程序的下载界面,下载一个文件第一次下载成功,删除后再下载结果下载报错, 程序:file.createNewFile(); 报错:java.io.IOException: ...
- mount: mounting proc on /proc failed: Device or resource busy
/********************************************************************** * mount: mounting proc on /p ...
- Android文件操作报open failed: EBUSY (Device or resource busy)
Android删除文件后重新创建时偶尔出现 open failed: EBUSY (Device or resource busy)错误,该错误是Android系统的一个bug,大概的意思类似于win ...
- GUID Partition Table (GPT)
https://en.wikipedia.org/wiki/GUID_Partition_Table https://zh.wikipedia.org/wiki/全局唯一标识分区表 GUID Part ...
- Mycat+Mysql 插入数据报错 i[Err] 1064 - partition table, insert must provide ColumnList
使用Navicat连接Mycat 8066 成功插入了分库表和全局表 1.全局表 sql如下: '); '); '); 插入成功! 2.分库表 sql如下: ', null, null, null, ...
- -- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.
[root@DB ~]# mysqldump -uroot -p123 --flush-logs --all-databases >fullbackup_sunday_11_PM.sql -- ...
- oracle partition table 分区表详解
Oracle partition table 分区表详解 分区表就是通过使用分区技术,将一张大表,拆分成多个表分区(独立的segment),从而提升数据访问的性能,以及日常的可维护性.分区表中,每个分 ...
随机推荐
- linux DHCP安装和测试
1.Yum 安装DHCP服务 2.拷贝模板配置文件,方便后期的配置修改. cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd. ...
- ACID 数据库正确执行四要素
ACID:数据库事务正确执行所必须满足的四个基本要素的缩写: 原子性(atomicity,或叫不可分割性),一致性(consistency),隔离性(isolation,又称独立性),持久性(dura ...
- thinkphp后台ajaxReturn提示下载的问题
thinkphp新版设置了ajaxreturn方法如果是JSON格式会自动设置头信息为JSON格式,这样做在谷歌下可以正常解析,但是在IE和OPERA浏览器下就会提示下载,从而导致程序出错,修改方法如 ...
- 学习笔记-----php搭建用户管理系统
后台:php,数据库:mysql,前端:html,css,js; 主要页面介绍: 1.php连接数据库后台,读取数据并将其以表格的形式显示,并且有添加,编辑,删除,分页等功能: 2.php用于添加用户 ...
- table固定头部,表格tbody可上下左右滑动
当表格头部固定时,需要分为两个表格来做:一部分是thead,一部分是tbody,具体实现方式如下: html代码: <div class="table_box_big"> ...
- firefox被hao123绑架的解决办法
1.在地址栏里输入"about:support" 2.单击配置文件夹后的"打开文件夹"按钮. 3.在弹出来的文件夹中找到那个叫做"user.js&qu ...
- mongoose返回值无法修改
mongoose 查询方法 find 例:db.collections.find(query,function(err,doc) { 如果var res = doc[0] 是{name:'feife ...
- linux操作系统基础篇(六)
linux服务篇 1.samba服务的搭建 samba的功能: samba是一个网络服务器,用于Linux和Windows之间共享文件.2. samba服务的启动.停止.重启service smb s ...
- RocketMQ快速入门
前面几篇文章介绍了为什么选择RocketMQ,以及与kafka的一些对比: 阿里 RocketMQ 优势对比,方便大家对于RocketMQ有一个简单的整体了解,之后介绍了:MQ 应用场景,让我们知道M ...
- PHP中MD5函数漏洞
题目描述 一个网页,不妨设URL为http://haha.com,打开之后是这样的 if (isset($_GET['a']) and isset($_GET['b'])) { if ($_GET[' ...