Questions tagged [umount]

umount detaches a specified file system from the file tree.

44 questions
2
votes
2 answers

Linux umount a device from a script running in the device itself

I've a mounted iso image in the path: /mnt/iso Inside this iso I've an install script install.sh I run the installation script from the iso and at the end the script ask to the user if he want to umount the iso itself. If the user press "y" the…
user2572526
  • 1,219
  • 2
  • 17
  • 35
2
votes
1 answer

How to umount an USB Android device

I've connected my Android tablet to Ubuntu in order to write some code using Intellij. Everything works ok, but now I don't know how to disconnect my tablet. My /media/ and /mnt/ directories are empty and lsusb display this: Bus 008 Device 001: ID…
Marcos
  • 4,643
  • 7
  • 33
  • 60
1
vote
2 answers

trigger alert when a specified command executes in linux

I have 3 samba shares mounted in my system, but suddenly, one of them gets umounted without my permision. Maybe one of houndreds of scripts which run in my crontab, but i dont know which one. I've reviewed all /var/log directory looking for umount…
avances123
  • 2,224
  • 4
  • 21
  • 21
1
vote
1 answer

Bash umount command substitution

I'm running RHEL 7 and bash here. It seems command substitution does not work for the umount command. It does, however, work as usual for other commands. For example: [root@localhost ~]# msg=$(umount /u01) umount: /u01: target is busy. (In…
Dude
  • 113
  • 1
  • 10
1
vote
0 answers

bash - Unmounting all partitions on user-selected drive

I wrote a BASH script aimed to install a Porteus ISO in a USB drive. First, the user can select the drive within a menu made in dialog. Second, the script unmount all partitions in the selected drive. Right here is my problem. #!/bin/bash #SCRIPT…
M. Casas
  • 11
  • 1
1
vote
0 answers

What is the use of cap_set_proc() if the program needs to be run as root

I am trying to unmount a usb-storage device through a c++ program, using umount2() function. Since umount2() needs administrative privileges, I implemented umount2() with cap_set_proc() as follows cap_t caps; cap_value_t cap_list[1]; caps =…
vacky
  • 277
  • 1
  • 4
  • 16
1
vote
0 answers

Invalid argument error while using umount() function

I am trying to unmount a usb-storage device through a c++ code as follows. while(umount("/dev/sdc1/")!=0) { std::cout << "ERROR: " << strerror(errno) << std::endl; std::this_thread::sleep_for (std::chrono::seconds(2)); } But, I get an…
vacky
  • 277
  • 1
  • 4
  • 16
1
vote
2 answers

Error happens when trying to umount the Lustre file system

When I umount Lustre FS it displays: [root@cn17663-ens4 mnt]# umount /mnt/lustre umount: /mnt/lustre: target is busy. (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)) and if I add the…
Li Hongbo
  • 11
  • 5
1
vote
0 answers

Freenas gave wrong mount command to /mnt freenas filesystem

My colleague made a mistake and gave: mount -t nfs freenasip:\mnt\backup \mnt on FreeNAS server itself instead of other server where it was to be mounted. Immediately he ran: umount freenasip:\mnt\backup but it hanged. Now both mount -a and…
munish
  • 11
  • 4
1
vote
1 answer

how to umount from python script

i want to umount a mounting point named VirtualDVD. i want to run the command, "gksudo umount VirtualDVD" My function is: def umount(self): '''unmounts VirtualDVD''' cmd = 'gksudo umount VirtualDVD' proc = subprocess.Popen(str(cmd),…
demosthenes
  • 1,151
  • 1
  • 13
  • 17
1
vote
1 answer

unshare system call doesn't work

The following simple C++ program attempts to unshare the mount space, mount a USB storage device (located on /dev/sdd), waits for input, and then umounts that device. #include #include #include #include…
1
vote
1 answer

How do you force a Linux process (Java webstart App) to stop locking a Filesystem (CD-ROM) WITHOUT killing the process?

In Linux (CentOS 5.4), how do you force a process to stop locking a file system without killing the process? I am trying to get my Java Webstart Application, running locally, to eject a CD. I do not have this problem if I am just browsing through…
Blake
  • 162
  • 1
  • 5
1
vote
1 answer

Sudo in Java's Runtime.exec & gksu for umount

I am writing a Java application in which (among other stuff) I'd mount a external device, do some copying, and then unmount it. //I am mounting several devices in created dirs named sdb, sdc... according to the partitions String[] command =…
Yellrag
  • 83
  • 6
1
vote
2 answers

Where's umount system call?

In the file util-linux-2.17.2/mount/umount.c, line #246, it is written res = umount (node);. But where's the umount function located? I've searched so much, but didn't find.
Dor
  • 7,344
  • 4
  • 32
  • 45
1
vote
1 answer

Delete mounting directory after umount -l

I'm working on Linux OpenWrt where I have to mount and umount manually USB disks when they are attached to the router. I'm using this script: http://wiki.openwrt.org/doc/howto/writable_ntfs#with.a.custom.hotplug.script to mount and unmount…
Yacine Hebbal
  • 394
  • 3
  • 16