Automount according to label or uuid

Asked by François Tissandier on 2007-05-24

When you have an USB external harddrive, you sometimes want it to be mounted at the same place each time you plug it (especially if you have a backup scheduled on this harddrive :) Then it will totally mess up all the partitions, I know it by experience, data all over the place ;)

But partitions are not always recognize with the same name (can be sdb1, sdb2, etc...), and they may use a name used by another external item (like card reader). So it's safer to recognize them using the label or uuid, and to add them in the fstab with an 'auto,hotplug' option. Will it be supported in DIskManager?

Thanks in advance for the info!

Question information

Language:
English Edit question
Status:
Solved
For:
Disk Manager Edit question
Assignee:
No assignee Edit question
Solved by:
Jayson Vaughn
Solved:
2007-05-24
Last query:
2007-05-24
Last reply:
2007-05-24
Best Jayson Vaughn (thedonvaughn) said : #1

Hello,
If you are using ext3 file system, it is safe to use e2label to use a label on the drive. This label will be stored on the drive itself, so it will be choice to use in an environment such as yourself.

François Tissandier (baloo) said : #2

Hi Jason

I'm using ext3, but I'm on Ubuntu, so I can use UUID.
But I just wanted to check with you if diskmanager can handle labels or UUID. I think it's a great idea to have a GUI for fstab, but if it doesn't work with UUID or label, I won't use it. I'm probably not the only one with this problem. So I just wanted to tell you about my "problem", in case DIskManager can't solve it yet.

Good continuation on the development!

Florent Mertens (givre) said : #3

To answer the question, i will tell you how Disk Manager works in that area.
1. Disk Manager don't manage removable device. It is not is jobs and
they should be managed by other program automatically. All current distribution
already manage that out of the box. On top, it's quite weird to manage removable
device in fstab, which is for *static* fs

2. Of course Disk Manager manage LABEL and UUID, but it don't force the use of them.
It works currently like that :
- In all modes, LABEL= when used before, is always prefer.
This is specially for fedora, which use LABEL=/ for
their root partition. But if it wasn't used before,
and even if the partition has a label, it will not use it,
since a label is something that could be change easily.
- In 'dev' mode, all entry use device path (/dev/*)
- In 'uuid' mode, all entry use UUID=
- In 'auto' mode, disk-manager looks if UUID is use in one entry,
and if yes, use UUID for all. Otherwise, it use device path.
- Also, if 2 devices have the same UUID (that could happens when
you do a clone of a partition), it will used device path.

Their is for now no GUI for changing fstab naming mode, but
it is plane for post 1.0 release. For now, the default is 'auto',
and you could change it in the configuration file .disk-manager.conf
which should hidden in your home directory.

PS : sorry for my english ;)

François Tissandier (baloo) said : #4

Florent, thanks for your update

Some comments:
I know it seems weird to use fstab to manage a removable device.
But in my case, let's say it's "removable if needed", but most of the time, i use it just like an internal harddrive.
As it's a backup harddrive, I sometime take it with me to avoid keeping all my data at the same place. But otherwise, it's connected all the time.

As I use cron jobs to do my backups, I need this drive to have the mount point each time, or it mess all the backups.

I have found a solution by simply having only one partition on this harddrive. This way, it's mounted with the same name each time.

But maybe there are other people in my situation who want to keep several partitions. So I probably didn't put my question at the right place, but I just wanted to report my problem.