umount: /dev/shm: device is busy.(In some cases useful info about processes that usethe device is found by lsof(8) or fuser(1))

Cause:

When try to unmount tmpfs from system, some processes which use the /dev/shm are not allowing to release the mount

[root@orcldg CVU_12.1.0.2.0_oracle]# umount tmpfs
umount: /dev/shm: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

Workaround:

Check the process which access the tmpfs mount

[root@orcldg CVU_12.1.0.2.0_oracle]# lsof|grep /dev/shm|head
gnome-pow 5753       gdm  mem       REG               0,16  67108904                74930 /dev/shm/pulse-shm-1912185855
pulseaudi 5765       gdm  mem       REG               0,16  67108904                19555 /dev/shm/pulse-shm-4123376116
asm_pmon_ 5883      grid  mem       REG               0,16   4194304                30599 /dev/shm/ora_+ASM_105840646_0
asm_pmon_ 5883      grid  mem       REG               0,16         0                30603 /dev/shm/ora_+ASM_105873415_0
asm_pmon_ 5883      grid  mem       REG               0,16         0                30604 /dev/shm/ora_+ASM_105873415_1
asm_pmon_ 5883      grid  mem       REG               0,16         0                30605 /dev/shm/ora_+ASM_105873415_2
asm_pmon_ 5883      grid  mem       REG               0,16         0                30606 /dev/shm/ora_+ASM_105873415_3
asm_pmon_ 5883      grid  mem       REG               0,16         0                30607 /dev/shm/ora_+ASM_105873415_4
asm_pmon_ 5883      grid  mem       REG               0,16         0                30608 /dev/shm/ora_+ASM_105873415_5
asm_pmon_ 5883      grid  mem       REG               0,16         0                30609 /dev/shm/ora_+ASM_105873415_6

In my case, ASM was up and running. Warning: If you are in production database,then this step is not recommended

[grid@orcl ~]$ srvctl stop asm -f
[grid@orcl ~]$

Check again the processes accessing the shm

[root@orcl oracle]# lsof|grep /dev/shm
gnome-pow 5891       gdm  mem       REG               0,16  67108904      59571 /dev/shm/pulse-shm-2901322705
pulseaudi 5903       gdm  mem       REG               0,16  67108904      18199 /dev/shm/pulse-shm-1163139171

kill the process pid forcefully

[root@orcl oracle]# kill -9 5891 5903

Now there are no process accessing the database. We are good to unmount!

[root@orcl oracle]# lsof|grep /dev/shm
[root@orcl oracle]# umount tmpfs

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s