From owner-freebsd-questions@FreeBSD.ORG Mon Nov 21 04:26:38 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C56711065670 for ; Mon, 21 Nov 2011 04:26:38 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7F3D48FC17 for ; Mon, 21 Nov 2011 04:26:38 +0000 (UTC) Received: by vcbfl10 with SMTP id fl10so1859867vcb.13 for ; Sun, 20 Nov 2011 20:26:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=y5WfpM2fN4bHWw9kaUqIof/+SygCTy9fkVe6PU5lSCA=; b=pX5vWId2ypczVHVoEL2FGKrj8b2DlSTO4Lov1SbfNP5B5m5KKX9KqyGLSxd2X6rN53 SICu5BpA8+2ELSUldulG24PhFfV1HClvjLYZcybK8jOk6xydMGGil0Rsy+DPEmpq/FTq LoJidhuOd04eFMkmEnokUi3GDHye9/OTz53pU= MIME-Version: 1.0 Received: by 10.224.185.199 with SMTP id cp7mr4819879qab.68.1321849597565; Sun, 20 Nov 2011 20:26:37 -0800 (PST) Received: by 10.229.6.132 with HTTP; Sun, 20 Nov 2011 20:26:37 -0800 (PST) In-Reply-To: References: Date: Sun, 20 Nov 2011 23:26:37 -0500 Message-ID: From: Mehmet Erol Sanliturk To: APseudoUtopia Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: Setting up ZFS - Filesystem Properties and Installing on Root X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2011 04:26:38 -0000 On Sun, Nov 20, 2011 at 10:34 PM, APseudoUtopia wrote: > Hello, > > I'll be setting up a server with ZFS on 9.0-RELEASE (when it's > released...). I've never used ZFS before, and although I've been > reading quite a bit about it, I have some questions. > > My plan is to use RAID-Z1 across 4 disks. I'll be using GPT, and I > would like the root to be ZFS as well. I found a guide: > http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/RAIDZ1 > > In step #4, it has you create boot, swap, and zfs partitions on all 3 > (which would be 4 in my case) disks. Then, in step #5, you install the > bootloader into all 3 (4) drives. Why do you need boot and swap > partitions on EACH disk? It seems to me that you would only need disk > 1 to have boot, swap, and zfs, and the other 3 disks only have one > partition (using the entire drive) for zfs's pool. Does it have to do > with the RAIDZ1 setup? Even then, I don't understand it because it's > not disk mirroring, it's RAID. The BIOS is set to look on one specific > disk for the loader, not all of them. It seems I'm not understanding > something entirely here. > http://en.wikipedia.org/wiki/RAID http://en.wikipedia.org/wiki/Category:RAID If disk 1 fails , the computer ( BIOS ) will look disk 2 . If disk 2 fails , the computer ( BIOS ) will look disk 3 . If disk ( n - 1 ) fails , the computer ( BIOS ) will look disk ( n ) . > > Also, with ZFS, you can have an unlimited number of filesystems, > correct? I've been trying to figure out the best way to create these > filesystems with the appropriate flags (specifically: atime, > compression, devices, exec, quota, readonly, and setuid). If, for > example, I set devices=off and suid=off on the tank/var filesystem, it > is applied to the children filesystem, such as, /var/log, /var/db, and > so on? The flags/properties can be changed on-the-fly, correct? If, > for example, I set a filesystem noexec, but later realize I need exec, > I can change it without issue? > > Does anyone with zfs experience have any tips on creating a filesystem > layout, in terms of which filesystems to create and what > flags/properties? Would it be bad to set noatime, nosuid, nodev, and > noexec all on the tank, then allow each property appropriately for > each directory as necessary? As in, set the whole tank noexec, but > allow exec for /bin, /usr/home, /usr/local/bin, etc.? > > Thank you all very much! > _______________________________________________ > Thank you very much . Mehmet Erol Sanliturk