SlideShare a Scribd company logo
How do I forcefully unmount a Linux disk partition?
by nixcraft on January 27, 2006 · 6 comments
It happens many times you try to unmount a disk partition or mounted CD/DVD disk
and if you try to unmount device, which is accessed by other users, then you
will get error umount: /xxx: device is busy. However, Linux/FreeBSD comes with
fuser command to kill forcefully mounted partition.
Understanding device error busy error
What happens basically, is that Linux / UNIX will not allow you to unmount a
device that is busy. There are many reasons for this (such as program accessing
partition or open file) , but the most important one is to prevent data loss.
Try the following command to find out what processes have activities on the
device/partition. If your device name is /dev/sdb1, enter the following command
as root user:
# lsof | grep '/dev/sda1'
Output:
vi 4453 vivek 3u BLK 8,1 8167
/dev/sda1Above output tells that user vivek has a vi process running that is
using /dev/sda1. All you have to do is stop vi process and run umount again. As
soon as that program terminates its task, the device will no longer be busy and
you can unmount it with the following command:
# umount /dev/sda1
Following disussion allows you to unmout device and partition forcefully using
Linux commands.
Linux fuser command to forcefully unmount a disk partition
Suppose you have /dev/sda1 mounted on /mnt directory then you can use fuser
command as follows:
WARNING! These examples may result into data loss if not executed properly (see
"Understanding device error busy error" for more information).
Type the command to unmount /mnt forcefully:
# fuser -km /mnt
Where,
-k : Kill processes accessing the file.
-m : Name specifies a file on a mounted file system or a block device that is
mounted. In above example you are using /mnt
Linux umount command to unmount a disk partition
You can also try umount command with –l option:
# umount -l /mnt
Where,
-l : Also known as Lazy unmount. Detach the filesystem from the filesystem
hierarchy now, and cleanup all references to the filesystem as soon as it is not
busy anymore. This option works with kernel version 2.4.11+ and above only.
If you would like to unmount a NFS mount point then try following command:
# umount -f /mnt
Where,
-f: Force unmount in case of an unreachable NFS system
Caution: Using these commands or option can cause data loss for open files;
programs which access files after the file system has been unmounted will get an
error.
Ad

More Related Content

What's hot (19)

Cd rom on solaris
Cd rom  on solarisCd rom  on solaris
Cd rom on solaris
Bui Van Cuong
 
Practical Introduction To Linux
Practical Introduction To LinuxPractical Introduction To Linux
Practical Introduction To Linux
Zeeshan Rizvi
 
Development platform virtualization using qemu
Development platform virtualization using qemuDevelopment platform virtualization using qemu
Development platform virtualization using qemu
Premjith Achemveettil
 
Fedora Linux
Fedora LinuxFedora Linux
Fedora Linux
Gaurav Paliwal
 
Mac book i phone android
Mac book i phone androidMac book i phone android
Mac book i phone android
Tapan Khilar
 
Educational operating system-Minix&Weenix
Educational operating system-Minix&WeenixEducational operating system-Minix&Weenix
Educational operating system-Minix&Weenix
Student
 
Installing NetWare 5 Servers
Installing NetWare 5 ServersInstalling NetWare 5 Servers
Installing NetWare 5 Servers
shammi mehra
 
STUDY EDUCATIONAL OPERATING SYSTEM MINIX OPERATING SYSTEM AND DEVELOP REASO...
STUDY  EDUCATIONAL OPERATING  SYSTEM MINIX OPERATING SYSTEM AND DEVELOP REASO...STUDY  EDUCATIONAL OPERATING  SYSTEM MINIX OPERATING SYSTEM AND DEVELOP REASO...
STUDY EDUCATIONAL OPERATING SYSTEM MINIX OPERATING SYSTEM AND DEVELOP REASO...
ANJALAI AMMAL MAHALINGAM ENGINEERING COLLEGE
 
Installation of linux mint 18 sarah
Installation of linux mint 18 sarahInstallation of linux mint 18 sarah
Installation of linux mint 18 sarah
Adich3
 
Ch12
Ch12Ch12
Ch12
Raja Waseem Akhtar
 
linux file system
linux file systemlinux file system
linux file system
AryaTadbir Network Designers
 
Beyond desktop/server with GNU/Linux (archived)
Beyond desktop/server with GNU/Linux (archived)Beyond desktop/server with GNU/Linux (archived)
Beyond desktop/server with GNU/Linux (archived)
Bud Siddhisena
 
