From owner-freebsd-fs@FreeBSD.ORG Thu Apr 1 19:42:35 2010 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CF24106566C; Thu, 1 Apr 2010 19:42:35 +0000 (UTC) (envelope-from bartosz.stec@it4pro.pl) Received: from mainframe.kkip.pl (kkip.pl [87.105.164.78]) by mx1.freebsd.org (Postfix) with ESMTP id 615EB8FC16; Thu, 1 Apr 2010 19:42:33 +0000 (UTC) Received: from static-78-8-144-74.ssp.dialog.net.pl ([78.8.144.74] helo=[192.168.0.2]) by mainframe.kkip.pl with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1NxQHZ-000Dy8-4P; Thu, 01 Apr 2010 21:42:32 +0200 Message-ID: <4BB4F71D.5030105@it4pro.pl> Date: Thu, 01 Apr 2010 21:42:21 +0200 From: Bartosz Stec Organization: IT4Pro User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.8) Gecko/20100306 Shredder/3.0.3 MIME-Version: 1.0 References: <4BB49E3F.7070506@it4pro.pl> <4BB4EDC9.2050507@FreeBSD.org> In-Reply-To: <4BB4EDC9.2050507@FreeBSD.org> X-Authenticated-User: bartosz.stec@it4pro.pl X-Authenticator: plain X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Spam-Score: -7.6 X-Spam-Score-Int: -75 X-Exim-Version: 4.71 (build at 02-Feb-2010 20:10:28) X-Date: 2010-04-01 21:42:32 X-Connected-IP: 78.8.144.74:60774 X-Message-Linecount: 205 X-Body-Linecount: 192 X-Message-Size: 7880 X-Body-Size: 7226 X-Received-Count: 1 X-Recipient-Count: 2 X-Local-Recipient-Count: 2 X-Local-Recipient-Defer-Count: 0 X-Local-Recipient-Fail-Count: 0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-fs@freebsd.org, freebsd-current@freebsd.org Subject: Re: gpart failing with no such geom after gpt corruption X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2010 19:42:35 -0000 On 2010-04-01 21:02, Robert Noland wrote: >>> >>> After a while I've noticed some SMART errors on ad1, so I've booted >>> machine >>> with seatools for dos and made long test. One bad sector was found and >>> reallocated, nothing to worry about. >>> As I was in seatools already, I've decided to adjust LBA size on >>> that disk >>> (seatools can do that), because it was about 30MB larger than the >>> other two, >>> and because of that I had to adjust size of freebsd-zfs partition on >>> that >>> disk to match exact size of others (otherwise 'zpool create' will >>> complain). >>> So LBA was adjusted and system rebooted. >> >> I don't understand why you adjusted LBA. You're using GPT partitions, >> so, couldn't you just make the zfs partition the same size on all >> disks by adjusting it to the smallest disk, and let free space at the >> end of the bigger ones ? > Well yes, I could indeed, and this is exactly what I did at the first time (before LBA count adjusting). But while I was already using software which could adjust LBA to make all HDD appear to be same size, I've decided to do it to never have to remember about it while partitioning ;) At least 'gpart show' isn't showing any unused (wasted) space now ;) : # gpart show => 34 78165293 ad0 GPT (37G) 34 128 1 freebsd-boot (64K) 162 2097152 2 freebsd-swap (1.0G) 2097314 76068013 3 freebsd-zfs (36G) => 34 78165293 ad1 GPT (37G) 34 128 1 freebsd-boot (64K) 162 2097152 2 freebsd-swap (1.0G) 2097314 76068013 3 freebsd-zfs (36G) => 34 78165293 ad2 GPT (37G) 34 128 1 freebsd-boot (64K) 162 2097152 2 freebsd-swap (1.0G) 2097314 76068013 3 freebsd-zfs (36G) > > For that matter, my understanding is that ZFS just doesn't care. If > you have disks of different sized in a raidz, the pool size will be > limited by the size of the smallest device. If those devices are > replaced with larger ones, then the pool just grows to take advantage > of the additional available space. > > robert. > Well, here's what man zpool says about zpool create: "(...) The use of differently sized devices within a single raidz or mirror group is also flagged as an error unless -f is specified." I know I could force it, I just didn't know if I should. After all it's just easier to type 3 times: gpt add -t freebsd-zfs -l diskN to use all free space on device than checking numbers on other disks and type gpt add -b 2097314 -s 76068013 -t freebsd-zfs -l diskN and that's why all story begins :) -- Bartosz Stec