|
|
|
---
|
|
|
|
title: Show processes that block umount
|
|
|
|
aliases: /posts/2021-10-26-processes-accessing-mountpoints
|
|
|
|
summary: >
|
|
|
|
A quick oneliner to list running processes that prevent a filesystem from
|
|
|
|
being unmounted. Using `lsof` or `fuser` for this.
|
|
|
|
date: 2021-10-26T10:06:47+02:00
|
|
|
|
lastmod: 2024-09-28T23:48:06+0000
|
|
|
|
categories: [computerstuff]
|
|
|
|
tags: [linux]
|
|
|
|
---
|
|
|
|
|
|
|
|
Another quick one: I forget this command on a permanent basis, so I write this
|
|
|
|
down here -- maybe this helps.
|
|
|
|
|
|
|
|
```console
|
|
|
|
$ lsof +f -- /media/mountpoint
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Update on 2021-11-21
|
|
|
|
|
|
|
|
You could also use `fuser`. I prefer this one because somehow I cannot use
|
|
|
|
autocompletion with lsof and fuser lets me complete the paths.
|
|
|
|
|
|
|
|
```console
|
|
|
|
$ fuser -vm /media/mountpoint
|
|
|
|
```
|