From: Alan Chandler on
I feel I should move my entire /etc/fstab over to using uuids

However after installation I added the following line

/dev/raid/bak /bak ext4 defaults 0 2

which I now need to convert to a uuid (/dev/raid/bak is an lv on the
"raid" volume group)

if I look in /dev/disk/by-id I can locate the following

lrwxrwxrwx 1 root root 10 Jun 21 19:20 dm-name-raid-bak -> ../../dm-0

which shows me that this has been mapped to /dev/dm-0

However, I now have two options

in /dev/disk/by-id there is the following (excuse the word wrap)

lrwxrwxrwx 1 root root 10 Jun 21 19:20
dm-uuid-LVM-25HQ5BuXqjSs2y53Aj4C8zMHEX1ZrgBieFN7ln0AYSPSwzxCh5ylxoM3kRzS9gCe
-> ../../dm-0

and in /dev/disk/by-uuid (again excuse the word wrap)

lrwxrwxrwx 1 root root 10 Jun 21 19:20
f3408fda-0649-414f-8446-c01cf4e07558 -> ../../dm-0

There seems to be no correspondence between them

Which do I use, and what does the other one mean?

--
Alan Chandler
http://www.chandlerfamily.org.uk


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4C21C876.2000603(a)chandlerfamily.org.uk
From: Javier Barroso on
On Wed, Jun 23, 2010 at 10:40 AM, Alan Chandler
<alan(a)chandlerfamily.org.uk>wrote:

> I feel I should move my entire /etc/fstab over to using uuids
>
> However after installation I added the following line
>
> /dev/raid/bak /bak ext4 defaults 0 2
>
> which I now need to convert to a uuid (/dev/raid/bak is an lv on the
> "raid" volume group)
>
> if I look in /dev/disk/by-id I can locate the following
>
> lrwxrwxrwx 1 root root 10 Jun 21 19:20 dm-name-raid-bak -> ../../dm-0
>
> which shows me that this has been mapped to /dev/dm-0
>
> However, I now have two options
>
> in /dev/disk/by-id there is the following (excuse the word wrap)
>
> lrwxrwxrwx 1 root root 10 Jun 21 19:20
> dm-uuid-LVM-25HQ5BuXqjSs2y53Aj4C8zMHEX1ZrgBieFN7ln0AYSPSwzxCh5ylxoM3kRzS9gCe
> -> ../../dm-0
>
> and in /dev/disk/by-uuid (again excuse the word wrap)
>
> lrwxrwxrwx 1 root root 10 Jun 21 19:20 f3408fda-0649-414f-8446-c01cf4e07558
> -> ../../dm-0
>
> There seems to be no correspondence between them
>
> Which do I use, and what does the other one mean?
>

Get your uuid from dumpe2fs -h /dev/vg/lv | grep UUID

But /dev/vg/lv is a persistent name, so no sense changing it to uuid, or
maybe I'm missing something ?

Regards,
From: Ron Johnson on
On 06/23/2010 05:20 AM, Javier Barroso wrote:
> On Wed, Jun 23, 2010 at 10:40 AM, Alan Chandler
> <alan(a)chandlerfamily.org.uk>wrote:
>
>> I feel I should move my entire /etc/fstab over to using uuids
>>
[snip]
>>
>> Which do I use, and what does the other one mean?
>>
>
> Get your uuid from dumpe2fs -h /dev/vg/lv | grep UUID
>
> But /dev/vg/lv is a persistent name, so no sense changing it to uuid, or
> maybe I'm missing something ?
>

Or use labels.

--
Seek truth from facts.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4C21E553.3090804(a)cox.net
From: Tom H on
On Wed, Jun 23, 2010 at 4:40 AM, Alan Chandler
<alan(a)chandlerfamily.org.uk> wrote:
> I feel I should move my entire /etc/fstab over to using uuids
>
> However after installation I added the following line
>
> /dev/raid/bak /bak            ext4    defaults        0       2
>
> which I now need to convert to a uuid  (/dev/raid/bak is an lv on the "raid"
> volume group)
>
> if I look in /dev/disk/by-id I can locate the following
>
> lrwxrwxrwx 1 root root 10 Jun 21 19:20 dm-name-raid-bak -> ../../dm-0
>
> which shows me that this has been mapped to /dev/dm-0
>
> However, I now have two options
>
> in /dev/disk/by-id there is the following (excuse the word wrap)
>
> lrwxrwxrwx 1 root root 10 Jun 21 19:20
> dm-uuid-LVM-25HQ5BuXqjSs2y53Aj4C8zMHEX1ZrgBieFN7ln0AYSPSwzxCh5ylxoM3kRzS9gCe
> -> ../../dm-0
>
> and in /dev/disk/by-uuid (again excuse the word wrap)
>
> lrwxrwxrwx 1 root root 10 Jun 21 19:20 f3408fda-0649-414f-8446-c01cf4e07558
> -> ../../dm-0
>
> There seems to be no correspondence between them
>
> Which do I use, and what does the other one mean?

The last one is the lv's uuid so it the "right" uuid value although
you shouldn't need uuids for lvs since vg and lv names are persistent.

The lv-related dm-... values in by-id are "artificial" because the
usual values in by-id are hardware ids. Since the hardware is
abstracted, udev is creating disk ids with the vg and lv names and
with the lv filesystem uuids. I am sure that you can use them in your
fstab (I think that Suse/OpenSuse does so instead of /dev/sda1 for
non-lvm'd boxes, etc) but not with "UUID=..." because, AFAIK, there
isn't an equivalent of "UUID=..." for /dev/disk/by-id. You'ill have to
use "/dev/disk/by-id/...".


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTikCfiARQEdNOMBJ5LXa8Py9D5B6YKxz9LSRHNyy(a)mail.gmail.com
From: Camaleón on
On Wed, 23 Jun 2010 09:40:22 +0100, Alan Chandler wrote:

> I feel I should move my entire /etc/fstab over to using uuids

Mmm... any strong reason for doing that? :-)

I'm with Lenny and the old naming method ("/dev/sdx") is the default for
"/etc/fstab".

(...)

> if I look in /dev/disk/by-id I can locate the following

(...)

> and in /dev/disk/by-uuid (again excuse the word wrap)
>
> lrwxrwxrwx 1 root root 10 Jun 21 19:20
> f3408fda-0649-414f-8446-c01cf4e07558 -> ../../dm-0
>
> There seems to be no correspondence between them

Well, just a bit explanation about the device nomenclature. If you issue:

sm01(a)stt008:~$ ls -l /dev/disk
total 0
drwxr-xr-x 2 root root 280 jun 23 07:29 by-id
drwxr-xr-x 2 root root 80 jun 23 07:29 by-label
drwxr-xr-x 2 root root 180 jun 23 07:30 by-path
drwxr-xr-x 2 root root 100 jun 23 07:29 by-uuid

You will see the 4 available options. You can use/choose whatever you
want for naming your devices. So, having no correspondence between them
is normal (I mean, "by-id" uses a different name than "by-uuid").

> Which do I use, and what does the other one mean?

The most used are "by-uuid" and "by-id". But unless you are experiencing
any problem with your current setup, I would leave it as is right now.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/pan.2010.06.23.15.47.37(a)gmail.com