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

Re: Distinguishing SATA disks



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.
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.


Reply to: