fuser查询文件被哪个进程占用
2021-10-291、linux umount分区时候:
umount: /data4: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
2、用lsof -a
lsof -a ts_2019_02_004.dbf
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
oracle 8015 oracle 49u REG 253,81 33160175616 9437191 ts_2019_02_004.dbf
oracle 11114 oracle 27u REG 253,81 33160175616 9437191 ts_2019_02_004.dbf
3、fuser -a ts_2019_02_004.dbf
/data4/oradata/ts_2019_02_004.dbf: 8015 11114
###
fuser -a easyliao_2019_04_002.dbf
/data4/oradata/ts_2019_04_002.dbf: 8008 8010 11112
4、查询此进程被那个session占用
kill 8015或者重启相关进程