Freebsd – Advice for inserting additional disks to a ZFS mirrored pool

freebsdstoragezfs

I am running FreeBSD 9.1 with root on a ZFS mirrored pool.

At first the pool (labelled zroot) has a total of 1TB spanning two 1TB drives.

Recently we have run into disk space issues in which the pool is 99% allocted with about 15G free. About 800G is occupied in /home filesystem alone.

To remedy this, we have added 2x 1TB drives.

We would like to keep these drives mirrored. The question now remains, how should we add the additional 2x 1TB drives to the pool?

  1. Should we add them to the existing zroot pool and allocate it. This seems like a bad idea since the original pool was designed to run as the root filesystem.

  2. Should we create a new pool with a mirrored set of drives, and then create a new /home2 and transition high-usage users to that partition?

To us, the extent of ZFS features isn't clear. We are leaning to option (2) since it doesn't add unnecessary dependencies on the root mirror. However, we would appreciate any insight and ideas on what course of action to take.

Thanks.

Best Answer

Should we add them to the existing zroot pool and allocate it. This seems like a bad idea since the original pool was designed to run as the root filesystem.

First, zpools and zfs file systems are separate concepts (you can't actually separate them, but should when thinking about their setup). So pools are not "designed to run as the root filesystem", there is a filesystem on the zpool that is configured to run as the root filesystem.

Being that this zpool holds the root filesystem, it has to either be non-redundant single vdev, or has to be a single mirror. So you can't just add more drives.

Should we create a new pool with a mirrored set of drives, and then create a new /home2 and transition high-usage users to that partition?

It's be much easier to create zfs filesystems for each user, and mount it to their home drive location. This eliminates the janky/non-standard /home2 idea, and allows you to set quotas, reservations, and more on each user's home folder.

When I setup a ZFS server, I either use two/three smaller disks for the boot zpool (I've got 100-320GB disks laying around, so that's what I commonly use), or slice a chunk off the main storage drives (of about the same size, using GPT partitions). The rest of the drive get's one large partition, and that goes into a storage zpool.

Here's my home server setup for example:

  pool: tank0
 state: ONLINE
  scan: scrub repaired 0 in 1h39m with 0 errors on Sat Jun  8 07:59:40 2013
config:

        NAME              STATE     READ WRITE CKSUM
        tank              ONLINE       0     0     0
          mirror-0        ONLINE       0     0     0
            gpt/tank0-d0  ONLINE       0     0     0
            gpt/tank0-d1  ONLINE       0     0     0

errors: No known data errors

  pool: tank1
 state: ONLINE
  scan: scrub repaired 0 in 3h11m with 0 errors on Mon Jun  1 08:57:39 2013
config:

        NAME              STATE     READ WRITE CKSUM
        tank1             ONLINE       0     0     0
          raidz1-0        ONLINE       0     0     0
            gpt/tank1-d0  ONLINE       0     0     0
            gpt/tank1-d1  ONLINE       0     0     0
            gpt/tank1-d2  ONLINE       0     0     0
            gpt/tank1-d3  ONLINE       0     0     0
Related Topic