未卸载硬盘分区挂载在重新分区时报错

本文解决两个常见的磁盘操作问题:一是创建分区时遇到“Device or resource busy”错误,解决方法是使用partprobe或kpartx刷新内核分区表;二是格式化已挂载的分区时出现错误,解决办法是先使用umount命令卸载分区,然后再进行格式化。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题一:创建分区时报错

Re-reading the partition table failed.: Device or resource busy

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

问题二:格式化时报错

/dev/sdc1 is mounted; will not make a filesystem here!

sudo mkfs.ext4 /dev/sdc1 
mke2fs 1.42.13 (17-May-2015)
/dev/sdc1 contains a ext4 file system
    last mounted on /home/data on Thu Oct 31 16:30:41 2019
Proceed anyway? (y,n) y
/dev/sdc1 is mounted; will not make a filesystem here!

解决办法:卸载挂载

命令:

umount /dev/sdc1

然后重新分区、格式化即可; 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

JoannaJuanCV

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值