External drives and secondary storage devices are essential tools for many Bazzite Linux users, whether for gaming libraries, backups, or general file storage. However, sometimes a simple “Unmount” action fails and displays an error such as “Target is busy” or refuses to detach even when forced. This can be frustrating and worrying, especially if the drive contains important data. Understanding why it happens and how to safely resolve it is key to preventing corruption and maintaining system stability.
TLDR: If a drive won’t unmount on Bazzite Linux and shows “Target is busy,” it usually means a file, process, or terminal session is still using it. Close open files, exit directories on the drive, and identify blocking processes using commands like lsof or fuser. If necessary, use umount -l for a lazy unmount or carefully stop related services. Avoid forcing unmounts unless absolutely necessary to prevent data loss.
Why “Target Is Busy” Happens
On Linux systems like Bazzite, unmounting a drive requires that no active process is using it. When the system reports “Target is busy”, it means something is still accessing the filesystem. Linux prevents unmounting in this situation to protect data integrity.
Common causes include:
- An open file stored on the drive
- A terminal window with its current directory set to the mounted path
- A running application (such as Steam, a media player, or file indexer)
- A background service accessing logs or data
- A swap file or bind mount configured on the drive
In Bazzite, which is often used for gaming and multimedia tasks, active game libraries or background syncing services are frequent culprits.
Step 1: Close Applications and File Managers
The first and simplest step is to close any open applications that may be using the drive. This includes:
- File managers like Nautilus, Dolphin, or Thunar
- Steam (especially if games are installed on the drive)
- Media players or video editors
- Backup or synchronization tools
If a file manager window is open and displaying content from the drive, it can prevent unmounting. Close the window completely.
Additionally, check any terminal windows. If a shell session is currently inside the mounted directory (for example, /run/media/user/externaldrive), Linux will block the unmount.
pwd
If the printed path is on the external drive, navigate away:
cd ~
Step 2: Identify What’s Using the Drive
If the issue persists, the next step is identifying the specific process keeping the drive busy.
Using lsof
sudo lsof +D /mount/point
This command lists open files under the specified mount point. Replace /mount/point with the actual location of your drive.
Using fuser
sudo fuser -vm /mount/point
This command shows processes accessing the mount. It often provides a clearer overview.
Once identified, note the PID (process ID) of the offending process. You can stop it with:
sudo kill PID
If it refuses to stop:
sudo kill -9 PID
However, using -9 should be a last resort, as it forcefully terminates the process and may result in data loss.
Step 3: Try a Standard Unmount via Terminal
Instead of relying on the graphical “Eject” option, try unmounting manually in the terminal:
sudo umount /mount/point
If the system no longer reports the drive as busy, it should unmount cleanly. If the error persists, consider alternative unmount methods.
Using Lazy Unmount
If processes have already closed but the kernel still considers the device busy, a lazy unmount may help:
sudo umount -l /mount/point
The -l option detaches the filesystem immediately but cleans up references once they are no longer active. This method is generally safe and preferable to forceful unmounting.
Using Force Unmount (With Caution)
A force unmount can be attempted with:
sudo umount -f /mount/point
This option is more commonly used for network filesystems. On local drives, it may not always work as expected. It is important to note that force unmounting can lead to:
- Data corruption
- Incomplete writes
- Filesystem inconsistencies
Only use this if all other methods fail and you understand the risks.
Special Case: Steam and Gaming Libraries on Bazzite
Bazzite is popular among gamers, and many users store Steam libraries on secondary drives. Steam often keeps background processes open even after closing the main window.
To fully stop Steam:
steam --shutdown
Or confirm no processes remain:
ps aux | grep steam
Kill any remaining Steam processes before attempting to unmount again.
Check for Swap or Bind Mounts
If the drive contains a swap file or is configured in /etc/fstab, it may automatically mount or remain active.
To check active swaps:
swapon --show
If the drive is listed, disable swap:
sudo swapoff /path/to/swapfile
Also inspect:
/etc/fstab
Look for entries referencing the drive and temporarily comment them out if necessary.
If All Else Fails: Reboot
Sometimes the simplest solution is a controlled system reboot. Restarting Bazzite clears all processes and releases mounted filesystems safely.
Before rebooting, ensure:
- All work is saved
- No file transfers are in progress
After reboot, avoid immediately reconnecting and removing the device without properly checking its state.
Image not found in postmetaPreventing Future Unmount Issues
To reduce the likelihood of encountering “Target is busy” again:
- Always close applications using the drive before ejecting
- Avoid running active games or media from removable storage while unplugging
- Wait for file transfers to fully complete
- Use the terminal to verify no processes remain
- Consider dedicated mount points instead of random temporary paths
Building a habit of properly detaching external storage ensures filesystem health and prolongs the lifespan of your hardware.
Conclusion
When a drive won’t unmount on Bazzite Linux and displays the “Target is busy” error, it is almost always due to an active file or process. While the message can be alarming, it serves as a protective measure rather than a malfunction. By systematically closing applications, identifying open processes with lsof or fuser, and using safe unmount methods like lazy unmounting, users can resolve the issue without risking data loss.
Force unmounting should remain a last resort. With careful troubleshooting and a clear understanding of how Linux handles mounted filesystems, unmount errors become manageable rather than mysterious obstacles.
FAQ
Why does Linux say “Target is busy” even when no files are open?
Even if no visible files are open, a process may still have a handle on the filesystem. Background services, indexing tools, or a terminal session inside the directory can trigger the error.
Is it safe to use umount -l?
Yes, in most cases lazy unmounting is safe. It detaches the filesystem while allowing existing operations to finish naturally.
Can force unmount damage my drive?
It can cause data corruption if writes are still pending. Force unmount should only be used when absolutely necessary and when you accept the risks.
Does rebooting fix the issue?
Yes. Rebooting terminates all processes and releases mounted filesystems, often resolving stubborn unmount problems.
Why does Steam prevent my drive from unmounting?
Steam may continue running background services even after the main window closes. Fully shutting down Steam ensures it releases control of the drive.
How can I check if my drive is still mounted?
Use mount or lsblk in the terminal to see active mount points and verify whether the filesystem is still attached.