I have logical volume mounted on /opt
which i want to unmount but cannot. I suspect this is due to other, 'underlying' logical volume mounted on /opt/mongo
There are a lot of opened files on /opt/mongo
, bit no one on /opt
. Is it possible to umnount /opt
without touching /opt/mongo
?
[root@lab7-dl580-2 mongod]# df -h /opt/
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-lv_opt 20G 825M 19G 5% /opt
[root@lab7-dl580-2 mongod]# df -h /opt/mongo/
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-lv_mongo 100G 41G 60G 41% /opt/mongo
[root@lab7-dl580-2 mongod]# lsof |grep opt |grep -v mongo
gssproxy 1569 root mem REG 253,0 41456 52922 /usr/lib64/libpopt.so.0.0.0
gssproxy 1569 1578 root mem REG 253,0 41456 52922 /usr/lib64/libpopt.so.0.0.0
gssproxy 1569 1579 root mem REG 253,0 41456 52922 /usr/lib64/libpopt.so.0.0.0
gssproxy 1569 1580 root mem REG 253,0 41456 52922 /usr/lib64/libpopt.so.0.0.0
gssproxy 1569 1581 root mem REG 253,0 41456 52922 /usr/lib64/libpopt.so.0.0.0
gssproxy 1569 1582 root mem REG 253,0 41456 52922 /usr/lib64/libpopt.so.0.0.0
[root@lab7-dl580-2 mongod]# umount /opt/
umount: /opt: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
You probably can't properly do it..
umount -l /opt
will probably let you unmount /opt without also /opt/mongo, but that will mess up the /opt/mongo mount rather than leave it alone. Most likely open file handles will keep working, but new ones will not work until you mount it all back, and many programs might fail with this happening.I tested this and it seemed to work, but also I didn't have to umount /opt/mongo and it was unmounted already. So I guess this isn't exactly what you want, but looked the same in my test. (I had another shell open in the /opt/mongo directory and it still worked... I could
ls
andecho hi > testfile
still... if a database was running there, maybe it would end up badly)