Questions tagged [unmounting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
46 views

How to unmount an non-existent filesystem with opened filed?

I have an Yocto-based embedded Linux system (kernel version 5.10.48) and encounter a problem with USB flash drive removal. I have a script that is run by udev when an USB drive is plugged or onplugged....
user avatar
  • 1
8 votes
6 answers
2k views

Unmount /boot after booting

For some highly secure bastion VMs I'll implement soon, I am considering to unmount /boot after booting - among other measures of course. Will be mounted only for updating kernel. Testing this, no ...
user avatar
  • 2,241
0 votes
0 answers
46 views

I'm having fsck problems with samba share drive on ubuntu, running on raspberry pi. Not too fluent with unix, so please go easy

I'm currently running Ubuntu 20.04.3 LTS, focal, on a raspberrypi 4. I have an external USB drive formatted in ext4, which I've set up both as a samba share and to be used by plex. Recently I've run ...
user avatar
0 votes
0 answers
15 views

unmount a backing device when the related mountpoint is manually unmounted

I'm running Arch Linux and systemd. In /etc/fstab I have something like this: LABEL=XYZ /mypath vfat noauto,[...] /mypath/main /newplace none bind,noauto 0 0 For my ...
user avatar
  • 15.5k
0 votes
0 answers
63 views

How to umount a script

Cron periodically has root run a script to backup certain partitions to an external USB drive. The script first removes the oldest backup, then backs up specific partitions and finally writes the ...
user avatar
1 vote
1 answer
452 views

umount bash: warning: shell level (1000) too high, resetting to 1

I can mount drives and images, but I can't unmount them. I get 'shell level too high'. I expect this normally happens when a script calls itself. Is there some script that is run by umount? I can't ...
user avatar
  • 1,756
1 vote
0 answers
23 views

How to stop processes to umount mountpoint for fsck

I am trying to do fsck on the NAS via ssh on /volume1. The volume has to be unmounted, and all processes with reference to /volume1 need to be stopped accordingly. Therefore, logged in as root, all ...
user avatar
  • 11
2 votes
0 answers
71 views

Prevent systemd from unmounting a partition mounted by a systemd service

I have a custom systemd service that automatically mounts some partitions under certains conditions. The service executes a shell script containing some mount commands. When I execute it directly, ...
user avatar
  • 148
0 votes
1 answer
102 views

Why does my USB flash disk contiune heating while it is unmounted?

I am using Debian-Buster Linux. I use a USB flash disk to mount when I need it. When i am done, I unmount(using umount) it without unplugging it. However, it continues to heat up(like it is being ...
user avatar
0 votes
1 answer
25 views

My server unmounted multiple drives and i don't know why?

so one of my servers was having issues this morning and when I went to investigate I found that the problem was that 4 of my drives seem to not be mounted anymore. I am wondering if there may be a ...
user avatar
  • 121
0 votes
1 answer
2k views

Can the root filesystem be unmounted in Linux?

I am not talking about rootfs here. If there is only one process running in Linux and its working directory is /, then can it be unmounted? Will rootfs be what is left over? If it cannot be unmounted, ...
user avatar
  • 3,458
3 votes
1 answer
320 views

root filesystem not listed when executing mount

I'm running slackware 14.0 linux. I was recently doing an open office document and sent emails out and then my internet was cutting out then after a bit I got hinted that my disk was full then I ...
user avatar
  • 39
2 votes
1 answer
2k views

umount: /home: target is busy

umount /dev/mapper/nvmeVg-home umount: /home: target is busy I looked at this answer and found this useful page I was unable to solve my problem before posting here. My /var directory is full. /var ...
user avatar
0 votes
1 answer
843 views

Use systemd to run script when usb drive is unmounted

I have a systemd service that calls a script when a USB drive is mounted. signal.service: [Unit] Description= Updater trigger Requires=usb-drive.mount After=usb-drive.mount [Service] ExecStart=/usr/...
user avatar
  • 123
1 vote
0 answers
461 views

Run systemd service before unmount

I'm trying to run a systemd service at shutdown: it kinda works (it gets called) but it runs after filesystems are unmounted, which is not what I need. So I tried with Before=umount.target and ...
user avatar
0 votes
1 answer
155 views

Unable to unmount /mnt which was mounted from a script

I have a startup script which executes the following commands: sudo cryptsetup open /dev/sda3 dm_crypt && sudo mount -t btrfs /dev/mapper/dm_crypt /mnt && cd /mnt && ls -la &...
user avatar
  • 893
0 votes
0 answers
501 views

How do I stop dmesg messages about previously used NFS client mount?

In Linux 5.8.0, NFSv4 client was in use for some time, then server gone away from network, then I umount -f -l-ed it away. Typically I expect NFS-related messages to go away from kernel log, but now I ...
user avatar
  • 5,156
1 vote
2 answers
136 views

Unmounting a filesystem

I am trying to unmount a filesystem. The mount point of the filesystem is /one/two/three/four, and the name of the device file is /dev/sdb8. The command that I executed to unmount the filesystem ...
user avatar
0 votes
1 answer
907 views

What's the best way to safely remove an external hard drive from Manjaro?

I had an aging Western Digital external USB HD (spinning, not flash memory) that periodically disappears from the Device section on my Thunar File Manager. I have Manjaro installed. I am able to ...
user avatar
  • 349
0 votes
1 answer
1k views

How can I mount this disk image?

I'm trying to mount the Android nand image provided by Project Sandcastle (a project that can run Android 10 on an iPhone 7). I'm trying to mount this disk image so that I can edit the boot.img file ...
user avatar
3 votes
0 answers
102 views

Why does unmounting of a VFAT filesystem result in reading the whole FAT?

Each time I unmount the filesystem of my SD card that I use on my DSLR, I have to wait several seconds for umount command to finish — even if I've just mounted the FS as read-only and immediately ...
user avatar
  • 2,969
1 vote
1 answer
2k views

Device in use, but not mounted

After plugging in a USB attached SATA SSD, fsck tells me that this device is in use. But it is not mounted at all. What's happening here? And how can I fsck this device? Here are some information ...
user avatar
8 votes
0 answers
2k views

How can I make my ExFAT partition unmount cleanly?

I've got Raspbian running on a Raspberry Pi 4 B. I have a USB hard disk that I'm using with it. The hard disk is a 1TB drive formatted with a single partition using ExFAT. I've got exfat-fuse and ...
user avatar
0 votes
0 answers
810 views

In my linux system umount gives error : error writing /etc/mtab.tmp: No space left on device

I am trying to unmount on /root and fails with the following error: error writing /etc/mtab.tmp: No space left on device I am trying to unmount both "log" and "abc" df -h Filesystem ...
user avatar
0 votes
2 answers
351 views

How to remove google drive folder from Computer

Is there a way to definitely delete the google drive folder appeared in the Computer desktop folder in Linux Mint 19.2? It seems it is treated from the os like a mounted partition, but unmounting it ...
user avatar
  • 111
0 votes
0 answers
219 views

Unmount data volume hosting NFS exports

So I've got a customer with two NFS server setup in a pacemaker cluster active/standby configuration. It is a legacy system running RHEL6. On the servers there is /mnt/data1 which is an xfs mountpoint ...
user avatar
  • 113
1 vote
2 answers
331 views

unmount SD card makes file checksum change

I have an SD card mounted by Lubuntu at /media/$USERNAME/COREELEC/ I need to copy a file from one directory to another and rename it. However if I check the md5sum (or sha512sum) after I unmount it ...
user avatar
  • 375
1 vote
1 answer
2k views

How do I unmount `dev` after mounting it?

It appears that I cannot unmount dev after mounting it. I am running on Ubuntu 18.04.2 LTS with 4.15.0-1052-aws. mkdir -p ~/jail/dev pushd ~/jail sudo mount --rbind /dev dev/ sudo umount dev/ umount: ...
user avatar
  • 3,705
1 vote
2 answers
470 views

Cleanly unmount a usb drive with systemd

I configured an automount for a USB drive by adding an extra rule to /etc/fstab as belows /dev/sda1 /media vfat noauto,nofail,x-systemd.automount,x-systemd.idle-timeout=2,x-systemd.device-timeout=...
user avatar
  • 21
0 votes
1 answer
479 views

Umount: target is busy to variable

I want to check if a USB is busy and store the result in a variable: $ foo=$(umount /dev/sdb1) $ umount: /path/mounted: target is busy. But when I want to print $foo, I get an empty variable $ echo ...
user avatar
0 votes
1 answer
2k views

How to stop "failed to unmount /usr/" errors during shutdown in Debian? [duplicate]

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 ...
user avatar
  • 5,437
0 votes
1 answer
102 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 ...
user avatar
  • 272
0 votes
1 answer
105 views

How can we alert when EFS is unmounted for Linux EC2 servers?

I am using below script in cron job to get alert whenever EFS got unmounted. But its not alerting me when the EFS is unmounted. #!/bin/bash Hostname=$(hostname) ##email subject subject="EFS is ...
user avatar
1 vote
1 answer
590 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 ...
user avatar
1 vote
1 answer
122 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,...
user avatar
16 votes
1 answer
3k 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 ...
user avatar
  • 582
4 votes
1 answer
822 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 ...
user avatar
1 vote
1 answer
214 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 ...
user avatar
8 votes
2 answers
7k 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 ...
user avatar
2 votes
1 answer
371 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 ...
user avatar
  • 582
0 votes
1 answer
1k 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 ...
user avatar
  • 11
0 votes
1 answer
426 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 ...
user avatar
  • 1,582
4 votes
1 answer
15k 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 ...
user avatar
0 votes
1 answer
2k 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 /...
user avatar
  • 44.5k
0 votes
2 answers
97 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 ...
user avatar
0 votes
1 answer
265 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 "/" ...
user avatar
  • 101
1 vote
0 answers
190 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 ...
user avatar
  • 11
0 votes
0 answers
25 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 ...
user avatar
0 votes
1 answer
104 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 ...
user avatar
  • 1,606
2 votes
1 answer
86 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 ...
user avatar