Black book malicious linux command
Black book   malicious linux commandBlack book   malicious linux command
Black book malicious linux command
vxer
 
Install zpanel on linux server in 5 minutes
Install zpanel on linux server in 5 minutesInstall zpanel on linux server in 5 minutes
Install zpanel on linux server in 5 minutes
Samuel Guebo
 
Rhel 7 root password reset
Rhel 7 root password resetRhel 7 root password reset
Rhel 7 root password reset
Md Shihab
 
Cd rom mounting cdro-ms on solaris
Cd rom mounting cdro-ms on solarisCd rom mounting cdro-ms on solaris
Cd rom mounting cdro-ms on solaris
Bui Van Cuong
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02
FNian
 
Tomoyo linux introduction
Tomoyo linux introductionTomoyo linux introduction
Tomoyo linux introduction
Toshiharu Harada, Ph.D
 
ovs-2.3.1 on debian 8.1
ovs-2.3.1 on debian 8.1ovs-2.3.1 on debian 8.1
ovs-2.3.1 on debian 8.1
Clive Peng
 
Practical Introduction To Linux
Practical Introduction To LinuxPractical Introduction To Linux
Practical Introduction To Linux
Zeeshan Rizvi
 
Development platform virtualization using qemu
Development platform virtualization using qemuDevelopment platform virtualization using qemu
Development platform virtualization using qemu
Premjith Achemveettil
 
Mac book i phone android
Mac book i phone androidMac book i phone android
Mac book i phone android
Tapan Khilar
 
Educational operating system-Minix&Weenix
Educational operating system-Minix&WeenixEducational operating system-Minix&Weenix
Educational operating system-Minix&Weenix
Student
 
Installing NetWare 5 Servers
Installing NetWare 5 ServersInstalling NetWare 5 Servers
Installing NetWare 5 Servers
shammi mehra
 
Installation of linux mint 18 sarah
Installation of linux mint 18 sarahInstallation of linux mint 18 sarah
Installation of linux mint 18 sarah
Adich3
 
Beyond desktop/server with GNU/Linux (archived)
Beyond desktop/server with GNU/Linux (archived)Beyond desktop/server with GNU/Linux (archived)
Beyond desktop/server with GNU/Linux (archived)
Bud Siddhisena
 
Black book malicious linux command
Black book   malicious linux commandBlack book   malicious linux command
Black book malicious linux command
vxer
 
Install zpanel on linux server in 5 minutes
Install zpanel on linux server in 5 minutesInstall zpanel on linux server in 5 minutes
Install zpanel on linux server in 5 minutes
Samuel Guebo
 
Rhel 7 root password reset
Rhel 7 root password resetRhel 7 root password reset
Rhel 7 root password reset
Md Shihab
 
Cd rom mounting cdro-ms on solaris
Cd rom mounting cdro-ms on solarisCd rom mounting cdro-ms on solaris
Cd rom mounting cdro-ms on solaris
Bui Van Cuong
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02
FNian
 
ovs-2.3.1 on debian 8.1
ovs-2.3.1 on debian 8.1ovs-2.3.1 on debian 8.1
ovs-2.3.1 on debian 8.1
Clive Peng
 

Viewers also liked (9)

7 linux fdisk command examples to manage hard disk partition
7 linux fdisk command examples to manage hard disk partition7 linux fdisk command examples to manage hard disk partition
7 linux fdisk command examples to manage hard disk partition
chinkshady
 
SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
Dhaval Sakhiya
 
Operating System 5
Operating System 5Operating System 5
Operating System 5
tech2click
 
Loaders
LoadersLoaders
Loaders
Mohd Arif
 
Ch 4 linker loader
Ch 4 linker loaderCh 4 linker loader
Ch 4 linker loader
Malek Sumaiya
 
System software
System softwareSystem software
System software
Senthil Kanth
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loaders
Tech_MX
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
Shubhashish Punj
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
Manoj Patil
 
7 linux fdisk command examples to manage hard disk partition
7 linux fdisk command examples to manage hard disk partition7 linux fdisk command examples to manage hard disk partition
7 linux fdisk command examples to manage hard disk partition
chinkshady
 
Operating System 5
Operating System 5Operating System 5
Operating System 5
tech2click
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loaders
Tech_MX
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
Manoj Patil
 
Ad

