LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Does upstart umount filesystem during shutdown? (http://www.linuxquestions.org/questions/linux-newbie-8/does-upstart-umount-filesystem-during-shutdown-832235/)

ck_at_work 09-15-2010 02:26 AM

Does upstart umount filesystem during shutdown?
 
Hi,

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.

fbianconi 09-15-2010 07:01 PM

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:
http://upstart.ubuntu.com/wiki/

ck_at_work 09-15-2010 08:54 PM

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.

ck_at_work 09-15-2010 09:15 PM

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
2. umountnfs.sh
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.

ck_at_work 09-19-2010 09:17 PM

no one???? please help...


All times are GMT -5. The time now is 04:22 AM.