Linux下因为磁盘出问题而导致了Input/output error,所以准备先把有问题的磁盘卸载掉再重新挂上试试。
执行umount:1
2
3
4[root@hostname ~]# umount -n /dev/sdc1
umount: /home/data: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
显示设备正忙,所以执行umount -nf:1
2
3
4
5
6[root@hostname ~]# umount -nf /dev/sdc1
umount2: Device or resource busy
umount: /home/data: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
umount2: Device or resource busy
还是无法卸载。
根据给出的提示,使用losf或者fuser来找出那些进程正在使用该设备:1
2
3[root@yourdream ~]# fuser -cu /dev/sdc1
/dev/sdc1: 2444c(root) 2458c(root) 3041c(mysql)
[root@yourdream ~]# fuser -cu /dev/sdc1
使用c指定挂载的文件系统,u显示使用者的id。可以看出三个进程正在使用,通过ps可以查到分别为redis和mysql正在使用。
因此,卸载之前停掉redis和mysql之后再次执行umount就能正常卸载了。