Results 1 to 10 of 10
I have Ubuntu 9.04
I t seems it 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 ...
- 06-03-2009 #1Just Joined!
- Join Date
- Jun 2009
- Posts
- 5
[SOLVED] Ubuntu does not umount filesystems on shutdown or restart
I have Ubuntu 9.04
I t seems it 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" - after restart, I see the following message in console:
"Filesystem is not clean" and the system forces ReiserFS's checking process every time.
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:
Here is /etc/fstab: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
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
- 06-03-2009 #2Just Joined!
- Join Date
- May 2009
- Posts
- 15
Hello,
In your fstab you are telling the filesystem to run a check on boot up. If you do not want this, change it to 0.
For example you have:
change toCode:# Entry for /dev/sda8 : UUID=c13a0612-3880-429b-8d5f-049ada9109dc /opt reiserfs relatime 0 2
Code:# Entry for /dev/sda8 : UUID=c13a0612-3880-429b-8d5f-049ada9109dc /opt reiserfs relatime 0 0
- 06-03-2009 #3Just Joined!
- Join Date
- Jun 2009
- Posts
- 5
- 06-03-2009 #4Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
It may not be an error of umount; have you seen any messages immediately following the Reiser fsck that may indicate that the check could not fix all errors? You may need to run reiserfsck manually with specific options if it's confirmed the autofix (--fix-fixable) isn't sufficient. see man reiserfsck for detailed explanation of options.
If it indeed is umount failing, it's likely because some file is still open or a service failed to shut down prior, leaving the disk in use and thus un-umountable. I'm not exactly sure how to trace that one down.
- 06-03-2009 #5Just Joined!
- Join Date
- May 2009
- Posts
- 15
Hey ctrl0l,
I completely misread what you meant. I apologize. Can you post portions of dmesg or from /var/log/messages that cover what is happening on startup to those disk?
I know this issue is over the unmount during shutdown but I wanted to know if there was more data on startup on why the filesystem was flagged as dirty.
Thank you.
- 06-03-2009 #6Just Joined!
- Join Date
- May 2009
- Posts
- 15
Also, as a troubleshooting sanity check, have you
1. Boot up, let it go through the check
2. Then after boot and check, comment out one of the filesytems in fstab (if possible... I see you have /other there. Can this be used?)
3. Restart your system.
4. After you system is up, un comment and then use mount to see if you still get a dirty filesystem? If so, does it give anymore details as to why it may be coming up dirty?
I am assuming that when the system is up you can umount and mount the filesystems fine...
- 06-03-2009 #7Just Joined!
- Join Date
- Jun 2009
- Posts
- 5
There are no errors after ReiserFS check.
I tried to umount and manually check /work and /other. They were unmounted successfully and Reiser's fsck did not found any errors. Here are stdout for /work
I also have wondered how can I see what exactly the system does on shutdown and if it really executes these services below?Code:$ sudo umount /work $ sudo reiserfsck /dev/sda9 Replaying journal.. Reiserfs journal '/dev/sda9' in blocks [18..8211]: 0 transactions replayed Checking internal tree..finished Comparing bitmaps..finished Checking Semantic tree: finished No corruptions found There are on the filesystem: Leaves 22038 Internal nodes 147 Directories 18878 Other files 75381 Data block pointers 6813453 (0 of them are zero) Safe links 0 ########### reiserfsck finished at Wed Jun 3 19:21:48 2009
- umountfs
- umountnfs.sh
- umountroot
- 06-03-2009 #8Just Joined!
- Join Date
- Jun 2009
- Posts
- 5
Well, there is nothing special in dmesg:
Code:16.653426] Adding 1534196k swap on /dev/sda2. Priority:-1 extents:1 across:1534196k [ 22.074288] lp0: using parport0 (interrupt-driven). [ 43.991780] ReiserFS: sda5: found reiserfs format "3.6" with standard journal [ 43.991803] ReiserFS: sda5: using ordered data mode [ 44.002393] ReiserFS: sda5: journal params: device sda5, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 [ 44.004091] ReiserFS: sda5: checking transaction log (sda5) [ 44.057412] ReiserFS: sda5: Using r5 hash to sort names [ 44.096657] ReiserFS: sda8: found reiserfs format "3.6" with standard journal [ 44.096683] ReiserFS: sda8: using ordered data mode [ 44.101786] ReiserFS: sda8: journal params: device sda8, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 [ 44.103461] ReiserFS: sda8: checking transaction log (sda8) [ 44.136643] ReiserFS: sda8: Using r5 hash to sort names [ 44.172988] ReiserFS: sda10: found reiserfs format "3.6" with standard journal [ 44.173017] ReiserFS: sda10: using ordered data mode [ 44.181224] ReiserFS: sda10: journal params: device sda10, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 [ 44.182875] ReiserFS: sda10: checking transaction log (sda10) [ 44.220438] ReiserFS: sda10: Using r5 hash to sort names [ 44.269960] ReiserFS: sda7: found reiserfs format "3.6" with standard journal [ 44.269989] ReiserFS: sda7: using ordered data mode [ 44.277323] ReiserFS: sda7: journal params: device sda7, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 [ 44.278962] ReiserFS: sda7: checking transaction log (sda7) [ 44.322506] ReiserFS: sda7: Using r5 hash to sort names [ 44.362347] ReiserFS: sda6: found reiserfs format "3.6" with standard journal [ 44.362377] ReiserFS: sda6: using ordered data mode [ 44.367524] ReiserFS: sda6: journal params: device sda6, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 [ 44.369203] ReiserFS: sda6: checking transaction log (sda6) [ 44.395302] ReiserFS: sda6: Using r5 hash to sort names [ 44.434431] ReiserFS: sda9: found reiserfs format "3.6" with standard journal [ 44.434463] ReiserFS: sda9: using ordered data mode [ 44.440806] ReiserFS: sda9: journal params: device sda9, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 [ 44.442449] ReiserFS: sda9: checking transaction log (sda9) [ 44.464768] ReiserFS: sda9: Using r5 hash to sort names
- 06-03-2009 #9Linux Guru
- Join Date
- Jan 2009
- Location
- Dover, NH
- Posts
- 1,633
I don't know how to see what is holding off on shutdown, since the logs I'd look at would be evaporated in the next boot. I do however know how to look at what is being loaded at boot and shutdown (live anyway, I don't know where Ubuntu keeps the bootlog, if it does)... it involves editing the /boot/grub/menu.lst file (use gksu gedit), on the kernel line, remove the word "splash" , save, and on next restart, you should see a live text screen of services as they come up and if they are successful ("done") or "Failed." This same screen should also be shown on shutdown.
- 06-03-2009 #10Just Joined!
- Join Date
- Jun 2009
- Posts
- 5
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:
halt and reboot should be the last executed scripts.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
Here are the commands I used in order to set the order of execution:
1. Remove all current settings
2. Add again these scripts in the correct order: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
The above means: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 .
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 to all, who responded to this issue.



