Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   SATA disks distinguishable, but missing by-uuid entry. (http://www.linux-archive.org/debian-user/240104-sata-disks-distinguishable-but-missing-uuid-entry.html)

Hendrik Boom 02-04-2009 04:54 PM

SATA disks distinguishable, but missing by-uuid entry.
 
On Wed, 04 Feb 2009 17:02:18 +0100, Frederik Kriewitz wrote:

> On Wed, Feb 4, 2009 at 3:21 PM, Hendrik Boom <hendrik@topoi.pooq.com>
> wrote:
>> Fun. Lost of symlinks. Can I use these to identify the drives to be
>> used in RAID pairs or for LLVM?
>
> Yes
>
>> by-uuid seems to miss one of the SATA drives completely, although it
>> does list one SATA drive, the IDE drive, and the plugged-in USB drive.
>> And although the symbolic links point to partitions, it doesn't mention
>> anything but the first partition on /dev/sda1.
>>
>> /dev/disk/by-uuid:
>> total 0
>> lrwxrwxrwx 1 root root 10 2009-01-21 10:53
>> 233b1187-918e-4d12a396-5ea2242912f4 -> ../../sda1 lrwxrwxrwx 1 root
>> root 10 2009-01-21 10:53 ab38a373-751e-4aff-98ab-89cda2c54726 ->
>> ../../hda1 lrwxrwxrwx 1 root root 10 2009-02-04 06:41
>> f7b4688d-ad49-4a6d-88ca-77c6865ff894 -> ../../sdc1
>>
>> Nor does it list my llvm or RAID devices here. Presumably that's
>> because they aren't real disks, and I should seek them elsewhere.
>>
>> But I'm wondering about the missing SATA drive by-uuid. Its first
>> partition is mounted as /dev/sdb1, and I can read and write it.
>
> There might be duplicate UUIDs. Have a look at the blkid and/or vol_id
> tool(s). In case of a raid/lvm (or in any other case of a logical
> device) I use the named devices in /dev/mapper/ to mount them.

So do I.

> I use the
> by-path links for identifying disks by there physical position (e.g. in
> a bay) or the model/serial-number links in /dev/disk/by-id to identify a
> specific device independent of it's physical position/connection.

I suppose that will work for the immediate purpose. But having one
primary ext3 partition present in by-uuid and another missing is, to say
the least, disquieting.

It doesn't look like there's a duplicate UUID. /dev/sda and /dev/sdb
are each new drives, on which I've created one one-gigabyte
partition, and their uuid's are here.

april:~# blkid
/dev/sda1: UUID="233b1187-918e-4d12-a396-5ea2242912f4" SEC_TYPE="ext2" TYPE="ext3"
/dev/hda1: UUID="ab38a373-751e-4aff-98ab-89cda2c54726" LABEL="/" TYPE="reiserfs"
/dev/hda2: TYPE="swap"
/dev/mapper/VG1-lvol0: UUID="0b3f1cca-5c55-45f3-9f48-548ccb947489" TYPE="reiserfs"
/dev/mapper/VG1-lv--farhome: UUID="f3e6a0b2-70ab-4481-aa75-a2f416cb550c" SEC_TYPE="ext2" TYPE="ext3"
/dev/mapper/VG1-usr: LABEL="etchusr" UUID="80507f9a-fb33-4d58-98b4-75d8ebdc0152" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb1: UUID="81704330-011b-40cb-9154-194ea3839ee7" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdc1: UUID="f7b4688d-ad49-4a6d-88ca-77c6865ff894" SEC_TYPE="ext2" TYPE="ext3"
april:~#

So the uuid's are all different, yet /dev/sdb1 is missing from the
by-uuid directory:

april:~# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2009-01-21 10:53 233b1187-918e-4d12-a396-5ea2242912f4 -> ../../sda1
lrwxrwxrwx 1 root root 10 2009-01-21 10:53 ab38a373-751e-4aff-98ab-89cda2c54726 -> ../../hda1
lrwxrwxrwx 1 root root 10 2009-02-04 06:41 f7b4688d-ad49-4a6d-88ca-77c6865ff894 -> ../../sdc1
april:~#

I see why /dev/sda2 might be missing from the by-uuid list: it's a swap
partition, and presumably has no UUID but is instead recognized by
its partition's type code.

-- hendrik


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Ron Johnson 02-04-2009 08:56 PM

SATA disks distinguishable, but missing by-uuid entry.
 
On 02/04/2009 11:54 AM, Hendrik Boom wrote:

On Wed, 04 Feb 2009 17:02:18 +0100, Frederik Kriewitz wrote:


On Wed, Feb 4, 2009 at 3:21 PM, Hendrik Boom <hendrik@topoi.pooq.com>
wrote:

Fun. Lost of symlinks. Can I use these to identify the drives to be
used in RAID pairs or for LLVM?

Yes


by-uuid seems to miss one of the SATA drives completely, although it
does list one SATA drive, the IDE drive, and the plugged-in USB drive.
And although the symbolic links point to partitions, it doesn't mention
anything but the first partition on /dev/sda1.

/dev/disk/by-uuid:
total 0
lrwxrwxrwx 1 root root 10 2009-01-21 10:53
233b1187-918e-4d12a396-5ea2242912f4 -> ../../sda1 lrwxrwxrwx 1 root
root 10 2009-01-21 10:53 ab38a373-751e-4aff-98ab-89cda2c54726 ->
../../hda1 lrwxrwxrwx 1 root root 10 2009-02-04 06:41
f7b4688d-ad49-4a6d-88ca-77c6865ff894 -> ../../sdc1

Nor does it list my llvm or RAID devices here. Presumably that's
because they aren't real disks, and I should seek them elsewhere.

But I'm wondering about the missing SATA drive by-uuid. Its first
partition is mounted as /dev/sdb1, and I can read and write it.

There might be duplicate UUIDs. Have a look at the blkid and/or vol_id
tool(s). In case of a raid/lvm (or in any other case of a logical
device) I use the named devices in /dev/mapper/ to mount them.


So do I.


I use the
by-path links for identifying disks by there physical position (e.g. in
a bay) or the model/serial-number links in /dev/disk/by-id to identify a
specific device independent of it's physical position/connection.


I suppose that will work for the immediate purpose. But having one
primary ext3 partition present in by-uuid and another missing is, to say
the least, disquieting.

It doesn't look like there's a duplicate UUID. /dev/sda and /dev/sdb
are each new drives, on which I've created one one-gigabyte
partition, and their uuid's are here.

april:~# blkid
/dev/sda1: UUID="233b1187-918e-4d12-a396-5ea2242912f4" SEC_TYPE="ext2" TYPE="ext3"
/dev/hda1: UUID="ab38a373-751e-4aff-98ab-89cda2c54726" LABEL="/" TYPE="reiserfs"
/dev/hda2: TYPE="swap"
/dev/mapper/VG1-lvol0: UUID="0b3f1cca-5c55-45f3-9f48-548ccb947489" TYPE="reiserfs"
/dev/mapper/VG1-lv--farhome: UUID="f3e6a0b2-70ab-4481-aa75-a2f416cb550c" SEC_TYPE="ext2" TYPE="ext3"
/dev/mapper/VG1-usr: LABEL="etchusr" UUID="80507f9a-fb33-4d58-98b4-75d8ebdc0152" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb1: UUID="81704330-011b-40cb-9154-194ea3839ee7" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdc1: UUID="f7b4688d-ad49-4a6d-88ca-77c6865ff894" SEC_TYPE="ext2" TYPE="ext3"
april:~#


So the uuid's are all different, yet /dev/sdb1 is missing from the
by-uuid directory:

april:~# ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2009-01-21 10:53 233b1187-918e-4d12-a396-5ea2242912f4 -> ../../sda1
lrwxrwxrwx 1 root root 10 2009-01-21 10:53 ab38a373-751e-4aff-98ab-89cda2c54726 -> ../../hda1
lrwxrwxrwx 1 root root 10 2009-02-04 06:41 f7b4688d-ad49-4a6d-88ca-77c6865ff894 -> ../../sdc1
april:~#


I see why /dev/sda2 might be missing from the by-uuid list: it's a swap
partition, and presumably has no UUID but is instead recognized by
its partition's type code.


I wouldn't even worry about that, actually. Just use the UUID.

--
Ron Johnson, Jr.
Jefferson LA USA

"I am not surprised, for we live long and are celebrated poopers."
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
devpts /dev/pts devpts default 0 0
none /proc/bus/usb usbfs defaults 0 0

UUID="1D39-18FD" /dos vfat utf8,noauto 0 0
UUID="ec2cfda3-185d-4d41-a708-01472ffa6507" / ext3 errors=remount-ro 0 1

UUID="17c07445-789b-4be6-ae70-b834a6e15b08" /home ext3,ext2 defaults 0 2

UUID="57b4f381-eacc-4b19-baeb-165a99c22306" /data/private ext4 defaults,grpid 0 2

UUID="da803f5b-7bc6-4088-a2d9-2f2b2afd2340" /data/big ext4 defaults,grpid 0 2

UUID="41B2-41AB" /media/MICRO_ADVANT64 vfat defaults,noauto 0 2
UUID="1394-F09F" /media/CRUZER512 vfat defaults,noauto 0 2

UUID="aa26790b-388c-4224-b307-3a81f7441b5d" /mnt/backups ext3,ext2 defaults,noauto,noexec 0 2

/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0

UUID="c69f59ff-b928-4232-b44c-8da0f12c52db" none swap sw 0 0

Hendrik Boom 02-04-2009 09:23 PM

SATA disks distinguishable, but missing by-uuid entry.
 
On Wed, 04 Feb 2009 17:54:05 +0000, Hendrik Boom wrote:


>
> I suppose that will work for the immediate purpose. But having one
> primary ext3 partition present in by-uuid and another missing is, to say
> the least, disquieting.
>

I rebooted, and now all the entries are present in /dev/disks.by-uuid.

Go figure.

-- hendrik


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


All times are GMT. The time now is 02:17 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.