From owner-freebsd-fs@FreeBSD.ORG Wed Jul 3 10:09:14 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 6D141B0D for ; Wed, 3 Jul 2013 10:09:14 +0000 (UTC) (envelope-from shuriku@shurik.kiev.ua) Received: from graal.it-profi.org.ua (graal.shurik.kiev.ua [193.239.74.7]) by mx1.freebsd.org (Postfix) with ESMTP id 283B81A48 for ; Wed, 3 Jul 2013 10:09:13 +0000 (UTC) Received: from [217.76.201.82] (helo=thinkpad.it-profi.org.ua) by graal.it-profi.org.ua with esmtpa (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1UuJzr-0009Rh-N9; Wed, 03 Jul 2013 13:09:12 +0300 Message-ID: <51D3F842.9050002@shurik.kiev.ua> Date: Wed, 03 Jul 2013 13:09:06 +0300 From: Alexandr User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130630 Thunderbird/17.0.7 MIME-Version: 1.0 To: Fleuriot Damien References: <51D3ED4F.5030102@shurik.kiev.ua> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 217.76.201.82 X-SA-Exim-Mail-From: shuriku@shurik.kiev.ua X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on graal.it-profi.org.ua X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.2 Subject: Re: Whole disk ZFS or -a4k partition X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on graal.it-profi.org.ua) Cc: freebsd-fs@freebsd.org 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: Wed, 03 Jul 2013 10:09:14 -0000 03.07.2013 12:46, Fleuriot Damien пишет: > On Jul 3, 2013, at 11:22 AM, Alexandr wrote: > >> Hello, community! >> >> I have a laptop with 2 disks - mSATA 32Gb SSD and 500Gb HDD. I plan to >> use SSD as whole disk ZFS pool with root and /usr partitions and 500Gb >> SATA as ZFS pool for /home and /var. My questions are: >> >> 1. Do I need to create a 4k aligned partition on HDD for zfs pool or >> best to use a whole disk? >> 2. Where the best place for swap - ssd or hdd? SSD is much faster, but >> with limited write life cycle. >> > > I advise against using the whole disk for the following reason: > > DISK1, manufacturer 1: 3tb (give or take) > DISK2, manufacturer 2: 3tb (give or take MINUS 10 BYTES) > > Et voila, you can't use DISK1 with DISK2 because DISK2 is 10 bytes smaller and won't fit. > > > When building RAID arrays, it's recommended to: > - use disks from different manufacturers > - use disks ordered at different times (for example half at T1, half at T2) > - shave a few MBs off your disks, so that they all present the same size > > > Here's an example from my nas at home: > > % gpart show /dev/ada6 > => 34 5860533101 ada6 GPT (2.7T) > 34 6 - free - (3.0k) > 40 102400 1 freebsd-ufs (50M) > 102440 5860430688 2 freebsd-zfs (2.7T) > 5860533128 7 - free - (3.5k) > > > Notice how the disk presents 5860533101 sectors of 512 bytes. > Also notice how I've shaved off 50mbytes in the first, unused partition. > > This way, if I replace a disk later on and the new disk only has, say 5860533095 512-byte sectors, I can still use it in my pool. > Thanks, but I haven't raid arrays in my setup. I have two different zpools on ssd and hard disk.