[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: 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


Reply to: