From owner-freebsd-stable@FreeBSD.ORG Sun Nov 3 16:36:41 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CC76056F for ; Sun, 3 Nov 2013 16:36:41 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-oa0-x236.google.com (mail-oa0-x236.google.com [IPv6:2607:f8b0:4003:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 95EEF2662 for ; Sun, 3 Nov 2013 16:36:41 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id o20so6400417oag.27 for ; Sun, 03 Nov 2013 08:36:40 -0800 (PST) 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=QOcvccXYAKTfGCXRalpnHKoBYswUdrYVNwq5Ds4jTug=; b=fxi9aP4D1okKkbNVPwOJe1wI8T3pr1lGoQVXIwpp4GJd0TzToPY0h2xU9IVxqfPw2b tvVSpOmdk9Hywz8dc5d2WfQceEIlF/+3pRSDPZMjIiTJVUC2v67H+W9f8z2GswMwTKAv PjgMM8G0uQgle+n6OQW2Y61HJW1iMI6ufCtG8ZhlQ1JoYeXier1me5qcsSgphNTA+jLP O/1768+HSR+T14LMDNURHmJgkk3XTAwCU0hdA9kfa+3cnX9dKJSeGJXI7Bxgsb3fcvSf voWPLP+EzF8t0TeesIgz/PsV/l4frwb8/NbeOE7YngmXPoh/fxx6TnveKohRwcGwBLbL nNfQ== MIME-Version: 1.0 X-Received: by 10.60.157.2 with SMTP id wi2mr1752362oeb.35.1383496600683; Sun, 03 Nov 2013 08:36:40 -0800 (PST) Received: by 10.76.132.9 with HTTP; Sun, 3 Nov 2013 08:36:40 -0800 (PST) Received: by 10.76.132.9 with HTTP; Sun, 3 Nov 2013 08:36:40 -0800 (PST) In-Reply-To: References: Date: Sun, 3 Nov 2013 08:36:40 -0800 Message-ID: Subject: Re: HDD-manufacture induced ZFS limitations From: Freddie Cash To: Zenny Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD Stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 16:36:41 -0000 On Nov 3, 2013 1:07 AM, "Zenny" wrote: > > Hi: > > PROBLEM > > I came across a very weird situation because HDD-manufacturer counts > HDD space according to metric system instead of multiplication of 1024 > (2^10). This mismatches the space capacity between what OS filesystems > calculate HDD space. > > Secondly, each HDD manufacturer has different total byte size for what > they claim as the same sized HDDs. > > With the above two scenarios, it poses a nuisance to replace a > corrupted HDD with another HDD from another manufacturer even though > they claim that they are of the equal size, but differs by a few > bytes. Thus, zfs does not accept the new HDD. > > SOLUTION > > A way around is to create a sparse zfs dataset at the beginning, > according to the HDD-manufacturer defined metric system of HDD space > measurement at the power of 10 rather than 2^10. > > BUT ANOTHER PROBLEM > However, I came across another odd situation with the bsdinstaller > with FreeBSD 10-Beta2 which has an option to install root in zfs. The > bsdinstaller script is flawless as it is. But it does not address the > disksize mismatch problem as stated above. Any workaround will be > appreciated! > > It would be a nice feature if the new bsdinstaller in FreeBSD10 allows > the user first to make a sparse zfs dataset before installing root in > zfs. Thanks! The workaround is simple: create a partition that starts at 1 MB and leaves 1 MB free at the end of the disk. However, that workaround is no longer needed, as ZFS v22-ish introduced a similar workaround internally. So it's possible to use while disks that differ in size by 1MB or two without any issue.