On 2011-10-03, Paul Hartman <paul.hartman+gen...@gmail.com> wrote:
> On Mon, Oct 3, 2011 at 2:01 PM, Florian Philipp <li...@binarywings.net> wrote:
>> Am 03.10.2011 20:40, schrieb Grant Edwards:
>>> Just recently I've run in to problems because my hard drives are not
>>> detected in a predictable order, so my fstab that mount /dev/sdb1 and
>>> /dev/sdc1 sometimes result in directory trees in the wrong places
>>> (/dev/sda seems consistent, but I don't know why).
>>>
>>> What's the recommended way to fix this?
>>>
>>
>> Mount by UUID or label. In /etc/fstab, specify UUID=foo or LABEL=bar
>> instead of /dev/sdx1. You can current UUIDs and labels with `ls -l
>> /dev/disk/by-uuid` and `ls -l /dev/disk/by-label`, respectively.
>
> Or another way I think is easier: run /sbin/blkid which will tell you
> all of the info at once, such as:
>
> /dev/sda1: LABEL="boot" UUID="a3193af5-35e1-4908-bfbd-928e8841ead3" 
> TYPE="ext2"
> /dev/sda2: LABEL="root" UUID="feaa6b06-5935-491d-9aef-fe1415c380b6" 
> TYPE="ext4"
> /dev/sda3: LABEL="swap" UUID="da4437c5-6f19-409a-a71a-ee63be6ef2e5" 
> TYPE="swap"
> /dev/sda4: LABEL="home" UUID="145fb951-6f01-4cff-b221-278b72c0604f" 
> TYPE="ext4"
>
> It also tells you the RAID member uuid and sub_uuid for your RAID
> partitions, and more (man blkid).

That's one I need to remember!

-- 
Grant Edwards               grant.b.edwards        Yow! I want a WESSON OIL
                                  at               lease!!
                              gmail.com            


Reply via email to