On mounting and fstab

Zorak

Distinguished
Mar 20, 2006
505
0
18,990
Something curious happened to me today. For some strange reason, when i booted my machine, it decided to only follow part of my /etc/fstab/ (and incorrectly at that). More precisely, it refused to mount 2 partitions and then it mounted another partition in a completely wrong mountpoint. I tried fixing this by doing a umount -a followed by a mount -a, but to no avail.

Ultimately i decided to reboot, but i am pretty sure that if i had hunted down the name of each partition under /dev and mounted them manually it would have been ok.

My question is then the following: what on earth would cause such a strange hiccup? Have any of you encountered odd behavior like this before?

Thanks in advance, and thanks for all the previous help that I have been given at this forum. You guys have always been very receptive and have helped me learn much about linux.

-Zorak
 


Check in /var/log/messages and see if anything unusual shows up (I'd have had you look at dmesg, but you rebooted.) Look to see if all of your devices were even recognized. If a HDD was acting wonky, then it will get skipped and its normal mountpoint will be given to the next HDD in line.

One piece of advice, though. Mounting disks by location (e.g. /dev/sdc1) in your fstab is easy to do and intuitive. However, it can get crapped up if you have a disk drop out or get moved and get a different location. Mounting partitions by UUID (e.g. /dev/disk/by-uuid/1d864b99-84a4-46dd-b7a8-3ff22229cc499) a little more tedious to make for a fstab but it'll guarantee that the correct partition always gets mounted in the correct place. In fact, some distros, notably Ubuntu, do this by default. You can see the UUIDs of your partitions by listing the contents of /dev/disk/by-uuid. At least on my machine (Debian lenny) it has the UUID and the symlink target so you can just copy-and-paste into your fstab.
 

linux_0

Splendid
dmesg, /var/log/messages, /var/log/boot.log and some of the other logs can be quite useful

The output of df and mount would also have been useful in troubleshooting but that isn't going to help after a reboot since you can't figure out what was mounted where before the reboot.

I don't know if fstab-sync or an update may have changed the fstab.
 

Zorak

Distinguished
Mar 20, 2006
505
0
18,990
i'll go ahead and take a look at those logs when I get home from school this evening. Hopefully I don't have hard drive problems, or worse yet a problem with my SATA controller. The thing is, the two partitions that did not mount were both on sata drives and I do remember that when i did mount -a i got a message that a device that was specified by some UUID "did not exist" but I wasn't sure what to make of it at the time.

Thanks for the quick response guys, I'll be sure to report back what I find later.

-Zorak

P.S. I haven't changed anything recently hardware-wise. The only change that I made software-wise was that I changed some permissions on those particular mount points so I could add a user for my sister on my computer and not have to worry about her downloading a bunch of stuff to my system (aside from what is in her home folder).
 

Zorak

Distinguished
Mar 20, 2006
505
0
18,990
Well, I just got home and I have a lot of homework to do ( I have to write a lexer for my compilers class) so I don't have a lot of time to look through the logs, and I am not entirely certain what I am looking for just yet. So, I wend into /var/log/messages and extracted everything dated yesterday and stuck it in another file for view later. I was wondering, though, are there any other places that you guys know about where anything useful might be logged? I didn't find anything in /var/log/boot (it was completely empty) and /var/log/bootstrap.log didn't have any timestamps on any of the messages, so I don't know what came from when.

Thanks.

-Zorak