From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-dev+bounces-49947-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1S1QPB-0004mn-0V
	for garchives@archives.gentoo.org; Sat, 25 Feb 2012 22:47:53 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 96EC1E0C32;
	Sat, 25 Feb 2012 22:47:39 +0000 (UTC)
Received: from edge1.cs.stonybrook.edu (edge1.cs.stonybrook.edu [130.245.9.210])
	by pigeon.gentoo.org (Postfix) with ESMTP id F2832E092D
	for <gentoo-dev@lists.gentoo.org>; Sat, 25 Feb 2012 22:47:07 +0000 (UTC)
Received: from HUBCAS1.cs.stonybrook.edu (130.245.9.206) by
 edge1.cs.stonybrook.edu (130.245.9.210) with Microsoft SMTP Server (TLS) id
 14.1.355.2; Sat, 25 Feb 2012 17:47:03 -0500
Received: from mail-iy0-f181.google.com (209.85.210.181) by
 hubcas1.cs.stonybrook.edu (130.245.9.212) with Microsoft SMTP Server (TLS) id
 14.1.323.3; Sat, 25 Feb 2012 17:47:07 -0500
Received: by iaoo28 with SMTP id o28so1017772iao.40        for
 <gentoo-dev@lists.gentoo.org>; Sat, 25 Feb 2012 14:47:06 -0800 (PST)
Received-SPF: pass (google.com: domain of ryao@cs.stonybrook.edu designates 10.43.49.201 as permitted sender) client-ip=10.43.49.201;
Authentication-Results: mr.google.com; spf=pass (google.com: domain of ryao@cs.stonybrook.edu designates 10.43.49.201 as permitted sender) smtp.mail=ryao@cs.stonybrook.edu
Received: from mr.google.com ([10.43.49.201])        by 10.43.49.201 with SMTP
 id vb9mr8450863icb.35.1330210026643 (num_hops = 1);        Sat, 25 Feb 2012
 14:47:06 -0800 (PST)
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.43.49.201 with SMTP id vb9mr6773075icb.35.1330210026628; Sat,
 25 Feb 2012 14:47:06 -0800 (PST)
Received: by 10.231.29.38 with HTTP; Sat, 25 Feb 2012 14:47:06 -0800 (PST)
In-Reply-To: <989c96a90b7342069ebc9ac29fb53c22@HUBCAS2.cs.stonybrook.edu>
References: <4F47CF5C.4070508@gentoo.org>
	<20120224154327.61c051ad@gentoo.org>
	<3a6095b4d48c4163bb912d6fd608059f@HUBCAS2.cs.stonybrook.edu>
	<CABDyM6Tm5rCE1PNLh4t4NCgJUvVU-Brvsg9xak-LWEUkeBtL9A@mail.gmail.com>
	<CAFWqQMTZ1=KYtRNYBgg6jg1V_+m+fNpSSerUi+XRiRNVz5P6Zg@mail.gmail.com>
	<a3057f9fcd394ed1bb10ab9acd2d72a3@HUBCAS2.cs.stonybrook.edu>
	<CABDyM6T2qsYzOQycyooQM1nJArDaRpF9GdeyrY1o+fvVCPVtqQ@mail.gmail.com>
	<3e5f8f3a918f417e977c7a6f535ea738@HUBCAS2.cs.stonybrook.edu>
	<CABDyM6Qm1W71N2Qc8oChE+bwyZe07O6ZZB801FxhDkY66p45ng@mail.gmail.com>
	<989c96a90b7342069ebc9ac29fb53c22@HUBCAS2.cs.stonybrook.edu>
Date: Sat, 25 Feb 2012 17:47:06 -0500
Message-ID: <CABDyM6Qw0AZa-EitVW8PPFDksGEnB+VTHGSWf_jSyTbWuF8WKw@mail.gmail.com>
Subject: Re: [gentoo-dev] preserve_old_lib and I'm even more lazy
From: Richard Yao <ryao@cs.stonybrook.edu>
To: "gentoo-dev@lists.gentoo.org" <gentoo-dev@lists.gentoo.org>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
X-Originating-IP: [209.85.210.181]
X-Archives-Salt: 5e4e0cbc-bd6a-4493-9c96-26c663b6f1fe
X-Archives-Hash: 98586bf9281aa7a9d4342d2bbc70e502

> That isn't my understanding as far as raidz reshaping goes. =A0You can
> create raidz's and add them to a zpool. =A0You can add individual
> drives/partitions to zpools. =A0You can remove any of these from a zpool
> at any time and have it move data into other storage areas. =A0However,
> you can't reshape a raidz.

ZFS is organized into pools, which are transactional object stores.
Various things can go into these transactional object stores, such as
ZFS data sets and zvols. A ZFS data set is what you would consider to
be a filesystem. A zvol is a block device on which other filesystems
can be installed. Data in pools are stored in vdevs, which can be
files masquerading as block devices, single disks, mirrored disks or a
raidz level.

ZFS is designed to put data integrity first. I question how many other
volume managers are capable of recovering from a crash during a
reshape without some sort of catastrophic data loss. WIth that said, I
do not see what your point is to talk about this. There are things you
can use your extra disk to do, but as far as storage requirements go,
a single disk does not go very far. You are better off replacing
hardware if your storage requirements grow beyond the ability of your
current disks to handle.

> Suppose I have a system with 5x1TB hard drives. =A0They're merged into a
> single raidz with single-parity, so I have 4TB of space. =A0I want to
> add one 1TB drive to the array and have 5TB of single-parity storage.
> As far as I'm aware you can't do that with raidz. =A0What you could do
> is set up some other 4TB storage area (raidz or otherwise), remove the
> original raidz, recycle those drives into the new raidz, and then move
> the data back onto it. =A0However, doing this requires 4TB of storage
> space. =A0With mdadm you could do this online without the need for
> additional space as a holding area.

If you have proper backups, you should be able to destroy the pool,
make a new one and restore the backup. If you do not have backups,
then I think there are more important things to consider than your
ability to do this without them.

> ZFS is obviously a capable filesystem, but unless Oracle re-licenses
> it we'll never see it take off on Linux. =A0For good or bad everybody
> seems to like the monolithic kernel. =A0Btrfs obviously has a ways to go
> before it is a viable replacement, but I doubt Oracle would be sinking
> so much money into it if they intended to ever re-license ZFS.

I heard a statement in IRC that Oracle owns all of the next generation
filesystems, which enables them to position btrfs for the low-end and
use ZFS at the high-end. I have no way of substantiating this, but I
can say that this does appear to be the case.

With that said, ebuilds are in the portage tree and support has been
integrated into genkernel. I have a physical system booting off ZFS
(no ext4 et al) and genkernel makes kernel upgrades incredibly easy,
even when configuring my own kernel through --menuconfig. Gentoo users
in IRC are quite interested in this and they do not seem to care that
the modules are out-of-tree or that the licensing is different. As far
as I can tell, there is no need for them to care.

You might want to look at Gentoo/FreeBSD, which also supports ZFS with
a monolithic kernel design, but has no licensing issues. There is
nothing forcing any of us to use Linux and if the licensing is a
problem for you, then perhaps it would be a good idea to switch.

Also, to avoid any confusion, a proper bootloader for ZFS does not
exist in portage at this time. I hacked the boot process to enable the
system to boot off ZFS using GRUB and it will require some more work
before this is ready for inclusion into portage. I made an
announcement to the ZFSOnLinux mailing list not that long ago
explaining what I did. I was waiting until ZFS support in Gentoo
reached a few milestones before I made an announcement about it here,
although most of the stuff you need is already in-tree:

http://groups.google.com/a/zfsonlinux.org/group/zfs-discuss/browse_thread/t=
hread/d94f597f8f4e3c88