Ubuntu 访问移动硬盘/U盘时弹出“An operation is pending“

背景描述

一时手贱,没有卸载移动硬盘(exFAT文件系统)就直接拔下USB,再插上移动硬盘尝试进入目录时弹出报错窗口,提示:
An operation is pending

解决过程

  1. 首先df查看设备状态,检查移动硬盘挂载点,显示该硬盘已经被挂载
$ df
文件系统            1K-块       已用       可用 已用% 挂载点
...
/dev/sdc1      4883734528 1721180160 3162554368   36% /media/yyz/M21
  1. 第一次尝试umount卸载移动硬盘,报错 target is busy.。说明有进程正在使用该设备,参考网友分享使用fuser命令杀掉占用资源的进程。
  2. 第二次尝试umount卸载移动硬盘,报错 not mounted
$ umount /dev/sdc1
Error unmounting block device 8:33: GDBus.Error:org.freedesktop.UDisks2.Error.Failed: Error unmounting /dev/sdc1: not mounted
  1. 于是尝试mount挂载该硬盘,报错 mountpoint is not empty
sudo mount /dev/sdc1 /media/yyz/M21
FUSE exfat 1.2.8
WARN: volume was not unmounted cleanly.
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
  1. 根据askubuntu.com的问答,使用 fsck.exfat 修复该硬盘:
$ sudo fsck.exfat /dev/sdc1
exfatfsck 1.2.8
Checking file system on /dev/sdc1.
File system version           1.0
Sector size                 512 bytes
Cluster size                  4 MB
Volume size                4657 GB
Used space                 1641 GB
Available space            3016 GB

ERROR: failed to read cluster 0x22e.
ERROR: 'unpackd' is empty but start cluster is 0x6658e.
ERROR: 'unpackd' is empty but marked as contiguous (0x20).
ERROR: failed to read cluster 0x3bbac.
Totally 4468 directories and 7554 files.
File system checking finished. ERRORS FOUND: 4.
$ 
  1. 完成后,即可正常卸载、挂载移动硬盘
  • 4
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值