Lion (non mountain variety) and ZFS setup

34 views
Skip to first unread message

Bill Cardiff

unread,
Dec 26, 2012, 9:26:38 PM12/26/12
to zfs-...@googlegroups.com
Hello.  I've been following and I have gotten as far as installing ZFS, but I am having problems setting up and I have some questions for what I would like to do.
Please note: this is a system RUNNING Lion, not necessarily built by Apple ;).

What I have is 3 X 500Gb drives that I would like to setup as a raid 5 equivalent, er raidz - I read up on this, but messed up on my first attempt and created a raid partition out of disk1s1, disk2s1 and disk3s1, which result in something around 400Mb due to not picking the proper partition.  I tried to setup using disk(x)s2 but it kept saying that the partition on disk1 was busy... 

I will try again tonight. But tips are welcome.

I also have a Windows Home Server v1 which is currently running with it's 1Tb system drive and 2X 2Tb drives.  Also due to boxing day sales I now have one single 3Tb drive (YAY ME).  What I would like to do is create a raidz pool called say PUDDLE with the three 500Gb drives and then add the 3Tb drive to this pool, then I want to start emptying my WHS box so that I can add a 2Tb from it into the pool and remove the 500's (one at a time as I want to maintain a RAID5 system) then finish up with all data pulled from the WHS system entirely, leaving a pool of two 2Tb and one 3Tb drives, and then possibly a second RAID5 pool called er, RAINDROP, with the 3X 500Gb drives.  This would I think give me two pools, one at say 4Tb and one at 1Tb. 

So my questions are:
1) Is this even possible and or doable?

2) Could someone please walk me through the commands.  I changed the root password so that I could stop issuing SUDO commands, 

3) Why did I get that error last night saying the partition was busy? Should I unmount all three drives involved, possibly even unplug them and start right from scratch again?

4) If I create the original pool of 3 X 500Gb drives can I then add a 3Tb drive to that pool to create a larger pile and how much larger would that pile be?  I mean, will it pick the lowest common denominator to use (weakest link sort of thing) so that I actually end up with just a 1.5Tb pool with the 4 drives. 

Fastmail Jason

unread,
Dec 27, 2012, 8:09:53 AM12/27/12
to zfs-...@googlegroups.com
Well I have a few minutes to help with some of the issues..

For the current pool, destroy it, with the -f command if necessary. If you need sudo for everything you did something wrong at creation, check the wiki instructions again.

If you make a raidz you cannot add more drives later, you can upgrade the drives present, an once all are replaced new capacity will be available. You could do something like the 3 drive raidz move data over, then mirror a larger drive to the raidz, then break the large mirrored drive off, destroy the raidz, add more drives and rebuild the raidz now with larger capacity and mirror to the single large drive you broke off earlier. Once re-silvering is complete break off the large mirrored drive again. If you want to try this, do it with test files as drives, until you know the process and hat it will work as expected with all the correct commands. I believe that his has come up in the past on this list. Why does it appear complicated? Well because it has the greatest chance of success without data loss. Someone else can jump in with their experience. 

Note if you have various drive sizes in a pool, the smaller size is used for all initially. Long standing ZFS rule. Swap the smallest for a larger one and new space magically appears, and so on.

The wiki has everything you need, Dan has done a stunning job getting it current and detailed and the best part is that many people have successfully gotten their first ZFS pool and file system up following those instructions.


--
Jason Belec
Sent from my iPad
--
 
 
 

Simon Casady

unread,
Dec 27, 2012, 11:02:26 AM12/27/12
to zfs-...@googlegroups.com
Hi,
I think there is some confusion about pools and vdevs. There is no
such thing as a raidz pool. A poll is always striped with no
redundancy. A pool may contain a raidz vdev and/or mirror vdevs and
then it would have redundancy. It may also contain simple hard drives
and then again no redundancy. Also you cannot shrink a pool or even
remove devices you can only replace them with the same or larger size.
It is possible to move things around by forming and breaking mirrors
within a pool but the basic rules still apply. ZFS does not allow as
far as I know complex vdevs that is a vdev consisting of vdevs. You
can'r mirror a large drive with a raidz of smaller ones. Also there is
rarely a need for more than one pool
> --
>
>
>

Daniel Becker

unread,
Dec 27, 2012, 11:42:03 AM12/27/12
to zfs-...@googlegroups.com
On Dec 27, 2012, at 7:09 AM, Fastmail Jason <jason...@belecmartin.com> wrote:

> Note if you have various drive sizes in a pool, the smaller size is used for all initially. Long standing ZFS rule. Swap the smallest for a larger one and new space magically appears, and so on.

This is true for an individual VDEV, but you can absolutely have drives of different sizes in a pool (in separate VDEVs) and use all of their capacity.

Daniel Becker

unread,
Dec 27, 2012, 11:43:24 AM12/27/12
to zfs-...@googlegroups.com
On Dec 27, 2012, at 10:02 AM, Simon Casady <capc...@gmail.com> wrote:

> Also you cannot shrink a pool or even
> remove devices you can only replace them with the same or larger size.

- You cannot remove VDEVs (ignoring spares or cache and -- in more recent versions of ZFS -- log devices) from a pool.
- You can detach drives from a mirror VDEV.
- You can replace devices in a mirror or RAIDZ VDEV with same size or larger devices (which will trigger a resilver).

jasonbelec

unread,
Jan 4, 2013, 7:04:14 PM1/4/13
to zfs-...@googlegroups.com
Hey Bill, ran across this cleaning out stuff over the holidays as I do annually. This approach works well expanding pool sizes.

http://breden.org.uk/2008/09/01/home-fileserver-raidz-expansion/

Reply all
Reply to author
Forward
0 new messages