LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-02-2014, 09:08 AM   #1
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 939

Rep: Reputation: 174Reputation: 174
umount - removing the directory used to mount with.


On Mint version 16, in a BASH script - run using the live DVD:-

I create a directory /mnt/XXXXXXXX
mount /dev/sdax /mnt/XXXXXXXX
Do some processing (a backup actually).
umount /dev/sdax

I then want to delete /mnt/XXXXXXXX
But the directory is still in use for an use for an indefinite time.
Since data is written to these mount-points, I really need to umount them.

I should say that I'm actually using LVM and I'm using 22 logical partitions (so far).
But this doesn't affect the nature of the problem.
I never need to have more than 2 mounts open at any one time.

I've tried to make use of named pipes - but I can't make this work.
This seems to be a very "advanced topic"!
 
Old 04-02-2014, 12:12 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Quote:
On Mint version 16, in a BASH script - run using the live DVD:-

I create a directory /mnt/XXXXXXXX
mount /dev/sdax /mnt/XXXXXXXX
Do some processing (a backup actually).
umount /dev/sdax

I then want to delete /mnt/XXXXXXXX
But the directory is still in use for an use for an indefinite time.
Since data is written to these mount-points, I really need to umount them.
As long as any file in the mounted partition is open (that means file or directory), or as long as you have a terminal open to /mnt/sdax, or as long as you have a file manager open to /mnt/sdax, then the partition is in use and you can't unmount it.

When you are done processing files, cd out of the mounted partition, close the file manager or cd to a directory not in /mnt. then try to umount the partition.
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Execute command on mount and integrate with gnome-mount / umount Peter Rhone Linux - Newbie 4 11-18-2008 06:28 AM
util-linux-2.12r error on 'make -C mount mount umount' james penguin Linux From Scratch 2 08-29-2006 12:55 AM
root can only mount/umount snocked Linux - Newbie 9 04-22-2004 03:52 PM
mount/umount devit Linux - General 4 02-19-2004 01:37 PM
mount and umount wr3ck3d Linux - Newbie 4 12-14-2002 05:04 PM


All times are GMT -5. The time now is 08:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration