Date: Mon, 05 Nov 2012 11:46:46 -0600 From: Fox F <fox@cyberfoxfire.com> To: Freddie Cash <fjwcash@gmail.com> Cc: freebsd-fs@freebsd.org Subject: Re: Convert standalone zpool to RAID1 with data in place Message-ID: <5097FB86.9050008@cyberfoxfire.com> In-Reply-To: <CAOjFWZ4duNemmfSez9P7O1ppyBhLs8Bn-2aUX_E6fVq36F7Z0w@mail.gmail.com> References: <50955FB1.2070800@cyberfoxfire.com> <CAOjFWZ4duNemmfSez9P7O1ppyBhLs8Bn-2aUX_E6fVq36F7Z0w@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/3/2012 10:23 PM, Freddie Cash wrote: > > You don't. At least, not in that order. Or, at least not with the > ZFS-native tools. > > You can create a pool with 2 separate single-disk vdevs, and data will > be striped across them. Similar to RAID0, there will be no redundancy > to the pool. > zpool create poolname disk1 disk2 > > Later, you can convert the single-disk vdevs to mirrors, thus turning > the pool into a RAID10: > zpool attach poolname disk1 disk3 > zpool attach poolname disk2 disk4 > > Or, you can create a pool with a single mirror vdev: > zpool create poolname mirror disk1 disk2 > > Later, you can add another mirror vdev to the pool, and data will be > striped across the two vdevs, similar to a RAID10: > zpool add poolname mirror disk3 disk4 > > If you are truly hell bent on doing things in the other order (mirror > on top of two stripesets), then you have to use gstripe(8) to create > the stripesets, and then add those to the pool. The following is from > memory, so it may not be perfectly correct: > gstripe label stripe1 disk1 disk2 > gstripe label stripe2 disk3 disk4 > zpool create poolname mirror stripe/stripe1 stripe/stripe2 > > On Nov 3, 2012 11:17 AM, "Fox F" <fox@cyberfoxfire.com > <mailto:fox@cyberfoxfire.com>> wrote: > > > > Hello, > > > > My intention is to have a zpool with two drives (1TB and 2TB) > striped. I suppose I'd create it as such: > > > > zpool create zp_test disk1 disk2 > > > > I would then create a zfs filesystem on that zpool and add data to it. > > > > Then, I would want to mirror this data on another identical striped > vdev. > > > > The question is, what is the order of operations for creating the > second striped vdev and adding it as a mirror to the first one, and > how do I do that in such a way that the data on disk1/2 gets mirrored > to the new addition? > > > > I hope I am making sense. > > > > -F > > _______________________________________________ > > freebsd-fs@freebsd.org <mailto:freebsd-fs@freebsd.org> mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org > <mailto:freebsd-fs-unsubscribe@freebsd.org>" > I did forget one point to have clarified. Forget the striping. Let's just assume two disks, 1 and 2. I only have disk1 on hand. So I create a zpool/zfs with it. # zpool create mypool disk1 # zfs create mypool/repository Then some data is put on the zfs. Now, I want to convert mypool to a mirror with disk2, while keeping the data on disk1 intact. Is there a way to do that?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5097FB86.9050008>