Partitions don't mount properly for a user, but a remount by root fixes things.
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Mint 7, running on a 1.6GHz centrino duo, 2048MB, 80GB, NVidia 7300 512MB laptop
Posts: 30
Rep:
Partitions don't mount properly for a user, but a remount by root fixes things.
A strange problem this...
I've got an 80G internal drive, and one 160G and one 1T external drives split into a few partitions - The internal carries a windows partition and / , the 160G external carries /home/<username> (yep, not just /home - I sometimes need the machine when the external drives aren't connected - its a laptop, so I've got a 'mobile' user who's home is in the internal drive), and the 1T external carries several partitions that are mounted inside /home/<user>. Some of these are fat, some are ext3. fstab lists the /home/<user> mount just after / and swap (before the other partitions)
The problem - Booting up the machine, and logging on to my <user>, no errors are produced, everything seems fine, and the external drives are shown as mounted. Unfortunately, opening the drives (or rather, their mount points) in nautilus, the terminal, or anything just shows a completely empty folder. Writeable to, but with no contents. (each partition does contain significant amounts of data - music, photos, films etc). Trying to dismount the partitions fails with the message 'the partition is not mounted'. Gparted sees the partitions as mounted, but fails to dismount with the same message. 'sudo umount <dev...>' fails too.
However, logging in as root, I can dismount the drives, remount them, and all is fine - returning to <user>, the partitions/mount points have the data in them.
All the external partitions are being affected, including my $home. This causes interesting problems with .files and settings...
My suggestion to you is, rather than mounting things under /home/<user> mount the partitions under /mnt/<stuff> and then have symlinks in /home/<user> -- the partitions in /mnt could have the "users" option in fstab, as well as "noauto".
Then, when you log in, put some script into .bashrc to check for the external drives and mount them if present... as <user>.
Yes, it's more complicated, but that's what I'd do. *shrug*
...all that said, you might be able to keep it the way it is by just adding the "users" to your fstab options for those partitions.
[edit]
Are you saying that /home/<user> and /home/<username> are different partitions? That would make mounting /home/<username> more interesting.
Last edited by headrift; 06-11-2009 at 10:31 AM.
Reason: Original post re-read
Distribution: Mint 7, running on a 1.6GHz centrino duo, 2048MB, 80GB, NVidia 7300 512MB laptop
Posts: 30
Original Poster
Rep:
Quote:
Originally Posted by headrift
My suggestion to you is, rather than mounting things under /home/<user> mount the partitions under /mnt/<stuff> and then have symlinks in /home/<user> -- the partitions in /mnt could have the "users" option in fstab, as well as "noauto".
Yeah, but its messy :P ...and besides, my $home isn't mounting properly either.
Quote:
Originally Posted by headrift
Then, when you log in, put some script into .bashrc to check for the external drives and mount them if present... as <user>.
I can't remount the drives as me, even using sudo. I have to actually log in as root and do it.
Quote:
Originally Posted by headrift
...all that said, you might be able to keep it the way it is by just adding the "users" to your fstab options for those partitions.
Yup, 'users' is there. I'm really not sure what's going on.
Quote:
Originally Posted by headrift
Are you saying that /home/<user> and /home/<username> are different partitions? That would make mounting /home/<username> more interesting.
Ah, yeah. <username> should be <user> there. Sorry.
Tell you what, here's my fstab, if that helps visualise my setup:
Edit: In fact, why the fudge does /windows and /scenery mount, but none of the others?! (heh, and that xplane.iso) Is there anything filesystem-error-wise that'll make things appear to mount but not actually mount? Without errors? pfft. I unno.
Last edited by prometheusracer; 06-11-2009 at 11:44 AM.
Reason: further mindfcukery
...that's what it sounds like, anyway. Something up the chain from ~/External isn't happening, but /home is. So, it's /home/matt. I'd say that for some reason the external drives are being attached before /home/matt is done mounting, meaning your externals are mounted, but "under" what gets mounted later, making it look to the system that they're mounted, even though they're "orphaned".
I'd try changing the five partitions after /home/matt to "noauto" and then do what I said with a bit of script in .bashrc -- should be easy enough, I can put up the lines of script if you need me to.
Oh, and you realize you have mounts running three levels deep there, right? And my suggestion is messy?
Distribution: Mint 7, running on a 1.6GHz centrino duo, 2048MB, 80GB, NVidia 7300 512MB laptop
Posts: 30
Original Poster
Rep:
Yeah, that's what I thought at first. Well, it threw up errors that ~/External....~/Videos weren't mounting (no mount points, but /home/matt was there, just empty). I created the mount points in that partition anyway, so they'd mount to those even if /home/matt didn't mount... unno.
I tried the noauto flags, and changed the mountpoints to somewhere directly under / , but they still failed in the same way. (I didn't put the commands in .bashrc, just ran them from the terminal. Should be the same, shouldn't it?)
Yeah, well, when its working, it looks clean :P
Edit:
Ah ha! In /var/log/messages, I've got:
Code:
Jun 11 20:50:53 mattop kernel: [ 82.722568] EXT3-fs warning (device sdc1): dx_probe: dx entry: limit != root limit
Jun 11 20:50:53 mattop kernel: [ 82.722575] EXT3-fs warning (device sdc1): dx_probe: Corrupt dir inode 2, running e2fsck is recommended.
repeated many many times for sdc1 only. Hmmm... so that's probably not the issue then... meh, fsck it is anyways.
Last edited by prometheusracer; 06-11-2009 at 03:56 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.