Similar to Forcefully unmount a linux disk partition (20)

Ch12 system administration
Ch12 system administration Ch12 system administration
Ch12 system administration
Raja Waseem Akhtar
 
How to mount and unmount filesystem
How to mount and unmount filesystemHow to mount and unmount filesystem
How to mount and unmount filesystem
COMSATS
 
Unix Administration 4
Unix Administration 4Unix Administration 4
Unix Administration 4
Information Technology
 
101 2.1 design hard disk layout
101 2.1 design hard disk layout101 2.1 design hard disk layout
101 2.1 design hard disk layout
Acácio Oliveira
 
Clase10 (consola linux)
Clase10 (consola linux)Clase10 (consola linux)
Clase10 (consola linux)
Miguel Eduardo Luces
 
Unix Administration
Unix AdministrationUnix Administration
Unix Administration
Nishant Munjal
 
FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016FreeBSD Portscamp, Kuala Lumpur 2016
FreeBSD Portscamp, Kuala Lumpur 2016
Muhammad Moinur Rahman
 
101 4.2 maintain the integrity of filesystems
101 4.2 maintain the integrity of filesystems101 4.2 maintain the integrity of filesystems
101 4.2 maintain the integrity of filesystems
Acácio Oliveira
 
101 4.3 control mounting and unmounting of filesystems
101 4.3 control mounting and unmounting of filesystems101 4.3 control mounting and unmounting of filesystems
101 4.3 control mounting and unmounting of filesystems
Acácio Oliveira
 
Sahul
SahulSahul
Sahul
sahul azzez m.i
 
Sahul
SahulSahul
Sahul
sahul azzez m.i
 
Solaris basics
Solaris basicsSolaris basics
Solaris basics
Ashwin Pawar
 
Mac Forensics
Mac ForensicsMac Forensics
Mac Forensics
CTIN
 
pptdisk
pptdiskpptdisk
pptdisk
Mukhtiar ali burfat
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
Information Technology
 
Cd rom how solaris manages cd-rom and diskette devices
Cd rom how solaris manages cd-rom and diskette devicesCd rom how solaris manages cd-rom and diskette devices
Cd rom how solaris manages cd-rom and diskette devices
Bui Van Cuong
 
Linux
LinuxLinux
Linux
Hemakumar.S
 
Unix Security
Unix SecurityUnix Security
Unix Security
replay21
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
Saikat Rakshit
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
Craig Cannon
 
How to mount and unmount filesystem
How to mount and unmount filesystemHow to mount and unmount filesystem
How to mount and unmount filesystem
COMSATS
 
101 2.1 design hard disk layout
101 2.1 design hard disk layout101 2.1 design hard disk layout
101 2.1 design hard disk layout
Acácio Oliveira
 
101 4.2 maintain the integrity of filesystems
101 4.2 maintain the integrity of filesystems101 4.2 maintain the integrity of filesystems
101 4.2 maintain the integrity of filesystems
Acácio Oliveira
 
101 4.3 control mounting and unmounting of filesystems
101 4.3 control mounting and unmounting of filesystems101 4.3 control mounting and unmounting of filesystems
101 4.3 control mounting and unmounting of filesystems
Acácio Oliveira
 
Mac Forensics
Mac ForensicsMac Forensics
Mac Forensics
CTIN
 
Cd rom how solaris manages cd-rom and diskette devices
Cd rom how solaris manages cd-rom and diskette devicesCd rom how solaris manages cd-rom and diskette devices
Cd rom how solaris manages cd-rom and diskette devices
Bui Van Cuong
 
Unix Security
Unix SecurityUnix Security
Unix Security
replay21
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
Saikat Rakshit
 
The one page linux manual
The one page linux manualThe one page linux manual
The one page linux manual
Craig Cannon
 
Ad

More from Muqthiyar Pasha (10)

Printing in linux with cups
Printing in linux with cupsPrinting in linux with cups
Printing in linux with cups
Muqthiyar Pasha
 
Mount windows cdrom in linux
Mount windows cdrom in linuxMount windows cdrom in linux
Mount windows cdrom in linux
Muqthiyar Pasha
 
Find and zip files
Find and zip filesFind and zip files
Find and zip files
Muqthiyar Pasha
 
Restricting unix users
Restricting unix usersRestricting unix users
Restricting unix users
Muqthiyar Pasha
 
