From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RAoO3-0001fK-6c for garchives@archives.gentoo.org; Mon, 03 Oct 2011 19:41:15 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B140421C20C; Mon, 3 Oct 2011 19:40:01 +0000 (UTC) Received: from mail-ww0-f53.google.com (mail-ww0-f53.google.com [74.125.82.53]) by pigeon.gentoo.org (Postfix) with ESMTP id DE56C21C1BF for ; Mon, 3 Oct 2011 19:35:07 +0000 (UTC) Received: by wwg14 with SMTP id 14so5494090wwg.10 for ; Mon, 03 Oct 2011 12:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=PHydg21TALNJQkyXFDL4LwABACL9NxFBjFb4e96NbgQ=; b=ifFaHvmF5h00dBhCXxJcrw/EmiCiFL5v0AvsM1qz7TGFvgARkBLmdXljbIWBEXQBPA 9Z0dzt8KfP3IyZcduOmpS0I67+y1/yWJahZbMqLvYlkuJlcMcpTlsj+Ed3Edr3zAO9Dw eIoMC1T0WO21d3JJfVHZM6xDHG33R7J5ME9wo= Received: by 10.227.201.79 with SMTP id ez15mr325030wbb.99.1317670507118; Mon, 03 Oct 2011 12:35:07 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Sender: paul.hartman@gmail.com Received: by 10.227.59.193 with HTTP; Mon, 3 Oct 2011 12:34:47 -0700 (PDT) In-Reply-To: <4E8A067C.8070507@binarywings.net> References: <4E8A067C.8070507@binarywings.net> From: Paul Hartman Date: Mon, 3 Oct 2011 14:34:47 -0500 X-Google-Sender-Auth: k4x4S6f4VGLoVuzITTtpraHM-CY Message-ID: Subject: Re: [gentoo-user] Hard drives not detected in repeatable order. To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=ISO-8859-1 X-Archives-Salt: X-Archives-Hash: 3e529a957b0d5c8d93ef76141eaeb178 On Mon, Oct 3, 2011 at 2:01 PM, Florian Philipp 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).