{ "created": "2015-12-20T19:56:43Z", "hierarchy": [ { "name": "ROOT", "type": "folder", "uri": "/ROOT" }, { "name": "Umounting a Busy Drive", "type": "article", "uri": "Umounting_a_Busy_Drive" } ], "html": "\n\n \n \n \n \n\n \n \n\n \n \n \n \n \n\n Umounting a Busy Drive\n\n \n \n \n \n
\n
\n \n
\n
\n \n \n\n\n

Umounting a Busy Drive

\n\n

This is all too common:

\n
umount: /media/backupdrive: device is busy  \numount: /media/backupdrive: device is busy\n\n## Using lsof\n
\n

You could try lsof to see what’s using the drive. Use the device name\n(/dev/sd*) like so:

\n
lsof | grep sdd\n
\n

Using fuser

\n

A more ‘proper’ approach is to use fuser:

\n
[nikhil@example ~]# fuser -m /dev/sdd5\n/dev/sdd5: 5138\n
\n

So PID 5138 is using the drive. Let’s see what it is:

\n
[nikhil@example ~]# ps aux | grep 5138\nnikhil 5138 0.2 2.7 219212 56792 ? SLl Feb11 11:25 rsync -avh --exclude-from=/home/nikhil/  anifest / /media/backupdrive\n
\n

Aha! Now if you’re confident that you can kill that job, go ahead and\nthen try umounting the drive.

\n\n\n
\n \n
\n \n \n \n \n \n\n", "id": "fb295fa0-5f03-5fd4-9574-dca2c6ef9e2d", "modified": "2022-06-13T23:23:48Z", "revisions": [ { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2022-06-13T23:23:48Z", "id": "6be928c4c8de048934c03e3c61539c9ceec7d59a", "shortId": "6be928c4", "subject": "Update config.yml", "content": "This is all too common:\n\n umount: /media/backupdrive: device is busy \n umount: /media/backupdrive: device is busy\n\n ## Using lsof\n\nYou could try `lsof` to see what's using the drive. Use the device name\n(`/dev/sd*`) like so:\n\n lsof | grep sdd\n\n### Using `fuser`\n\nA more 'proper' approach is to use `fuser`:\n\n [nikhil@example ~]# fuser -m /dev/sdd5\n /dev/sdd5: 5138\n\nSo PID 5138 is using the drive. Let's see what it is:\n\n [nikhil@example ~]# ps aux | grep 5138\n nikhil 5138 0.2 2.7 219212 56792 ? SLl Feb11 11:25 rsync -avh --exclude-from=/home/nikhil/ anifest / /media/backupdrive\n\nAha! Now if you're confident that you can kill that job, go ahead and\nthen try umounting the drive.\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2015-12-27T07:27:56Z", "id": "5a5b1a32f41081d062ab86f8869a961bcad79668", "shortId": "5a5b1a32", "subject": "Fix Markdown conversion\n\nSaw half a season of The Office\n", "content": "This is all too common:\n\n umount: /media/backupdrive: device is busy \n umount: /media/backupdrive: device is busy\n\n ## Using lsof\n\nYou could try `lsof` to see what's using the drive. Use the device name\n(`/dev/sd*`) like so:\n\n lsof | grep sdd\n\n### Using `fuser`\n\nA more 'proper' approach is to use `fuser`:\n\n [nikhil@example ~]# fuser -m /dev/sdd5\n /dev/sdd5: 5138\n\nSo PID 5138 is using the drive. Let's see what it is:\n\n [nikhil@example ~]# ps aux | grep 5138\n nikhil 5138 0.2 2.7 219212 56792 ? SLl Feb11 11:25 rsync -avh --exclude-from=/home/nikhil/ anifest / /media/backupdrive\n\nAha! Now if you're confident that you can kill that job, go ahead and\nthen try umounting the drive.\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2015-12-21T02:30:47Z", "id": "3f2c54b1d767218fcb4855fbac306b015afaf551", "shortId": "3f2c54b1", "subject": "Incremental\n", "content": "This is all too common:\n\n` umount: /media/backupdrive: device is busy` \n` umount: /media/backupdrive: device is busy`\n\n### Using `lsof`\n\nYou could try `lsof` to see what's using the drive. Use the device name\n(`/dev/sd*`) like so:\n\n` lsof | grep sdd`\n\n### Using `fuser`\n\nA more 'proper' approach is to use `fuser`:\n\n` [nikhil@example ~]# `**`fuser` `-m` `/dev/sdd5`** \n` /dev/sdd5: 5138`\n\nSo PID 5138 is using the drive. Let's see what it is:\n\n` [nikhil@example ~]# `**`ps` `aux` `|` `grep` `5138`** \n` nikhil 5138 0.2 2.7 219212 56792 ? SLl Feb11 11:25 rsync -avh --exclude-from=/home/nikhil/manifest / /media/backupdrive`\n\nAha! Now if you're confident that you can kill that job, go ahead and\nthen try umounting the drive.\n" }, { "authorEmail": "mail@nikhil.io", "authorName": "Nikhil Anand", "date": "2015-12-20T19:56:43Z", "id": "cbcbd9cb80d26d5f1648bba280375d05bfd2fa8f", "shortId": "cbcbd9cb", "subject": "Umounting a Busy Drive : First Draft", "content": "This is all too common:\n\n` umount: /media/backupdrive: device is busy` \n` umount: /media/backupdrive: device is busy`\n\n### Using `lsof`\n\nYou could try `lsof` to see what's using the drive. Use the device name\n(`/dev/sd*`) like so:\n\n` lsof | grep sdd`\n\n### Using `fuser`\n\nA more 'proper' approach is to use `fuser`:\n\n` [nikhil@example ~]# `**`fuser` `-m` `/dev/sdd5`** \n` /dev/sdd5: 5138`\n\nSo PID 5138 is using the drive. Let's see what it is:\n\n` [nikhil@example ~]# `**`ps` `aux` `|` `grep` `5138`** \n` nikhil 5138 0.2 2.7 219212 56792 ? SLl Feb11 11:25 rsync -avh --exclude-from=/home/nikhil/manifest / /media/backupdrive`\n\nAha! Now if you're confident that you can kill that job, go ahead and\nthen try umounting the drive.\n\n[Category:Nikhil's Notes](Category:Nikhil's_Notes \"wikilink\")\n[Category:From a past sysadmin\nlife](Category:From_a_past_sysadmin_life \"wikilink\")\n" } ], "sizeInBytes": 739, "source": "This is all too common:\n\n umount: /media/backupdrive: device is busy \n umount: /media/backupdrive: device is busy\n\n ## Using lsof\n\nYou could try `lsof` to see what's using the drive. Use the device name\n(`/dev/sd*`) like so:\n\n lsof | grep sdd\n\n### Using `fuser`\n\nA more 'proper' approach is to use `fuser`:\n\n [nikhil@example ~]# fuser -m /dev/sdd5\n /dev/sdd5: 5138\n\nSo PID 5138 is using the drive. Let's see what it is:\n\n [nikhil@example ~]# ps aux | grep 5138\n nikhil 5138 0.2 2.7 219212 56792 ? SLl Feb11 11:25 rsync -avh --exclude-from=/home/nikhil/ anifest / /media/backupdrive\n\nAha! Now if you're confident that you can kill that job, go ahead and\nthen try umounting the drive.\n", "title": "Umounting a Busy Drive", "untracked": false, "uri": "/Umounting_a_Busy_Drive" }