Determine 64 or 32 bit unix kernel and hw
Determine  64 or 32 bit unix kernel and hwDetermine  64 or 32 bit unix kernel and hw
Determine 64 or 32 bit unix kernel and hw
Muqthiyar Pasha
 
Unzip and extract tar.gz
Unzip and extract tar.gzUnzip and extract tar.gz
Unzip and extract tar.gz
Muqthiyar Pasha
 
Oracle application tech stack tips and queries for troubleshooting advanced t...
Oracle application tech stack tips and queries for troubleshooting advanced t...Oracle application tech stack tips and queries for troubleshooting advanced t...
Oracle application tech stack tips and queries for troubleshooting advanced t...
Muqthiyar Pasha
 
How to install oracle ops center 12c
How to install oracle ops center 12cHow to install oracle ops center 12c
How to install oracle ops center 12c
Muqthiyar Pasha
 
Retrieve apps password in r12 or forgot apps password in r12
Retrieve apps password in r12 or forgot apps password in r12Retrieve apps password in r12 or forgot apps password in r12
Retrieve apps password in r12 or forgot apps password in r12
Muqthiyar Pasha
 
Get to know oracle apps username and pwd
Get to know oracle apps username and pwdGet to know oracle apps username and pwd
Get to know oracle apps username and pwd
Muqthiyar Pasha
 
Printing in linux with cups
Printing in linux with cupsPrinting in linux with cups
Printing in linux with cups
Muqthiyar Pasha
 
Mount windows cdrom in linux
Mount windows cdrom in linuxMount windows cdrom in linux
Mount windows cdrom in linux
Muqthiyar Pasha
 
Determine 64 or 32 bit unix kernel and hw
Determine  64 or 32 bit unix kernel and hwDetermine  64 or 32 bit unix kernel and hw
Determine 64 or 32 bit unix kernel and hw
Muqthiyar Pasha
 
Unzip and extract tar.gz
Unzip and extract tar.gzUnzip and extract tar.gz
Unzip and extract tar.gz
Muqthiyar Pasha
 
Oracle application tech stack tips and queries for troubleshooting advanced t...
Oracle application tech stack tips and queries for troubleshooting advanced t...Oracle application tech stack tips and queries for troubleshooting advanced t...
Oracle application tech stack tips and queries for troubleshooting advanced t...
Muqthiyar Pasha
 
How to install oracle ops center 12c
How to install oracle ops center 12cHow to install oracle ops center 12c
How to install oracle ops center 12c
Muqthiyar Pasha
 
Retrieve apps password in r12 or forgot apps password in r12
Retrieve apps password in r12 or forgot apps password in r12Retrieve apps password in r12 or forgot apps password in r12
Retrieve apps password in r12 or forgot apps password in r12
Muqthiyar Pasha
 
Get to know oracle apps username and pwd
Get to know oracle apps username and pwdGet to know oracle apps username and pwd
Get to know oracle apps username and pwd
Muqthiyar Pasha
 

Recently uploaded (20)

S3 + AWS Athena how to integrate s3 aws plus athena
S3 + AWS Athena how to integrate s3 aws plus athenaS3 + AWS Athena how to integrate s3 aws plus athena
S3 + AWS Athena how to integrate s3 aws plus athena
aianand98
 
Unit Two - Java Architecture and OOPS
Unit Two  -   Java Architecture and OOPSUnit Two  -   Java Architecture and OOPS
Unit Two - Java Architecture and OOPS
Nabin Dhakal
 
!%& IDM Crack with Internet Download Manager 6.42 Build 32 >
!%& IDM Crack with Internet Download Manager 6.42 Build 32 >!%& IDM Crack with Internet Download Manager 6.42 Build 32 >
!%& IDM Crack with Internet Download Manager 6.42 Build 32 >
Ranking Google
 
Lumion Pro Crack + 2025 Activation Key Free Code
Lumion Pro Crack + 2025 Activation Key Free CodeLumion Pro Crack + 2025 Activation Key Free Code
Lumion Pro Crack + 2025 Activation Key Free Code
raheemk1122g
 
Welcome to QA Summit 2025.
Welcome to QA Summit 2025.Welcome to QA Summit 2025.
Welcome to QA Summit 2025.
QA Summit
 
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studiesTroubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Tier1 app
 
Serato DJ Pro Crack Latest Version 2025??
Serato DJ Pro Crack Latest Version 2025??Serato DJ Pro Crack Latest Version 2025??
Serato DJ Pro Crack Latest Version 2025??
Web Designer
 
