Tuesday, March 6, 2012

Edit mnttab to clear stale mount

If a mount goes stale and is unable to be removed using umount command and no other option is seen except a reboot. Below can be tried out

Take a backup and move the mnttab file

root@Sol10-sys1 # cp /etc/mnttab /etc/tab
root@Sol10-sys1 # mv /etc/mnttab /etc/mnttab.bk
root@Sol10-sys1 # chmod 644 /etc/tab      

Edit and remove the stale mount

root@Sol10-sys1 # vi /etc/tab

Change permission

root@Sol10-sys1 # cp /etc/tab /etc/mnttab
root@Sol10-sys1 # chmod 444 /etc/mnttab


Remount the mnttab 

root@Sol10-sys1 # mount -F mntfs mnttab /etc/mnttab