Error Codes Wiki

Linux errno 16 EBUSY Device or Resource Busy — Detailed Troubleshooting Guide

Warningerrno

About Linux errno 16 EBUSY Device or Resource Busy

Fix Linux EBUSY errors when attempting to unmount file systems, modify devices, or access resources currently in use by another process. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.

Here are the key things to understand: EBUSY (errno 16) means the requested resource is currently in use and cannot be exclusively accessed. Most commonly seen when trying to unmount a file system that has open files or running processes. Also occurs when trying to delete kernel modules in use or modify active block devices. The error is designed to prevent data corruption by blocking conflicting operations. Understanding these fundamentals will help you diagnose and resolve this issue more effectively.

The most common reasons this occurs include: Process has its current working directory inside the mount point. Open files or running programs on the file system being unmounted. Kernel module is loaded and in use by another module or device. Block device is part of an active LVM volume group or RAID array. Identifying the root cause is the first step toward finding the right solution.

To resolve this, follow these recommended steps: Find processes using the mount point: lsof +D /mount/point or fuser -mv /mount/point. Kill or stop processes using the resource, then retry the operation. For stubborn unmounts, use lazy unmount: umount -l /mount/point (detaches immediately, cleans up when idle). For kernel modules, check dependencies: lsmod | grep module_name and rmmod dependent modules first. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.

This article is part of our Linux Error Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.

Quick Answer

Is lazy unmount safe?

Lazy unmount (-l) detaches the filesystem from the namespace immediately but completes cleanup when all references are gone. It is generally safe but can mask issues — the underlying device should not be removed until cleanup completes.

Overview

Fix Linux EBUSY errors when attempting to unmount file systems, modify devices, or access resources currently in use by another process.

Key Details

  • EBUSY (errno 16) means the requested resource is currently in use and cannot be exclusively accessed
  • Most commonly seen when trying to unmount a file system that has open files or running processes
  • Also occurs when trying to delete kernel modules in use or modify active block devices
  • The error is designed to prevent data corruption by blocking conflicting operations

Common Causes

  • Process has its current working directory inside the mount point
  • Open files or running programs on the file system being unmounted
  • Kernel module is loaded and in use by another module or device
  • Block device is part of an active LVM volume group or RAID array

Steps

  1. 1Find processes using the mount point: lsof +D /mount/point or fuser -mv /mount/point
  2. 2Kill or stop processes using the resource, then retry the operation
  3. 3For stubborn unmounts, use lazy unmount: umount -l /mount/point (detaches immediately, cleans up when idle)
  4. 4For kernel modules, check dependencies: lsmod | grep module_name and rmmod dependent modules first

Tags

errno-16ebusyumountdevice-busylsof

Related Items

More in Errno

Frequently Asked Questions

Lazy unmount (-l) detaches the filesystem from the namespace immediately but completes cleanup when all references are gone. It is generally safe but can mask issues — the underlying device should not be removed until cleanup completes.