From owner-freebsd-fs@FreeBSD.ORG Sat Jun 8 15:16:48 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 56C5E1E33 for ; Sat, 8 Jun 2013 15:16:48 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-qc0-x236.google.com (mail-qc0-x236.google.com [IPv6:2607:f8b0:400d:c01::236]) by mx1.freebsd.org (Postfix) with ESMTP id 1DFD6109A for ; Sat, 8 Jun 2013 15:16:47 +0000 (UTC) Received: by mail-qc0-f182.google.com with SMTP id e10so655640qcy.13 for ; Sat, 08 Jun 2013 08:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=BEv8SpcOcu/+38njtWj3qKDrpLb65wbsMw5y+XK8TKc=; b=hT6w0CtosKj0eRhNvHw1VY0Xf/quDnc05MTWmeAvUnwc0KMJUw7FVs57QQ/63dCHTe hfYH9NeDR8PRHDwWwO+kbkiXYYzPKDaoSkvl/73YMFhLqtjInvHgR2BngvAsEdWXz0Lu vo4Z0kgEQM2QOvI94JdqVAx3jLAUCuqQlh+OfRsEI9mlhmxqAweUzeorX606F1FiFR2F pj1QDQ86sxLKUXSgkMox5QYHubYSc3n2qyLtReGxeSAaNstWnvqF2K9IPDC+1FqiN0iI YWGzmh4F32oMUic/G0S4K41xB8d0zVb/RyKggf/FJXcUrNlWv8Nlmf1aG5T0OreY34id WOTw== MIME-Version: 1.0 X-Received: by 10.49.62.33 with SMTP id v1mr2503736qer.53.1370704607523; Sat, 08 Jun 2013 08:16:47 -0700 (PDT) Received: by 10.49.36.36 with HTTP; Sat, 8 Jun 2013 08:16:47 -0700 (PDT) Received: by 10.49.36.36 with HTTP; Sat, 8 Jun 2013 08:16:47 -0700 (PDT) In-Reply-To: References: Date: Sat, 8 Jun 2013 08:16:47 -0700 Message-ID: Subject: Re: ZFS and Glabel From: Freddie Cash To: "Reed A. Cartwright" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD Filesystems X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jun 2013 15:16:48 -0000 On 2013-06-08 2:24 AM, "Reed A. Cartwright" wrote: > > I currently have a raidz2 pool that uses whole disks: da6, da7, etc. > I want to label these using glabel and have zfs mount them using the > labels. This way, if an HDD fails, I will be able to easily replace > the drive. > > So my questions are a follows: > > 1) Can glabel be used with zfs and raw disks? Should it be? Yes. > 2) Can I add a glabel after the disks have been placed in a pool? Yes. > 3) How would I do this without losing data? zpool offline storage da6 glabel label da6 storage1 zpool replace storage da6 label/storage1 Wait for the resilver to finish. Then repeat the above steps for each disk. ZFS reserves about 1MB of the disk for "slack" space to allow for replacing drives when the size is the same but the total number of disk sectors is different. I did the above on two separate storage boxes with 24 drives each without any issues.