在 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.的更多相关文章

  1. fdisk时WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.

    现象:划分磁盘有警告, fdisk可以看到 lsblk却没有 partprobe刷新分区还是不行 放大招 #reboot   #这个是最好的方法(重启后新的分区表不一定生效) 或 # partx -a ...

  2. 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 ...

  3. android java.io.IOException: open failed: EBUSY (Device or resource busy)

    今天遇到一个奇怪的问题, 测试在程序的下载界面,下载一个文件第一次下载成功,删除后再下载结果下载报错, 程序:file.createNewFile(); 报错:java.io.IOException: ...

  4. mount: mounting proc on /proc failed: Device or resource busy

    /********************************************************************** * mount: mounting proc on /p ...

  5. Android文件操作报open failed: EBUSY (Device or resource busy)

    Android删除文件后重新创建时偶尔出现 open failed: EBUSY (Device or resource busy)错误,该错误是Android系统的一个bug,大概的意思类似于win ...

  6. GUID Partition Table (GPT)

    https://en.wikipedia.org/wiki/GUID_Partition_Table https://zh.wikipedia.org/wiki/全局唯一标识分区表 GUID Part ...

  7. Mycat+Mysql 插入数据报错 i[Err] 1064 - partition table, insert must provide ColumnList

    使用Navicat连接Mycat 8066 成功插入了分库表和全局表 1.全局表 sql如下: '); '); '); 插入成功! 2.分库表 sql如下: ', null, null, null, ...

  8. -- 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 -- ...

  9. oracle partition table 分区表详解

    Oracle partition table 分区表详解 分区表就是通过使用分区技术,将一张大表,拆分成多个表分区(独立的segment),从而提升数据访问的性能,以及日常的可维护性.分区表中,每个分 ...

随机推荐

  1. server-sent-event使用流信息向客户端发送数据

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  2. Centos7下部署ceph 12.2.1 (luminous)集群及RBD使用

    前言 本文搭建了一个由三节点(master.slave1.slave2)构成的ceph分布式集群,并通过示例使用ceph块存储. 本文集群三个节点基于三台虚拟机进行搭建,节点安装的操作系统为Cento ...

  3. vue-cli 脚手架目录结构说明

    目录结构截图如下 /build 编译配置文件目录,由脚手架自动生成 /config webpack 配置文件目录,由脚手架自动生成 /node_modules node依赖目录,可通过package. ...

  4. css伪类的说明以及使用(css事件)

    CSS伪类的使用(css事件) 转载请注明源地址:http://www.cnblogs.com/funnyzpc/p/7670959.html 之前有开发开发App的时候,有同事问我那个列表的条目按下 ...

  5. Java8 方式解决Stream流转其他数组

    Java8 方式解决Stream流转其他数组 一. 题记:原来的List转数组用的是如下方式: example private static void listToStringArray(List l ...

  6. 完美解决--用VS中的Git做代码管理器,与他人共享代码

    1.创建代码仓库,这里说一下为什么要创建仓库,Git不能够作为源代码管理器,vs中自带的也只能够在本地进行管理,要和他们共享的话必须要有服务器端去存储代码,类似于SVN,它就有客户端和服务器端,这里推 ...

  7. 隐藏17年的Office远程代码执行漏洞(CVE-2017-11882)

    Preface 这几天关于Office的一个远程代码执行漏洞很流行,昨天也有朋友发了相关信息,于是想复现一下看看,复现过程也比较简单,主要是简单记录下. 利用脚本Github传送地址 ,后面的参考链接 ...

  8. 《Maven实战》 第7章 生命周期与插件

    7.1什么是生命周期 软件开发人员每天都在对项目进行清理.编译.测试及部署,Maven生命周期是对所有构建过程进行抽象和统一,含项目的清理.初始化.编译.测试.打包.集成测试.验证.部署和站点生成等几 ...

  9. 解决微信公众平台IP白名单

    微信公众平台,作为自媒体的旗舰级产品,越来越多的人已经投入它的怀抱.正如它的广告词所说:再小的个体,也有品牌 好吧,闲话不多说,今天要说的是它的IP白名单机制. 我们现在安装的大部分的电信的家庭级别的 ...

  10. Unity塔防游戏开发

    Unity3D塔防开发流程 配置环境及场景搭建编程语言:C#,略懂些许设计模式,如果不了解设计模式,BUG More开发工具:Unity3D编辑器.Visual Studio编译器开发建议:了解Uni ...