Ubuntu Mounting Error: Resource Temporarily Unavailable

Updated: January 28, 2024 By: Guest Contributor Post a comment

The Problem

Encountering errors while mounting filesystems in Ubuntu can be a hassle, especially the ‘Resource temporarily unavailable’ error. This issue might emerge while using external storage devices, network file systems, or even local disk partitions. In this guide, we will uncover the reasons behind this error and walk through several solutions to resolve the issue effectively.

Common Causes

The ‘Resource temporarily unavailable’ error in Ubuntu often occurs due to device filesystem corruption, conflicts with mount points, or issues with the system’s process that manages filesystems. Additionally, improper disconnection of devices or software bugs can be contributing factors.

Solution 1: Eject and Reconnect the Device

Sometimes the simplest fix involves just reconnecting the device. This can resolve temporary communication glitches that might prevent proper mounting.

  1. Disconnect the external device from your system.
  2. Wait a few seconds.
  3. Reconnect the device to your computer.
  4. Attempt to mount the device again using the file manager or the mount command.

Note: Although this method is simple and non-invasive, it might not fix underlying issues if the error persists after the reconnection.

Solution 2: Check for Active Processes

At times, other system processes may be using the resource, causing the error to appear. Identifying and handling these processes can free up the resource.

  1. Open the terminal using Ctrl+Alt+T.
  2. Run the following command to identify the blocking process: lsof | grep 'DEVICE_NAME'.
  3. If a process is using the device, consider closing the involved application or terminate the process.
  4. To terminate a process, use: kill -9 PROCESS_ID where PROCESS_ID is the identified process ID.

Note: Using kill -9 should be a last resort as it abruptly terminates processes and could lead to data loss or system instability.

Solution 3: Filesystem Check and Repair

Filesystem corruption is a common culprit for the error. You can use system utilities to check and repair the filesystem.

  1. Unmount the filesystem (if it’s mounted): umount /dev/sdx1
  2. Check and repair the filesystem using fsck: sudo fsck /dev/sdx1
  3. Follow prompts to fix any detected issues.
  4. Attempt to remount the filesystem.

Example:

$ sudo umount /dev/sdx1
$ sudo fsck /dev/sdx1

fsck from util-linux 2.34
Pass 1: Checking inodes, blocks, and sizes
...

Note: Ensure no data is written to the storage during the filesystem check. Loss of data could occur if fsck is run on an active filesystem.

Solution 4: Reboot the System

If the system is facing a temporary software glitch, a reboot may resolve the mounting error.

  1. Close all open applications properly.
  2. Click the power icon on the top right of your desktop and select ‘Restart’ or run sudo reboot in the terminal.

Note: While rebooting is often an effective measure, it does not address the root cause if the issue is recurring.

Conclusion

By following this guide, Ubuntu users should be able to troubleshoot and solve the ‘Resource temporarily unavailable’ error. Each solution provided here addresses different potential causes, from simple fixes like reconnecting the device to more in-depth troubleshooting with filesystem checks and process management. Users should proceed cautiously, especially when dealing with filesystem repairs, to avoid any unwanted data loss.