LinHES Forums
http://forums.linhes.org/

R6 strange mount problems
http://forums.linhes.org/viewtopic.php?f=14&t=20134
Page 1 of 1

Author:  UniCav [ Thu Jul 09, 2009 7:43 am ]
Post subject:  R6 strange mount problems

After getting R6 running and installing hal and udev everything mounts automatically and seems fine. However many times if I reboot I get dropped into maintenance mode with filesystem check failed. Every time it happens I find directories in /media that should not exist and every one of them will be mounted to my 2nd SATA drive /dev/sdb1. The incorrect entries will be in mtab and /proc/mounts. mtab will be recreated on boot if deleted, but /proc/mounts is created dynamically on boot and cannot be edited or deleted.

The real mystery is where /proc/mounts is getting the incorrect info? There is nothing plugged into usb when I reboot so there shouldn't be anything but the existing 2 sata drives and all partitions are defined by uuid in /etc/fstab. I've had to go as far as booting on a CD, mounting the drive and deleting the bad directories in /media to get it to reboot.

Author:  Greg Frost [ Thu Jul 09, 2009 9:23 pm ]
Post subject: 

I have seen this too a number of times in a single drive system. It looked like something was causing my root and myth partitions to be mounted in /media early in the boot phase which prevented root from being mounted read-only for an fsck, so it assumes the fsck failed.

I couldnt work out how to resolve it and just re-installed (since I havent gotten R6 to the stage where I can use it, I have only been doing test installs).

It sounds as though it may be a serious issue though.

Author:  UniCav [ Tue Aug 04, 2009 6:32 am ]
Post subject: 

Since udev and hal have been updated in R6 auto mounting has been disabled to prevent installation problems and data corruption. Given the problems I've seen with it I can understand why. But since I use my external drives for video so much I did a little more work researching udev rules and using a few posts I made one that I think will only trigger on USB drives and mount them in /media. I also set it up to mount by the partition label for a cleaner look and I deliberately started with sdc instead of sdb so it would ignore my 2nd hard drive. I'd like anyone else to test this and see if I'm right, suggest any improvements or tweaks and possibly have this added to R6 if it proves trustworthy.

/etc/udev/rules.d/usb-drive.rules

KERNEL=="sd[c-z]", SUBSYSTEMS=="usb", NAME="%k", SYMLINK+="usb%m", GROUP="users"
ACTION=="add", KERNEL=="sd[c-z][0-9]", SYMLINK+="usb%n", GROUP="users", NAME="%k"
ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/mkdir -p /media/$env{ID_FS_LABEL}"
ACTION=="add", KERNEL=="sd[c-z][0-9]", RUN+="/bin/mount -t auto -o rw,noauto,sync,noatime /dev/%k /media/$env{ID_FS_LABEL}"
ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/umount -l /media/$env{ID_FS_LABEL}"
ACTION=="remove", KERNEL=="sd[c-z][0-9]", RUN+="/bin/rmdir /media/$env{ID_FS_LABEL}"

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/