LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 03-01-2014, 07:28 AM   #1
irneb
Member
 
Registered: Apr 2010
Location: Jo'burg SA
Distribution: Kubuntu 13.04 x86_64
Posts: 144

Rep: Reputation: 28
Auto Mount HDD not working via Label


After I've installed Kubuntu 13.10 Saucy (was on 13.04 Raring) my extra HDD's simply don't want to mount.

If I try manually mounting them, I get an error message:
Quote:
missing codepage or helper program, or other error...
This led me to a "known" kernel bug: https://bugs.launchpad.net/ubuntu/+s...7?comments=all

So the x-gvfs-show mount option should be turned off (until such time as its dependencies are updated). And it works! ... ... well ... sort of. Only if you don't use the disc label as the mount point. The sdb# / sdc# ... method works fine, haven't tested the id mounts as these are even more problematic due to my setup - let me explain.

You see, I've got around 6 HDD's inside my PC (in addition to the SSD which hold the OS(s)). Sometimes I upgrade the HDDs to larger discs by copying the data to the new disc, then removing the old one and renaming the new one with the same label. Then I have the same mount point (/mnt/<Partition Label>) for the new disc as it was for the old (superseded) disc. This in turn means all my various symlinks work without modification (and I've got many of those and would be highly inefficient to edit each to refer to a new mount point). I.e. rename the new disc so it "impersonates" the old one which is now obsolete, making all other settings work without issue or need of modifications. If I used the id (as per gnome-disks's default mount point setting) or even the sdb# method, I tend to find that it changes every time I replace a disc - which in effect thus makes the whole idea of not having to edit any symlinks moot. So Label mounting is a necessity for me.

However, when I set the auto mount point to use the Label method, I get a further error just before the login screen at boot time: I'm told (once for each of these discs) that it's not ready and cannot be mounted at this time. Then I'm given the option to Skip / Manual recovery, neither allows me to mount at this time. So it's a situation of S, S, S, S, S, S ... type password, no discs available except the root SSD.

But then: after logging in I can manually mount these discs no problem. I can probably automate this process through a login script, but why should this happen now? It was working fine in 13.04. And further: unfortunately though, it then sets the mount point to /mnt/<username>/<Partition Label> ... which obviously then voids all my symlinks.

Last edited by irneb; 03-01-2014 at 07:32 AM.
 
Old 03-01-2014, 05:21 PM   #2
Andy Alkaline
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware32-stable, Debian-wheezy-amd64, LFS 7.1
Posts: 351

Rep: Reputation: 33
I don't know the answer to your question, but would mounting using UUID rather than LABEL be a viable alternative?

fstab with uuid
 
Old 03-01-2014, 11:49 PM   #3
irneb
Member
 
Registered: Apr 2010
Location: Jo'burg SA
Distribution: Kubuntu 13.04 x86_64
Posts: 144

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by Andy Alkaline View Post
I don't know the answer to your question, but would mounting using UUID rather than LABEL be a viable alternative?

fstab with uuid
Thanks to the idea. Unfortunately it similar to GUID. I.e. a unique identifier for a particular device.

The problem with that (and why I'm not using it) is that my new HDD (by definition) would have a new GUID/UUID. And therefore a new mount point. Which is exactly what I don't want.

Now if it was only this once, I'd accept trying to find and edit all symlinks to point to the new mount point (together with the paths). But I don't want to run through that again in a year's time (when I can afford a larger disc). I suppose I could write a script or program to do this

Another alternative I've been playing around with is using "nested" symlinks. I.e. the default symlinks (spread throughout many folders in home and through shares) point through a single symlink in media to the relevant /mnt/890248976#####...... partition. That way I would only need to edit one single symlink (the one in media). That I'd be happy to do ... though it brings up another issue:

I was on the point of converting all my symlinks to hardlinks because if I don't then sharing them across samba creates a security hole: http://www.samba.org/samba/news/symlink_attack.html
But that brings up other issues, like hardlinks not being able to link to directories (only files) and not able to cross fs boundaries (e.g. one disc in ext4 and another in reiserfs). Not to mention, it would be even more difficult to edit/re-create hardlinks every time the mount point changes.

Perhaps I should just scrap the entire idea and change to fsunion. Though that would mean lots of reformatting and moving files about - at least to begin with (heard of some issues with fsunion though, so a bit scared of it).

Another alternative might be to go with JBOD. Perhaps going with ZFS/BTRFS instead, but the one's not perfectly Linux and the other is mostly still beta (and I've had issues with ZFS on linux like crashes causing corruption - especially when loads are high due to its extreme RAM requirements). Normal RAID is simply not an option - my discs are definitely NOT the same size.

If I go this route (fsunion / JBOD / spanned fs over multiple HDDs) I'd probably be able to get away from the symlinks. Any other alternatives I could try, or reasons to dispel the warnings which are keeping me from using some alternatives?
 
Old 03-02-2014, 12:38 PM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,539

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
um, you are changing drives, therefore you have to make the adjustment. this is a USB device, therefor it will NEVER be static, the uuid is the best way to deal with this.

if you have symlinks pointing to the device instead of to a mount point you are doing it wrong. point to the mount point that will NOT change, then you have zero issues with your symlinks.
 
1 members found this post helpful.
Old 03-03-2014, 12:16 AM   #5
irneb
Member
 
Registered: Apr 2010
Location: Jo'burg SA
Distribution: Kubuntu 13.04 x86_64
Posts: 144

Original Poster
Rep: Reputation: 28
This isn't a USB disc, it's a HDD connected through a SATA cable direct from one of the mother-board's ports. I.e. I'm swapping an internal HDD for a larger one. If it was a USB it would've been even worse.

Though you're correct (and thanks), I failed to realize that I can actually mount the same drive into multiple locations. So it's immaterial what method its original fstab mounting is pointing to (so I also NOW consider UUID/GUID as the least troublesome). All that's needed is a mount instruction inside rc.local so it mounts that UUID/GUID reference to another point which you can name in the CLI command's switches to anywhere and any name you desire ... and it all works fine! With this I didn't even need to edit any links.
 
Old 03-03-2014, 03:23 PM   #6
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,539

Rep: Reputation: 462Reputation: 462Reputation: 462Reputation: 462Reputation: 462
excellent. please mark the thread solved.

yes sorry for some reason i thought this was a USB device, but even with an internal HDD its the same process for the fstab, use either the /dev/sdX# or the UUID and mount it to the same place as the old drive it replaced.
 
1 members found this post helpful.
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] auto mount HDD on reboot? ubuntu Vodkaholic1983 Linux - Software 8 09-25-2013 06:08 AM
auto mount 2nd hdd, install aqualung, gksudo dolphin Fedora 15 KDE 64 bit OrangeShoes Linux - Desktop 5 07-10-2011 04:05 PM
Problems with auto mount external hdd-drives. LuxLuv Linux - Server 4 03-18-2010 03:46 AM
Auto Mount Of External USB Hdd on Red Hat Linux 4.6 bishnu101 Linux - Desktop 1 07-29-2009 04:12 AM
How to auto mount a 2nd hdd Adam555 Linux - Newbie 2 01-22-2008 02:56 AM


All times are GMT -5. The time now is 03:01 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