Error /dev/rmt0 Device busy in Sun Solaris

If you are an Administrator and especially a backup administrator there is a very high chance that you get stuck with the following error message with your backup:

/dev/rmt0 Device busy

If you do a

# mt -f /dev/rmt0n status (infact any option with the mt or related command)

and end up with the error

/dev/rmt0n: Device Busy

then the most probable problem could be your Tape drive is still being used by the backup program or  some related process.

The first thing to check would which process has locked your Tape drive. This can be done using the fuser utility.

# fuser -u /dev/rmt/0n

This will output the process ID that is actually holding the /dev/rmt0n device.

The fuser can also be used against files.

Now, use

#ps -ef | grep <process ID returned by fuser>

This will show the process.

Now, kill the process using

# kill <PID>

If this fails, then use

# kill -9 <PID>

if still fails, use

#pkill -9 <PID>

 That should do.

You can check by using

# mt -f /dev/rmt0n status

3 thoughts on “Error /dev/rmt0 Device busy in Sun Solaris”

  1. Hi,

    Unfortunately i tried “mt -d /dev/rmt/0 offline”. Could you please let me know the procedure to bring tape drive online?

    Thanks,
    Raja

Leave a Comment

Your email address will not be published. Required fields are marked *