LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-02-2009, 09:16 PM   #1
ctrl0l
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Rep: Reputation: 0
The system does not umount filesystems on shutdown or restart


It seems the system (Ubuntu 9.04) doesn't umount the filesystems (ReiserFS) on shutdown or restart.
There is no matter if I click on Gnome's shutdown/restart button, or I type "shutdown -r now". Every time during the boot process, I see the following message:
"Filesystem is not clean" and the system forces ReiserFS's checking process.

I tried to find the reason, but no success.
I was not able to force shutdown process to log what it does; umount related services seem to be configured properly:

Code:
umountfs                  0:on   1:off  2:off  3:off  4:off  5:off  6:off
umountnfs.sh              0:on   1:off  2:off  3:off  4:off  5:off  6:off
umountroot                0:on   1:off  2:off  3:off  4:off  5:off  6:off

Here is /etc/fstab

Code:
proc /proc proc defaults 0 0
# Entry for /dev/sda1 :
UUID=32b994f9-7734-400a-9708-501705ef6fa5 / reiserfs notail,relatime 0 1
# Entry for /dev/sda5 :
UUID=a1acb64d-4cb2-4400-832a-79d73c613b18 /home reiserfs relatime 0 2
# Entry for /dev/sda8 :
UUID=c13a0612-3880-429b-8d5f-049ada9109dc /opt reiserfs relatime 0 2
# Entry for /dev/sda10 :
UUID=62617ffc-5a46-43a3-b90f-e1c3802e275a /other reiserfs relatime 0 2
# Entry for /dev/sda7 :
UUID=9bf840d0-d8ec-4aee-87ed-8ef82d20c571 /usr reiserfs relatime 0 2
# Entry for /dev/sda6 :
UUID=8c0887b4-470f-4dd6-9ff8-0e16ae3305c0 /var reiserfs relatime 0 2
# Entry for /dev/sda9 :
UUID=c3eb5791-fd6a-492d-94f3-ae0a2f9024d8 /work reiserfs relatime 0 2
# Entry for /dev/sda2 :
UUID=2962f33a-f3df-44c9-a2dd-1cb2216f117f none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

# /dev/sda4
UUID=ECFC0A72FC0A36FC /windows ntfs-3g defaults,locale=en_US.UTF-8 0 0
 
Old 06-02-2009, 09:24 PM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
I think you'll find it does umount it, it has to, there is no way it can be mounted with no power. It is just having a problem with mounting with the UUID names, change them back to the /dev/sdx names
 
Old 06-03-2009, 02:08 AM   #3
ctrl0l
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jamescondron View Post
I think you'll find it does umount it, it has to, there is no way it can be mounted with no power. It is just having a problem with mounting with the UUID names, change them back to the /dev/sdx names
Thanks, I tried it, but the same situation.
I changed UUID back to /dev/sdx, switched off the computer from Gnome's "Shut down..." button and pressed power button again.
On load, again the same messages "Filesystem is NOT clean. Transactions replayed...." and then the system continue loading.
 
Old 06-03-2009, 03:20 PM   #4
ctrl0l
LQ Newbie
 
Registered: Jun 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Problem resolved!

Ok, the problem has been resolved, here is the explanation:
The settings in /etc/rc0.d and /etc/rc6.d for umountnfs.sh, umountfs, umountroot, halt and reboot were wrong. Of course, this mess was not Ubuntu's fault, but mine - I recently played with the services, but I had no idea I have broken something else.

Here is how I modified it:

Code:
$ ls -alsh /etc/rc0.d/
   0  lrwxrwxrwx   1 root root   22 2009-06-03 22:45 S31umountnfs.sh -> ../init.d/umountnfs.sh
   0 lrwxrwxrwx   1 root root   18 2009-06-03 22:45 S40umountfs -> ../init.d/umountfs
   0 lrwxrwxrwx   1 root root   20 2009-06-03 22:44 S60umountroot -> ../init.d/umountroot
   0 lrwxrwxrwx   1 root root   14 2009-06-03 22:20 S90halt -> ../init.d/halt

$ ls -alsh /etc/rc6.d/
   0 lrwxrwxrwx   1 root root   22 2009-06-03 22:45 S31umountnfs.sh -> ../init.d/umountnfs.sh
   0 lrwxrwxrwx   1 root root   18 2009-06-03 22:45 S40umountfs -> ../init.d/umountfs
   0 lrwxrwxrwx   1 root root   20 2009-06-03 22:44 S60umountroot -> ../init.d/umountroot
   0 lrwxrwxrwx   1 root root   16 2009-06-03 22:38 S90reboot -> ../init.d/reboot
halt and reboot should be the last executed scripts.

Here are the commands I used in order to set the order of execution:
1. Remove all current settings
Code:
$ sudo update-rc.d -f umountroot remove
$ sudo update-rc.d -f umountfs remove
$ sudo update-rc.d -f umountnfs.sh remove
$ sudo update-rc.d -f halt remove
$ sudo update-rc.d -f reboot remove
2. Add again these scripts in the correct order:
Code:
$ sudo update-rc.d umountnfs.sh start 31 0 6 .
$ sudo update-rc.d umountfs start 40 0 6 .
$ sudo update-rc.d umountroot start 60 0 6 .

$ sudo update-rc.d halt start 90 0 .
$ sudo update-rc.d reboot start 90 6 .
The above means:
We will execute umountnfs.sh at first, next umountfs, next umountroot and finally halt in runlevel 0.
Also, umountnfs.sh, umountfs, umountroot and finally reboot in runlevel 6.

Thanks
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why not let users shutdown/restart system? jasohl Linux - Security 3 03-12-2007 04:37 AM
umount /var device is busy (unclean shutdown) feetyouwell Linux - Software 3 09-13-2004 06:18 PM
Bash?? System Restart (shutdown -r now) woranl Linux - Newbie 4 04-13-2004 09:33 PM
umount on shutdown plisken Linux - General 1 10-02-2003 04:14 PM
ext3 part fails umount during shutdown paulmccs Linux - General 0 02-18-2002 01:22 PM


All times are GMT -5. The time now is 02:29 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration