From owner-freebsd-geom@FreeBSD.ORG Tue Oct 18 07:05:01 2011 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 890CC106566B for ; Tue, 18 Oct 2011 07:05:01 +0000 (UTC) (envelope-from bartsch@dssgmbh.de) Received: from mail.incore.de (dss.incore.de [195.145.1.138]) by mx1.freebsd.org (Postfix) with ESMTP id 1934F8FC0A for ; Tue, 18 Oct 2011 07:05:00 +0000 (UTC) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by mail.incore.de (Postfix) with ESMTP id E3DB55C879 for ; Tue, 18 Oct 2011 08:48:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at incore.de Received: from mail.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id xuhuEaDfY1PQ for ; Tue, 18 Oct 2011 08:48:30 +0200 (CEST) Received: from mail.incore (fwintern.dmz [10.0.0.253]) by mail.incore.de (Postfix) with ESMTP id 60BC95C851 for ; Tue, 18 Oct 2011 08:47:52 +0200 (CEST) Received: from pcadmin.incore (pcadmin.incore [192.168.0.140]) by mail.incore (Postfix) with ESMTPSA id 5A53E450A1 for ; Tue, 18 Oct 2011 08:47:52 +0200 (CEST) Message-ID: <4E9D2117.4090203@dssgmbh.de> Date: Tue, 18 Oct 2011 08:47:51 +0200 From: Alfred Bartsch User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:7.0.1) Gecko/20111007 Thunderbird/7.0.1 MIME-Version: 1.0 To: freebsd-geom@freebsd.org References: <4E69A152.6090408@rdtc.ru> <4E69EB15.50808@rdtc.ru> In-Reply-To: <4E69EB15.50808@rdtc.ru> X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: disk partitioning with gmirror + gpt + gjournal (RFC) X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 07:05:01 -0000 I am going to use the following paritioning scheme on our servers and programmers' workstations running FreeBSD 8 (system disk): physical drive - geom_mirror - geom_part_gpt - journaled UFS with separate boot and swap partitions. Partition names and sizes are taken from our environment - Your requirements may vary. Main design goal: minimization of data recovery time after unclean shutdown - using software raid-1. Installation steps of a (bootable) system disk (after cleaning): note: = first disk device, = second disk device, gm0= first gmirror, gm1= second gmirror, etc. label the disk # gmirror label -b load -F gm0 # gpart create -s GPT mirror/gm0 create boot partition # gpart add -t freebsd-boot -s 128 mirror/gm0 # gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 mirror/gm0 note: if installing from CD/DVD, bootcode is in /dist/boot/pmbr create the swap partition # gpart add -t freebsd-swap -s 4200M mirror/gm0 create the journal partitions # gpart add -t freebsd-swap -s 1G mirror/gm0 # gpart add -t freebsd-swap -s 2G mirror/gm0 # gpart add -t freebsd-swap -s 2G mirror/gm0 # gpart add -t freebsd-swap -s 2G mirror/gm0 create the (journaled) data partitions: root partition # gpart add -t freebsd-ufs -s 1G mirror/gm0 # gjournal label mirror/gm0p7 mirror/gm0p3 note: IMHO journal size doesn't need to exceed data size var partition # gpart add -t freebsd-ufs -s 4G mirror/gm0 # gjournal label mirror/gm0p8 mirror/gm0p4 usr partition # gpart add -t freebsd-ufs -s 16G mirror/gm0 # gjournal label mirror/gm0p9 mirror/gm0p5 home partition (covers remaining disk space) # gpart add -t freebsd-ufs mirror/gm0 # gjournal label mirror/gm0p10 mirror/gm0p6 create the UFS file systems (with labels): # newfs -L fbsdroot -J mirror/gm0p7.journal # newfs -L fbsdvar -J mirror/gm0p8.journal # newfs -L fbsdusr -J mirror/gm0p9.journal # newfs -L fbsdhome -J mirror/gm0p10.journal mirroring the disk: gmirror insert gm0 /etc/fstab could then look like # Device Mountpoint FStype Options Dump Pass# /dev/mirror/gm0p2 none swap sw 0 0 /dev/ufs/fbsdroot / ufs rw,noatime,async 1 1 /dev/ufs/fbsdhome /home ufs rw,noatime,async 2 2 /dev/ufs/fbsdusr /usr ufs rw,noatime,async 2 2 /dev/ufs/fbsdvar /var ufs rw,noatime,async 2 2 ===================================================================== Some questions: Is this disk configuration valid and robust? (I've just started testing) Are there any other proposals - usable as "best known practice", I didn't find a complete setup so far? As the journal size primarily depends on writing speed, needed journal sizes will necessarily grow in the future, because each journal partition must be able to hold all possible changes at a given time interval (10 seconds?). So physical journal size has to be adjusted during migration onto faster hardware (SSD). I would then preferably use just one (suitable) journal partition for multiple data partitions. Could this feature be added to gjournal with an appropiate amount of work? Are there any comments on or additions to these topics? -- Alfred Bartsch Data-Service GmbH