From owner-freebsd-questions@freebsd.org Sun Oct 16 15:25:30 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EF79C14F08 for ; Sun, 16 Oct 2016 15:25:30 +0000 (UTC) (envelope-from brandon.wandersee@gmail.com) Received: from mail-it0-f50.google.com (mail-it0-f50.google.com [209.85.214.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 648DC1748 for ; Sun, 16 Oct 2016 15:25:29 +0000 (UTC) (envelope-from brandon.wandersee@gmail.com) Received: by mail-it0-f50.google.com with SMTP id 139so22952161itm.1 for ; Sun, 16 Oct 2016 08:25:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=1xeUcayi8BJ0vaVl9uKhD4Ldl2Jlz9BSaHG+4UtbjRk=; b=Sx2+PWGZtOvkQ4nyHUb/4FPYEkMv6j7BLN8T5dDsk2CdFAE+YZdXpJC3Kx+rJ6iido N51BVxRrAcF/jpgeKukx649+cSONhvLejv+2m8GxFCQIuTa7Y0zZuR+M1qzWtzaihs0n hEQFh2tvwyd4sse8w8YMdt2O8LXarrw8r6uWzZ2C38HfLQ3c05BbKpHu0GqJULUDiCtu Y1793Ng9rtAaZteaQxUjp3Pjs6EP/XDRxXGKCmwb944EfSFYC+ih8OaJWxnhgECGgn6s A5/X+fwpCauTLPo3T1y8SukcpR4ahg3jmWmRxTzy9cE8VfJ7inkFN5WM5zeSvg9W0adq XmAA== X-Gm-Message-State: AA6/9RmNGaPhSfLAllEQybD/iLt+S8cTS2DxCE6qYaq7sBII6grxjSrGSmv32iFdPbM5Ow== X-Received: by 10.36.98.72 with SMTP id d69mr5707360itc.118.1476631514686; Sun, 16 Oct 2016 08:25:14 -0700 (PDT) Received: from WorkBox.Home (75-161-214-135.mpls.qwest.net. [75.161.214.135]) by smtp.gmail.com with ESMTPSA id f14sm3393039ita.10.2016.10.16.08.25.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Oct 2016 08:25:13 -0700 (PDT) Received: from localhost (WorkBox.Home [local]) by WorkBox.Home (OpenSMTPD) with ESMTPA id 222a75eb; Sun, 16 Oct 2016 10:25:15 -0500 (CDT) References: <86pon1dwze.fsf@WorkBox.Home> User-agent: mu4e 0.9.16; emacs 24.5.1 From: Brandon J. Wandersee To: "Jason C. Wells" Cc: "Brandon J. Wandersee" , freebsd-questions@freebsd.org Subject: Re: Filesystem Label Ambiguity In-reply-to: Date: Sun, 16 Oct 2016 10:25:15 -0500 Message-ID: <86y41o8gf8.fsf@WorkBox.Home> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2016 15:25:30 -0000 Jason C. Wells writes: > On 10/15/2016 4:16 PM, Brandon J. Wandersee wrote: >> Jason C. Wells writes: >> >>> Let's say I have three disks and each of them has a partition labelled >>> "volume3" i.e. /dev/ufs/volume3. >>> >>> How can I determine which of those is currently mounted? >>> >>> How does the system determine which of those to mount at boot time? >> Short answer: Don't do this. > > OK. So the device renumbering problem has been traded for a naming > ambiguity problem. I didn't realize this when I first came upon my > naming convention for filesystems. I'll start keeping track of my > "volumeX" names and make them unique. I just got lucky that I didn't > mount the wrong disks over the course of the last few weeks. > > Maybe I'll just use UUIDs everywhere. Those are easy to remember. :) You can do whichever works for you, of course, but if you wanted to use labels you wouldn't have to drastically change your naming scheme. Just add some extra identifier. The ZFS pools on my file/media server, for example, consist of "/dev/gpt/system00" and "/dev/gpt/system01" for the OS pool, and "/dev/gpt/data00" and "/dev/gpt/data01" for the data pool. You just need a naming convention that identifies a filesystem as "third filesystem on *this* disk" rather than "third filesystem on some disk somewhere." -- :: Brandon J. Wandersee :: brandon.wandersee@gmail.com :: -------------------------------------------------- :: 'The best design is as little design as possible.' :: --- Dieter Rams ----------------------------------