6

I am building a ZFS data server using FreeNAS. I have enough hard disk space (4x2TB) for a few years, but if down the road I want to expand this out can i build another 4xHD pool? Would i need separate datasets for this second volume or can i just expand the existing ones?

Dave
  • 183
  • 1
  • 2
  • 5

2 Answers2

7

You have various options. I'm assuming here that you have the 4 disks arranged as a raidz1 (like raid5) layout. Not ideal, but I won't go into discussions about the best disk layout.

  1. You can go and buy big 4/5/8/XTB disks in a few years and just replace the disks one by one. When they have all been replaced the size of the pool should increase.
  2. You can add a second group of 4 disks to the original pool. (Adding a new vdev in ZFS terms). The new vdev should ideally be the same type as the first, so if you first 4 disks are set as raidz1, the next four should be as well.
  3. You can make a new, independent pool out of the new disks.
USD Matt
  • 5,321
  • 14
  • 23
  • but the new vdev, will the datasets overlap between them? Or do separate vdevs have separate datasets? – Dave Sep 06 '13 at 22:11
  • @Dave you can go either way. File system data is contained within a zpool, which is comprised of vdevs (a raidz set is a type of vdev). A system can have multiple zpools, zpools can have multiple vdevs. So it's a whole lot of "how you want to configure it depends on what you want out of it now and later". I tend to keep zpools to a single vdev, so separate zpools for each set of disks, as it's easy to expand things, but you can't shrink (at least not easily). – Chris S Sep 07 '13 at 01:24
  • 1
    A new vdev will just expand the available space to the pool. Datasets are not constrained to one vdev, their data is stored wherever ZFS can find in the pool to put it. This is the main concept of 'pooled' storage. The zpool merges X number of disks into a pool, which just becomes one big storage area for ZFS file systems to put data records. – USD Matt Sep 07 '13 at 12:52
2

Yes. You can swap out the disks in a RAIDZ. You can't change the number of disks. You can also add another RAIDZ to a pool, but you can't remove a RAIDZ from a pool. You might want to take a look at the ZFS Administration Guide before deploying it.

Chris S
  • 77,337
  • 11
  • 120
  • 212