Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-15-2010, 02:26 AM   #1
LQ Newbie
Registered: Sep 2010
Posts: 22

Rep: Reputation: 0
Does upstart umount filesystem during shutdown?


I wanted to check how does the shutdown script handle unmounting of file system. So what I did was, downloaded the source code for shutdown, which I believe is upstart-source. However, I was still not able to find where does it do the unmouting. please help me clear my understanding of this.

I was particularly interested in checking how does the shutdown scrip unmount the drives if they are busy. Does it wait till the device gets free or does it force unmounts it.
Thank you in advance.
Old 09-15-2010, 07:01 PM   #2
Registered: Apr 2008
Location: argentina
Distribution: Arch
Posts: 86

Rep: Reputation: 22
Up until system V init, what system used to do was fire a runlevel change (to the special runlevel 0), upstart might be doing this, for backwards compatibility, but it might be firing an event as well, you can watch for scripts in /etc/rc0.d/ and for conf files in /etc/init/ (here are the real upstart config files) and yes, shutdown does unmount every filesystem, otherwise you would need to check for errors the next boot.
By the way the script/config file you're looking for is something like mountall which mounts all when it starts and umounts all when it's called to stop.

further reading material at:
1 members found this post helpful.
Old 09-15-2010, 08:54 PM   #3
LQ Newbie
Registered: Sep 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Wow... Thankx a ton fbianconi... That was very helpful.

However, still I am not able to find anything in that "mountall" script/config file anything regarding unmount. Is there any other script/config file for unmount?

Thankx in advance.
Old 09-15-2010, 09:15 PM   #4
LQ Newbie
Registered: Sep 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Oh now that was dumb of me... of course the umount files would be the same place where the mountall files.

I found three files,
1. umountfs
3. umountroot.

What I wanted to check was how does the shutdown script react to when the filesystem is busy? I was interested in seeing that if the shutdown script check via fuser or any other command that the filesystem is busy and if busy whether it waits or force unmounts. I think it does not wait and it force unmounts. Correct me if i am wrong.

My main aim was that before shutdown i wanted to make sure that I my filesystem is not busy doing anything and if busy then it waits till it gets free and then shutdown the system.

Thank you.
Old 09-19-2010, 09:17 PM   #5
LQ Newbie
Registered: Sep 2010
Posts: 22

Original Poster
Rep: Reputation: 0
no one???? please help...


mount, shutdown, upstart

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
CIFS share does not umount at shutdown feffer777 Ubuntu 3 07-15-2010 04:20 AM
The system does not umount filesystems on shutdown or restart ctrl0l Linux - General 3 06-03-2009 04:20 PM
can i umount var filesystem?? raklo Linux - Kernel 14 06-19-2007 09:44 AM
umount on shutdown plisken Linux - General 1 10-02-2003 05:14 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:34 AM.

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