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),从而提升数据访问的性能,以及日常的可维护性.分区表中,每个分 ...
随机推荐
- CopyOnWriteArrayList并发容器
CopyOnWriteArrayList并发容器 Copy-On-Write简称COW,是一种用于程序设计中的优化策略.其基本思路是,从一开始大家都在共享同一个内容,当某个人想要修改这个内容的时候,才 ...
- DbContext 中的 Explicit interface implementation
疑惑 前段时间一直再用Entity Framework 6,写了一些公用的方法,在这个过程中发现了DbContext实现的接口IObjectContextAdapter,可以通过这个接口访问到更底层的 ...
- [认证授权] 5.OIDC(OpenId Connect)身份认证授权(扩展部分)
在上一篇[认证授权] 4.OIDC(OpenId Connect)身份认证授权(核心部分)中解释了OIDC的核心部分的功能,即OIDC如何提供id token来用于认证.由于OIDC是一个协议族,如果 ...
- 第2篇 C#数据类型-值类型与引用类型
一 C#内存分配 在应用程序与操作系统之间有一个"中间人"--公共语言运行时(Common Language Runtime,CLR).它为应用程序提供内`存管理,线程管理和远程处 ...
- 如何用Python写一个计算器软件 附带效果图
该计算器使用Python tkinter模块开发 效果如下图 import tkinter #导入tkinter模块 root = tkinter.Tk() root.minsize(280,500 ...
- SQL---约束---add constraint方法添加约束
1.主键约束: 格式为:alter table 表格名称 add constraint 约束名称 增加的约束类型 (列名) 例子:alter table emp add constraint ppp ...
- JAVA基础3——常见关键字解读(1)
常见的JAVA中的关键字 static static静态变量 静态变量:使用static关键字定义的变量.static可以修饰变量和方法,也有static静态代码块.被static修饰的成员变量和成员 ...
- Java中net.sf.json包关于JSON与对象互转的问题
在Web开发过程中离不开数据的交互,这就需要规定交互数据的相关格式,以便数据在客户端与服务器之间进行传递.数据的格式通常有2种:1.xml:2.JSON.通常来说都是使用JSON来传递数据.本文正是介 ...
- 编程语言的基础——搞定JavaIO
关键字:IO基础,JUnit生命周期,字节流,字符流,字符编码,对象流,序列化,反序列化 Java I/O 流是一组有顺序的,有起点和终点的字节集合.是对设备文件间数据传输的总称和抽象. 在IO中涉及 ...
- appium+Android studio安装与配置
一. 关于JDK 安装,以及Java环境的设置 1.下载JDK1.6,选择对应的安装路径 2.配置相应的Java 环境变量 A.属性名称:JAVA_HOME (sdk的安装目录) 属性值:C:Prog ...