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 1RAouL-0006Tt-Ey for garchives@archives.gentoo.org; Mon, 03 Oct 2011 20:14:39 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AF5F021C0CA; Mon, 3 Oct 2011 20:14:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id BFF7B21C172 for ; Mon, 3 Oct 2011 20:13:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 3A5061B400F for ; Mon, 3 Oct 2011 20:13:29 +0000 (UTC) X-Virus-Scanned: by amavisd-new using ClamAV at gentoo.org X-Spam-Score: -5.369 X-Spam-Level: X-Spam-Status: No, score=-5.369 required=5.5 tests=[AWL=1.230, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4] Received: from smtp.gentoo.org ([127.0.0.1]) by localhost (smtp.gentoo.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Iw+mFE79dUT6 for ; Mon, 3 Oct 2011 20:13:22 +0000 (UTC) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by smtp.gentoo.org (Postfix) with ESMTP id 4B3B71B4002 for ; Mon, 3 Oct 2011 20:13:21 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RAot5-0007IZ-GT for gentoo-user@gentoo.org; Mon, 03 Oct 2011 22:13:19 +0200 Received: from dsl.comtrol.com ([64.122.56.22]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Oct 2011 22:13:19 +0200 Received: from grant.b.edwards by dsl.comtrol.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Oct 2011 22:13:19 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Grant Edwards Subject: [gentoo-user] Re: Hard drives not detected in repeatable order. Date: Mon, 3 Oct 2011 20:13:03 +0000 (UTC) Message-ID: References: <4E8A067C.8070507@binarywings.net> 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: dsl.comtrol.com User-Agent: slrn/pre0.9.9-102 (Linux) X-Archives-Salt: X-Archives-Hash: e879ab3983b0f3e8f68d45ffe5b3bb7e On 2011-10-03, Paul Hartman wrote: > 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). That's one I need to remember! -- Grant Edwards grant.b.edwards Yow! I want a WESSON OIL at lease!! gmail.com