From owner-freebsd-questions@FreeBSD.ORG Tue Mar 24 07:49:47 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD3DEEC7 for ; Tue, 24 Mar 2015 07:49:47 +0000 (UTC) Received: from mail-yh0-x22e.google.com (mail-yh0-x22e.google.com [IPv6:2607:f8b0:4002:c01::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 64779BDD for ; Tue, 24 Mar 2015 07:49:47 +0000 (UTC) Received: by yhch68 with SMTP id h68so80368957yhc.1 for ; Tue, 24 Mar 2015 00:49:46 -0700 (PDT) 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=xWLLDrtvWvoFFn+QezwfOYXjT6jkebN88vQwAzoR348=; b=GmC22esYH7FcFXVzxnB+uOOj0cgx6qLq884mViDRhE4P8Fp7W5feutURyX2/6CvHDq oDOruy1vSIUat94y2ED78ez2J+Z1G2zVKUIXZl2pnTLCNkJzJRh4X3vh0MHiGDMCe44e WTffOPc1Jx6QBzd121Nel/ML8jgXm4tuUiKRyT1Pb6oK0JkcMliOj2VdxwEn1Ibb4rVg M/3nZxzEsugpRqP0j9P0ax1j6TCFwEewD+XwO6z5p1kPpQwaOd/dK1SnjDn7Qtr73VkZ FPxAkIoRLDjPwuePHXQaudsgHhYq9KLUQBAWXGpz9IyVs99I7aSdt2ZGdMgi9u+mwLVU Mhlg== MIME-Version: 1.0 X-Received: by 10.170.117.86 with SMTP id j83mr3796777ykb.8.1427183386395; Tue, 24 Mar 2015 00:49:46 -0700 (PDT) Received: by 10.170.60.69 with HTTP; Tue, 24 Mar 2015 00:49:46 -0700 (PDT) In-Reply-To: References: Date: Tue, 24 Mar 2015 00:49:46 -0700 Message-ID: Subject: Re: Possible (or smart) to put freebsd-boot on USB stick for root-on-ZFS? From: Mehmet Erol Sanliturk To: Jason Birch Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 07:49:47 -0000 On Mon, Mar 23, 2015 at 10:09 PM, Jason Birch wrote: > Hey there, > > I'm looking at a relatively old resource > (https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE) about how > to run root on ZFS for 9.0, and I noticed the section on installing > the boot section to all drives that make up the root. In my setup, > I'll only be mirroring two SSDs on 10.1, but it made me consider the > possibility of having the freebsd-boot partition on a USB stick rather > than on each drive itself for basically the following reason: > > Should an SSD die, I'd need to say "boot from this other device" to > get my system back up and running, do the original partitioning magic > on the replacement device, get that back into the vdev... Should the > USB stick die, I'd need to simply replace it with one that had the > same image (that is, only the boot partition), and `zpool replace` a > blank device (I won't have a swap partition). > > However, I can think of some downsides as well - namely that the USB > stick is probably more likely to die than the SSDs, and that the image > on the USB stick will change over time (This gets mounted as /boot? or > am I mistaken here... This would plague the freebsd-boot on the SSDs > as well, with drift...) > > Am I misinterpreting the point of freebsd-boot? Does /boot actually > end up living on the ZFS mount, and freebsd-boot just contains enough > information to read the kernel and other goodies required to bring up > a full system from a ZFS dataset? Is my thought to use a USB stick for > this partition a little thick or actually worth trying out? > > JB > _______________________________________________ > > Not a direct answer to your question , but only an example : I was using a FULL installation previously : Everything on the SAME HDD . When it was becoming necessary to install a new operating system , I was using another HDD and after installation on it the new OS , I was copying my files ( in my home directory in previous HDD ) into new installed HDD . This was taking approximately twelve hours . I one instance , my OS has been corrupted by a malicious inject ( this is my suspect because I could not find a true reason for what was the attack through "Bash" ) . Now , I am using the following set up : I am using TWO HDDs : One is ONLY OS , and other is for my data files ( all of them downloaded from Internet as open source project files ) mounted after installation of OS . When I want to upgrade to a new OS , I am using a NEW HDD ( I am NOT installing onto existing HDD ) by disconnecting power of existing OS and data HDDs . After installing the new OS and verifying that it is working correctly , I am powering the data HDD and using an fstab entry to mount it . I am keeping the old OS HDD for a NEW install . My suggestion : Use a USB stick or HDD ( revolving platter or SSD ) for ONLY OS and OTHER HDDs for your data files . OS my be on any convenient medium : revolving HDD , SSD , USB stick , it is not important . It may be in any form , it is not important . Important point is for your convenience : You may select any form . You may generate any number of copies of it as a spare for possible failures of used OS device : In case of failure , the only thing is to do is to shut down the computer , attach a spare OS medium and boot the computer . I am not using RAID , but "rsync" : one with -"-delete" as a replication of current data disk , another without "--delete" for fear of accidental deletions . I wish that my example may be useful for you . Thank you very much . Mehmet Erol Sanliturk