From owner-freebsd-questions@FreeBSD.ORG Tue Sep 9 13:34:04 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73BD866C for ; Tue, 9 Sep 2014 13:34:04 +0000 (UTC) Received: from mail-qg0-f47.google.com (mail-qg0-f47.google.com [209.85.192.47]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E42DBC3 for ; Tue, 9 Sep 2014 13:34:03 +0000 (UTC) Received: by mail-qg0-f47.google.com with SMTP id i50so2918316qgf.34 for ; Tue, 09 Sep 2014 06:33:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=y8CYv8xyDVCpC8325S5/myeH1kuCxeHGRO1jmyz4RIo=; b=dLgQSXxMStAtBgEy9uK5N0Ui41SSIpRQpiMk+b2VH6xEjsMN/0Hyf0zgrZYkDqd3EE N9SCsGwmERollWvOKpfJRqgBQxF00nyHRlvsELQkDFHPtWDLVv1Vo9yHEday3B5PXLZs O/6VNmddoUSjs0smnasVZZItYrLCCgMrKDFDmwsaXLgTz3tjIbIwIZSFQmCVOl+u9FWL 7YQUa9YP+Y+dcPhi3WgRzr/JWBrTTB9Yn5W37RK5YbvHBAmcXpkEnYVpbDrH50tfN4nB OKg9OQqDmCdpclkPxyZEOxiME8iQhKtqI5gG8AyiyNTRWP9KWCAJ+WlZvlvMxlmv3IOQ 5u+Q== X-Gm-Message-State: ALoCoQkAhFDVpWYXip/5fpcPc4rhLV3AL/CrWiJ2exPOaQ69noIByB35s+SGCsG8v21uuAhapuk8 X-Received: by 10.224.88.3 with SMTP id y3mr51248144qal.65.1410269636963; Tue, 09 Sep 2014 06:33:56 -0700 (PDT) Received: from MBP-1.local ([96.236.21.80]) by mx.google.com with ESMTPSA id w8sm10331488qag.2.2014.09.09.06.33.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Sep 2014 06:33:56 -0700 (PDT) From: Paul Kraus X-Google-Original-From: Paul Kraus Message-ID: <540F01C4.1080209@brandywine.kraus-haus.org> Date: Tue, 09 Sep 2014 09:33:56 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: "James D. Parra" , freebsd-questions@freebsd.org Subject: Re: creating a raid1 with single system drive References: <405098918.20787549.1410240011151.JavaMail.root@musicreports.com> In-Reply-To: <405098918.20787549.1410240011151.JavaMail.root@musicreports.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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, 09 Sep 2014 13:34:04 -0000 On 9/9/14 1:20, James D. Parra wrote: > # zpool status > pool: tank0 > state: ONLINE > scan: none requested > config: > > NAME STATE READ WRITE CKSUM > tank0 ONLINE 0 0 0 > ada0s1d ONLINE 0 0 0 Looks like a typical single drive zpool built on a partitioned drive. > > I wish to add an identical disk to create a raid1 array. A list of the drives shows; > > ll /dev/ad* > > crw-r----- 1 root operator 0, 108 Sep 8 19:21 /dev/ada0 > crw-r----- 1 root operator 0, 110 Sep 8 19:21 /dev/ada0s1 > crw-r----- 1 root operator 0, 115 Sep 8 19:21 /dev/ada0s1a > crw-r----- 1 root operator 0, 117 Sep 8 19:21 /dev/ada0s1b > crw-r----- 1 root operator 0, 119 Sep 8 19:21 /dev/ada0s1d > crw-r----- 1 root operator 0, 112 Sep 8 19:21 /dev/ada1 > crw-r----- 1 root operator 0, 121 Sep 8 19:21 /dev/ada1s1 > crw-r----- 1 root operator 0, 126 Sep 8 19:21 /dev/ada1s1a > crw-r----- 1 root operator 0, 128 Sep 8 19:21 /dev/ada1s1b > crw-r----- 1 root operator 0, 130 Sep 8 19:21 /dev/ada1s1d > crw-r----- 1 root operator 0, 132 Sep 8 19:21 /dev/ada1s1e > > I installed the OS on the second disk as well so the partitions would be the same. However, something doesn't appear correct. No need for that, but from the following it looks like you installed the OS two different ways... Or are you running two different OSes ? > NAME STATE READ WRITE CKSUM > tank0 ONLINE 0 0 0 > mirror-0 ONLINE 0 0 0 > ada0s1d ONLINE 0 0 0 > ada1s1e ONLINE 0 0 0 (resilvering) > # gpart show > => 63 1953525105 ada0 MBR (931G) > 63 1953 - free - (976k) > 2016 1953523152 1 freebsd (931G) > > => 0 1953523152 ada0s1 BSD (931G) > 0 2097152 1 freebsd-ufs (1.0G) > 2097152 809500672 2 freebsd-swap (386G) > 811597824 1141925328 4 freebsd-zfs (544G) What is the 1.0 GB UFS partition for ? > => 63 1953525105 ada1 MBR (931G) > 63 1953 - free - (976k) > 2016 1953523152 1 freebsd (931G) > > => 0 1953523152 ada1s1 BSD (931G) > 0 4096000 1 freebsd-ufs (2G) > 4096000 4096000 2 freebsd-swap (2G) > 8192000 4194304 4 freebsd-ufs (2.0G) > 12386304 1941136848 5 freebsd-ufs (925G) And this does not match the above, so when you installed the OS, you must have given it different options. > Although, the disks are identical, the installation partitioned them differently. Yes, it did. > What is the best way to create a zfs raid1 for the system drive by adding the second drive after the install? What I have always done is install the OS to the first drive, then manually partition the second drive to match the first and then add the matching partition to the zpool. Remember to install the boot loader on the second drive after establishing the mirror (see gpart bootcode) so that you can boot from it if the first drive fails. I also keep a bootable USB drive near the server for booting when something goes horribly wrong :-)