Download MathType Crack Version 2025???
Download MathType Crack  Version 2025???Download MathType Crack  Version 2025???
Download MathType Crack Version 2025???
Google
 
Robotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptxRobotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptx
julia smits
 
Why CoTester Is the AI Testing Tool QA Teams Can’t Ignore
Why CoTester Is the AI Testing Tool QA Teams Can’t IgnoreWhy CoTester Is the AI Testing Tool QA Teams Can’t Ignore
Why CoTester Is the AI Testing Tool QA Teams Can’t Ignore
Shubham Joshi
 
Best HR and Payroll Software in Bangladesh - accordHRM
Best HR and Payroll Software in Bangladesh - accordHRMBest HR and Payroll Software in Bangladesh - accordHRM
Best HR and Payroll Software in Bangladesh - accordHRM
accordHRM
 
Comprehensive Incident Management System for Enhanced Safety Reporting
Comprehensive Incident Management System for Enhanced Safety ReportingComprehensive Incident Management System for Enhanced Safety Reporting
Comprehensive Incident Management System for Enhanced Safety Reporting
EHA Soft Solutions
 
Programs as Values - Write code and don't get lost
Programs as Values - Write code and don't get lostPrograms as Values - Write code and don't get lost
Programs as Values - Write code and don't get lost
Pierangelo Cecchetto
 
AEM User Group DACH - 2025 Inaugural Meeting
AEM User Group DACH - 2025 Inaugural MeetingAEM User Group DACH - 2025 Inaugural Meeting
AEM User Group DACH - 2025 Inaugural Meeting
jennaf3
 
How to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber PluginHow to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber Plugin
eGrabber
 
Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...
Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...
Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...
jamesmartin143256
 
Digital Twins Software Service in Belfast
Digital Twins Software Service in BelfastDigital Twins Software Service in Belfast
Digital Twins Software Service in Belfast
julia smits
 
Artificial hand using embedded system.pptx
Artificial hand using embedded system.pptxArtificial hand using embedded system.pptx
Artificial hand using embedded system.pptx
bhoomigowda12345
 
Do not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your causeDo not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your cause
Fexle Services Pvt. Ltd.
 
Solar-wind hybrid engery a system sustainable power
Solar-wind  hybrid engery a system sustainable powerSolar-wind  hybrid engery a system sustainable power
Solar-wind hybrid engery a system sustainable power
bhoomigowda12345
 
S3 + AWS Athena how to integrate s3 aws plus athena
S3 + AWS Athena how to integrate s3 aws plus athenaS3 + AWS Athena how to integrate s3 aws plus athena
S3 + AWS Athena how to integrate s3 aws plus athena
aianand98
 
Unit Two - Java Architecture and OOPS
Unit Two  -   Java Architecture and OOPSUnit Two  -   Java Architecture and OOPS
Unit Two - Java Architecture and OOPS
Nabin Dhakal
 
!%& IDM Crack with Internet Download Manager 6.42 Build 32 >
!%& IDM Crack with Internet Download Manager 6.42 Build 32 >!%& IDM Crack with Internet Download Manager 6.42 Build 32 >
!%& IDM Crack with Internet Download Manager 6.42 Build 32 >
Ranking Google
 
Lumion Pro Crack + 2025 Activation Key Free Code
Lumion Pro Crack + 2025 Activation Key Free CodeLumion Pro Crack + 2025 Activation Key Free Code
Lumion Pro Crack + 2025 Activation Key Free Code
raheemk1122g
 
Welcome to QA Summit 2025.
Welcome to QA Summit 2025.Welcome to QA Summit 2025.
Welcome to QA Summit 2025.
QA Summit
 
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studiesTroubleshooting JVM Outages – 3 Fortune 500 case studies
Troubleshooting JVM Outages – 3 Fortune 500 case studies
Tier1 app
 
Serato DJ Pro Crack Latest Version 2025??
Serato DJ Pro Crack Latest Version 2025??Serato DJ Pro Crack Latest Version 2025??
Serato DJ Pro Crack Latest Version 2025??
Web Designer
 
Download MathType Crack Version 2025???
Download MathType Crack  Version 2025???Download MathType Crack  Version 2025???
Download MathType Crack Version 2025???
Google
 
Robotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptxRobotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptx
julia smits
 
