Questions tagged [unmounting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
14 views

How to stop “failed to unmount /usr/” errors during shutdown in Debian?

I just installed Debian 10 from disk. Whenever I shutdown, I get a single message displayed on screen, "Failed to unmount /usr/". What can I do to correct this? Is this error likely causing damage to ...
0
votes
1answer
25 views

How to find out which process keeps an LVM partition from unmounting *during shutdown*?

I see that LVM1 (/dev/mapper/lvm1--vg-lvm1--lv) fails to umount during the shutdown, when I cannot run one of the many options to find out which process or user is holding up the mountpoint. It also ...
0
votes
1answer
22 views

How can i get alerted when EFS is unmounted fro Linux EC2 instance?

I do not want to use Cloudwatch want to use shell script for this , Could you please suggest? Actually i have written a script as below: But its not alerting me when the EFS is unmounted. #!/bin/...
1
vote
0answers
26 views

Automatically eject HDD on lock screen [duplicate]

I have an external HDD (/dev/sdc) with only one partition (ext4). This particularly hard drive stay connected in my computer all the time, but I don't want to remove it manually. I need a way to ...
1
vote
1answer
83 views

Can't unmount drive without killing bash [duplicate]

I don't know whether its normal or not but when I mount a filesystem(ext4 partition, USB, SD card etc) via command line, I can't unmount it because it says target is busy It is the bash process ...
1
vote
1answer
43 views

Unmounting /usr from an external drive [closed]

I mounted /usr from the nvidia TX1 dev board to an external SSD connected to the board. I am wondering how I can restore it original state without re-flashing? If I power down,and disconnect the SSD,...
1
vote
0answers
199 views

Is it necessary to explicitly flush the HDD on-disk write caches?

Abstract Sometimes, the Linux kernel is not aware of on-drive write caches of external USB storage devices. Is it necessary in such situations to explicitly flush those caches prior detaching these ...
4
votes
1answer
83 views

What can still be done with a lazy-unmounted filesystem?

umount --lazy calls umount(2) with the MNT_DETACH flag set. umount(2) says that will: "Perform a lazy unmount: make the mount point unavailable for new accesses, immediately disconnect the ...
1
vote
1answer
34 views

What is the use-case for MNT_EXPIRE?

From umount(2): MNT_EXPIRE (since Linux 2.6.8) Mark the mount point as expired. If a mount point is not currently in use, then an initial call to umount2() with this flag fails with the error ...
5
votes
2answers
684 views

Safest way to force close a file descriptor

Sometimes you need to unmount a filesystem or detach a loop device but it is busy because of open file descriptors, perhaps because of a smb server process. To force the unmount, you can kill the ...
1
vote
1answer
95 views

Can we trust the files in a filesystem that was repaired by e2fsck?

Topic If a filesystem was successfully repaired by e2fsck, it is guaranteed that it is in a consistent (clean) state. However, it is not easy to assess the reliability of the files themselves after ...
0
votes
1answer
186 views

Unmount all your partitions to release/free up SSD

I have a machine with a single SSD and 3 partitions. I want to unmount the entire SSD while staying live so that I can run a firmware upgrade tool on the SSD. I know that unmounting your only disk is ...
0
votes
1answer
96 views

Debian NFS auto-unmount if the host PC is turned off

I have a home network with two Debian Stretch PCs. In each one, I have a directory called share, shared via NFS, where I put stuff I want to copy from the other PC through NFS. After auto-mounting on ...
3
votes
1answer
2k views

umount: /dev/sdb1: mount point not specified

if I run: $ sudo umount /dev/sdb1 it works just fine. If the label of the storage devide is red, I'm trying to bypass learning where it's mounted by (script called removedrive): #!/bin/bash ...
0
votes
1answer
471 views

How to unmount a recursive bind mount - safely [duplicate]

Please take care that you have no unsaved work if you test this. I ran this command as an experiment, but how can I undo it without rebooting? # mount --rbind / /mnt What I have tried # umount /...
0
votes
2answers
45 views

Can a script unmount the volume containing itself?

I have a computer with a hard drive mounted read-only. I am running a script from a flash drive. I would like the script to be able to unmount the flash drive, but this can't be performed as the ...
0
votes
1answer
100 views

Lazy unmount root jail drives

I have created a root jail containing rpm and yum (centos 7.5) to install some software on the original system. Workflow Mount sys, proc, dev to the root jail Mount root of the original system "/" ...
1
vote
0answers
78 views

Can mount but cannot umount without password

I want to mount/umount a directory on an nfs directory without root privileges or any password request. I modified /etc/fstab in this way: <IP address>:/mydir /mnt nfs rw,user,noauto ...
0
votes
0answers
23 views

Can mount my Nas from desktop which is exactly what I want but can't unmount

I have the following fstab entry: //192.168.0.12/Public /home/mike/Nas cifs rw,guest,vers=1.0,iocharset=utf8,_netdev,noperm,noauto,user 0 0 This allows me to click on NAS under devices on my desktop ...
0
votes
1answer
43 views

U(n)mount sthealthily without notifying applications or clearing cache. (testing purposes)

There is already: $ umount -l . But is there a way to unmount silently? This means, in example: If a photo on the unmounted partition is inside of a device, then Linux should preferrably keep it ...
2
votes
1answer
42 views

guestmount doesn't auto sync?

I'm using guestmount to construct 500mb ext4 filesystem for an embedded built application. Subsequent to an unmount, I want to snapshot the sha256sum of the filesystem. But if I take a copy of the ...
2
votes
4answers
17k views

mount.nfs: Stale file handle error - cannot umount

Every time I try to mount a NFS share I get this: >> mount -t nfs gitlab-replica-storage.blah.com:/export/registry-gitlab-prod-data-vol /mnt/test mount.nfs: Stale file handle The problem is ...
0
votes
1answer
213 views

Opening raw UBI partition for writing on Linux if it's mounted and used by init

I need to update a raw UBI partition with a new UBIFS image from Linux userspace with superuser rights, however I'm getting EBUSY (Device or resource busy) error whenever I'm trying to open my ...
1
vote
1answer
973 views

Unmounting SMB share folder

I mounted a SMB share folder under /mnt/smb/ and I can access the files. When I unmount this shared folder using command: umount /mnt/smb/ naturally I cannot list shared folder contents using ...
2
votes
1answer
159 views

How works the “eject usb driver” from Gnome?

I have a question for some time in my head: I have an external hard drive, when I want to dismount it I simply give in the icon that says: "Remove unit safely" in the Nautilus (use Nautilus from ...
1
vote
1answer
351 views

Offlining a ZFS pool speedily and safely as a monolithic whole?

Much as the question says. Suppose I want to have the equivalent of a scripted "emergency button" for my FreeNAS pool - something that I can click to run from a GUI or execute in console/SSH, which ...
0
votes
1answer
44 views

How does unmounting work in the context of demand paging

As I understand, Linux uses demand paging, which means that when a process is started, only those pages of the process are actually loaded from the file system that are touched during the execution. ...
3
votes
2answers
384 views

umount of sdcard leaves fat-fs unclean

When I umount a SD flash card in a USB card reader, and then pull the card, filesystem stays "dirty". System: RPi or xubuntu 16.04.3 The card reader is some super cheap Chinese one. I have tried a ...
0
votes
1answer
299 views

udev systemd call @remove does not work but triggers scripts openSuse Leap42.3

Hi I have an UDEV rule that calls a systemd Service that umounts my USB Drive when it is removed. ACTION=="remove", KERNEL=="sd*" SUBSYSTEMS=="usb", SUBSYSTEM=="block", ATTRS{idVendor}=="XXXX", ATTRS{...
7
votes
1answer
502 views

How do I cancel a stale “pending” drive mount with error “An operation is already pending”

The An operation is already pending error is very generic and many things can cause this. (other answers don't relate to my problem). I have a Luks encrypted volume that I clicked to open, a password ...
0
votes
0answers
300 views

Wait to Mount Until Process Not Busy

I am writing/reading to an SSD over NVMe. I would like to unmounts the SSD partitions and remount them after writing and before reading so as to avoid caching problems. It seems when I try to perform ...
1
vote
1answer
1k views

mounting and unmounting UDF .iso images as a regular user

I found out about fuseiso a while ago but I need to mount UDF images, and it seems like fuseiso doesn't support it after failed attempts on my part to mount a UDF image with it. I need to be able to ...
1
vote
1answer
464 views

How to unmount a mountpoint with rbind and rslave?

Trying to use a chrooted system via mount -B stage3 gentoo mount -t sysfs none gentoo/sys mount -t proc none gentoo/proc mount -R /dev gentoo/dev mount --make-rslave gentoo/dev unshare --fork chroot ...
0
votes
0answers
24 views

Unwanted permanent umount [duplicate]

The problem I've got a simple question: what's the difference between ejecting flash drive using GNOME Files (formerly known as Nautilus) button (see image below) and umount command? Before you will ...
2
votes
1answer
451 views

Why is usb-drive not visible with `lsblk` after having been ejected from Thunar?

If I put a USB-drive in, it will automount. I can see it with lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdb 8:16 1 7,5G 0 disk └─sdb1 8:17 1 7,5G 0 part /media/user/usb-...
1
vote
3answers
119 views

Safely Deleting a Directory Only If It ISN'T a Mount Point

Unfortunately I'm being forced to work with a piece of software that handles automatically mounting and unmounting a network volume very poorly; it has an annoying tendency to leave a directory where ...
8
votes
1answer
2k views

Why is lazy MNT_DETACH or `umount -l` unsafe / dangerous?

I've read in a few places that umount -l is unsafe: In an answer by @cas: don't use umount's --lazy option if you care about when the external drive can be safely unplugged A comment by @...
3
votes
3answers
5k views

Command line equivalent to “Safely remove drive”?

The file managers present in Linux Mint Cinnamon and MATE not only allow you to unmount external drives, but give you the option to "Safely remove" the drives as well, something not present in every ...
0
votes
1answer
282 views

Ensure writing has completed after `umount -l / --lazy`

One of many issues with umount -l is that there's way to know when it has completed. Is there a way to: Know all writing processes have finished and all data has been written to disk. Prevent future ...
5
votes
2answers
3k views

List current inotify watches (pathname, PID)

How do I get a list of: Pathnames currently being watched by inotify, and PID of the process watching I ask because I have found that syncthing's inotify watches were preventing my disk from being ...
5
votes
1answer
427 views

Is `mount -o remount,ro` guaranteed to fail if there are files open for writing?

I am working on a safe and race-condition-free alternative to umount -l with removable devices: I'm planning on: umount --move under a 000 permissions directory so no more files can be opened by ...
2
votes
2answers
2k views

How do I know when lazy `umount -l` completes?

I am running Linux and want to safely unmount my external HDD. I want to use umount --lazy: Lazy unmount. Detach the filesystem from the file hierarchy now, and clean up all references to this ...
1
vote
2answers
349 views

List processes accessing device after `umount --lazy`

I want to remove my external HDD as safely as possible. I want to use umount --lazy: Lazy unmount. Detach the filesystem from the file hierarchy now, and clean up all references to this ...
2
votes
1answer
62 views

Are there any utilities which support umount2(2)'s MNT_EXPIRE?

man umount2 says: MNT_EXPIRE (since Linux 2.6.8) Mark the mount point as expired. If a mount point is not currently in use, then an initial call to umount2() with this ...
5
votes
1answer
8k views

Why do I get the error “failed unmounting /var” during shutdown?

I have a fresh install of Debian 9.0.0. It has a separate 1 GB partition for /var formatted at ext4. When I shutdown from the terminal, using shutdown -h now, there is a bright-red error message ...
0
votes
1answer
153 views

umount -l: Kernel is referring to removed, non-existent device

I am getting messages such as: kernel: Buffer I/O error on dev sdb1, logical block 107390598, async page read In actuality, the USB HDD sdb has been removed: lsblk also shows no mention of sdb. I ...
2
votes
1answer
619 views

NFS: Very slow unmount when rebooting/shutting down

I have an issue with unmount of NFS volumes when rebooting or shutting down client machine - I have to wait for up to 30 minutes while NFS volume being unmounted. Сlients's conf (CentOS 7.3): /etc/...
1
vote
1answer
152 views

best practices for mounting and unmounting shares [closed]

I am fairly new to Linux and have a general question. I have an Amazon AMI Linux EC2 instance that has a script that will copy files from many different remote computers to other computers, or to ...
0
votes
1answer
124 views

Plasma keeps remounting my cifs share

I have this mount configured in /etc/fstab: //192.168.5.1 /mnt cifs auto,x-systemd.requires=network-online.target,x-systemd.device-timeout=5 0 0 I've tried unmounting it every possible way: ...
5
votes
1answer
463 views

Identify a process that is still using a file on a lazy-unmounted filesystem

I have a /dev/md127 mdadm RAID 0 array that some time ago was mounted as /mnt/storage1. At some point I opened a bash session and changed CWD to /mnt/storage1 and the bash session is still active. I ...