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 ?

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重新读取分区表。
因此,使用该命令就可以创建分区并且在不重新启动机器的情况下系统能够识别这些分区。

查看是否安装该命令:

[[email protected] dev]# rpm -q parted

parted-1.8.1-23.el5

我们执行一下该命令:

[[email protected] 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.,布布扣,bubuko.com

时间: 2024-08-05 10:52:08

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.的相关文章

WARNING: Re-reading the partition table failed

今日在做lvm的时候,把一块盘剩余空间全部分给新分区,在保存的时候报: WARNING: Re-reading the partition table failed with error 16: 设备或资源忙. 解决方法:执行下partprobe 命令 partprobe包含在parted的rpm软件包中.partprobe可以修改kernel中分区表,使kernel重新读取分区表. 因此,使用该命令就可以创建分区并且在不重新启动机器的情况下系统能够识别这些分区. 查看是否安装该命令: [[em

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

Android删除文件后重新创建时偶尔出现 open failed: EBUSY (Device or resource busy)错误,该错误是Android系统的一个bug,大概的意思类似于windows的"改文件正在被使用".产生这个错误的原因是Android在删除文件后没有及时释放文件锁,导致文件在重新创建时仍然处于被某一进程占用的状态.解决的方法是:在删除文件之前对该文件进行重命名,这样可以保证在删除文件时系统持有的文件锁是重命名之后的文件锁.代码可以这样写: final F

GUID Partition Table (GPT)

https://en.wikipedia.org/wiki/GUID_Partition_Table https://zh.wikipedia.org/wiki/全局唯一标识分区表 GUID Partition Table (GPT) is a standard for the layout of the partition table on a physical storage device, such as a hard disk drive or solid-state drive, us

Partition table的switch条件2:Partition 的隐式Check约束 和Nullability

Partition column允许为Null,Null是最小值,存在于Partition Number=1的partition中. Any data with a NULL in the partition column will reside in the leftmost partition. NULL is considered smaller than the minimum value of the data type’s values. Partition Function 定义了

doesn't contain a valid partition table 解决方法

输入 fdisk -l 可以看到 输入 fdisk /dev/xvdb 跟着向导一步步做下去(如果不知道该输入什么,就输入“m”并回车,可以打印出菜单): 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 partiti

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

使用Navicat连接Mycat 8066 成功插入了分库表和全局表 1.全局表 sql如下: INSERT INTO `t_rank` VALUES ('259bfdc3-7922-4839-96c7-61c89e877dc5', '法国', '7', '11', '11', '12', null, '34'); INSERT INTO `t_rank` VALUES ('41eece5d-9d86-4cfe-b0ce-e6d4e4021cac', '中国', '2', '38', '27',

小米2s线刷出现remote: partition table doesn't exist

=================问题============ 小米2s线刷出现remote: partition table doesn't exist =================解决方案========== 在线刷的包中的flash_all.bat内容最前面加入这一句“fastboot %* flash partition "%~dp0images\gpt_both0.bin" || @echo "Flash partition" &&

Partition Table

what is Partition Table? Looking to optimize the performance of your SQL Server database? If your database contains very large tables, you may benefit from partitioning those tables onto separate filegroups. Allows you to spread data onto different p

在hive中查询导入数据表时FAILED: SemanticException [Error 10096]: Dynamic partition strict mode requires at least one static partition column. To turn this off set hive.exec.dynamic.partition.mode=nonstrict

当我们出现这种情况时 FAILED: SemanticException [Error 10096]: Dynamic partition strict mode requires at least one static partition column. To turn this off set hive.exec.dynamic.partition.mode=nonstrict 这时候我们需要改变一下设置 set hive.exec.dynamici.partition=true;set h