Why CoTester Is the AI Testing Tool QA Teams Can’t Ignore
Why CoTester Is the AI Testing Tool QA Teams Can’t IgnoreWhy CoTester Is the AI Testing Tool QA Teams Can’t Ignore
Why CoTester Is the AI Testing Tool QA Teams Can’t Ignore
Shubham Joshi
 
Best HR and Payroll Software in Bangladesh - accordHRM
Best HR and Payroll Software in Bangladesh - accordHRMBest HR and Payroll Software in Bangladesh - accordHRM
Best HR and Payroll Software in Bangladesh - accordHRM
accordHRM
 
Comprehensive Incident Management System for Enhanced Safety Reporting
Comprehensive Incident Management System for Enhanced Safety ReportingComprehensive Incident Management System for Enhanced Safety Reporting
Comprehensive Incident Management System for Enhanced Safety Reporting
EHA Soft Solutions
 
Programs as Values - Write code and don't get lost
Programs as Values - Write code and don't get lostPrograms as Values - Write code and don't get lost
Programs as Values - Write code and don't get lost
Pierangelo Cecchetto
 
AEM User Group DACH - 2025 Inaugural Meeting
AEM User Group DACH - 2025 Inaugural MeetingAEM User Group DACH - 2025 Inaugural Meeting
AEM User Group DACH - 2025 Inaugural Meeting
jennaf3
 
How to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber PluginHow to Install and Activate ListGrabber Plugin
How to Install and Activate ListGrabber Plugin
eGrabber
 
Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...
Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...
Bridging Sales & Marketing Gaps with IInfotanks’ Salesforce Account Engagemen...
jamesmartin143256
 
Digital Twins Software Service in Belfast
Digital Twins Software Service in BelfastDigital Twins Software Service in Belfast
Digital Twins Software Service in Belfast
julia smits
 
Artificial hand using embedded system.pptx
Artificial hand using embedded system.pptxArtificial hand using embedded system.pptx
Artificial hand using embedded system.pptx
bhoomigowda12345
 
Do not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your causeDo not let staffing shortages and limited fiscal view hamper your cause
Do not let staffing shortages and limited fiscal view hamper your cause
Fexle Services Pvt. Ltd.
 
Solar-wind hybrid engery a system sustainable power
Solar-wind  hybrid engery a system sustainable powerSolar-wind  hybrid engery a system sustainable power
Solar-wind hybrid engery a system sustainable power
bhoomigowda12345
 

Forcefully unmount a linux disk partition

  • 1. How do I forcefully unmount a Linux disk partition? by nixcraft on January 27, 2006 · 6 comments It happens many times you try to unmount a disk partition or mounted CD/DVD disk and if you try to unmount device, which is accessed by other users, then you will get error umount: /xxx: device is busy. However, Linux/FreeBSD comes with fuser command to kill forcefully mounted partition. Understanding device error busy error What happens basically, is that Linux / UNIX will not allow you to unmount a device that is busy. There are many reasons for this (such as program accessing partition or open file) , but the most important one is to prevent data loss. Try the following command to find out what processes have activities on the device/partition. If your device name is /dev/sdb1, enter the following command as root user: # lsof | grep '/dev/sda1' Output: vi 4453 vivek 3u BLK 8,1 8167 /dev/sda1Above output tells that user vivek has a vi process running that is using /dev/sda1. All you have to do is stop vi process and run umount again. As soon as that program terminates its task, the device will no longer be busy and you can unmount it with the following command: # umount /dev/sda1 Following disussion allows you to unmout device and partition forcefully using Linux commands. Linux fuser command to forcefully unmount a disk partition Suppose you have /dev/sda1 mounted on /mnt directory then you can use fuser command as follows: WARNING! These examples may result into data loss if not executed properly (see "Understanding device error busy error" for more information). Type the command to unmount /mnt forcefully: # fuser -km /mnt Where, -k : Kill processes accessing the file. -m : Name specifies a file on a mounted file system or a block device that is mounted. In above example you are using /mnt Linux umount command to unmount a disk partition You can also try umount command with –l option: # umount -l /mnt Where, -l : Also known as Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. This option works with kernel version 2.4.11+ and above only. If you would like to unmount a NFS mount point then try following command: # umount -f /mnt Where, -f: Force unmount in case of an unreachable NFS system Caution: Using these commands or option can cause data loss for open files; programs which access files after the file system has been unmounted will get an error.
  翻译: