4

I'm just wondering whether its wise to add 4x500Gb and 2x750 into the same ZFS pool? Or should we only add the same size hdd's to the pool?

Any documentation would be really handy or guidelines on what to do when we have a lot of disks that are paired.

Leah Calum
  • 211
  • 2
  • 8

2 Answers2

2

With ZFS you'll create vdevs from the disks and then build the pool from those vdevs (all of this happens behind your back when you execute the single command zpool create). There are various vdev types:

  • single disks/partitions
  • mirrors (think RAID1)
  • raidz1 (think RAID5; single disk parity)
  • raidz2 (think RAID6; double disk parity)
  • soon raidz3 (triple parity)
  • files (mostly for testing purposes)

ZFS then stripes over all the vdevs in the pool. A pool can be extended easily. But you can't add disks to an existing raidz{1,2,3}-vdev with the current ZFS version. However, you can always add a new vdev to an existing pool.

You'll have the most options with same-size disks but mixing is possible. In your case e.g. a "three mirrors vdev" pool with

zpool create mypool mirror 500GB1 500GB2 mirror 500GB3 500GB4 mirror 750GB1 750GB2

would be fine. But also consider adding spare disks to the pool!

knweiss
  • 4,015
  • 24
  • 20
1

Technically there's nothing wrong with putting different sized disks in to one storage pool. Your performance will be limited by the slowest disks in the pool, which you may or may not care about, depending on your application.

Keep in mind that currently it's not possible (okay, it's possible, but definitely not easy or safe) to remove or resize disks in a storage pool, so you may want to plan ahead if you think you may need a different layout in the future.

Kamil Kisiel
  • 12,184
  • 7
  • 48
  • 69
  • Oh? I was hoping to add more disks as they become available to my zpool as time goes on like LVM. I'm currently configured as a raidz (not raidz2). – Leah Calum Oct 17 '09 at 04:15
  • I didn't say you couldn't add more disks. Just not remove or resize. – Kamil Kisiel Oct 17 '09 at 04:41
  • You can't remove drives? That can't be right, surely the can be replaced or how does ZFS handle failures? – Zoredache Oct 17 '09 at 05:41
  • @Kamil Sorry I thought by resizing you meant you can't add either :( I was hoping for an LVM style disk management - so you can add as time goes by and just grow. But maybe not. – Leah Calum Oct 17 '09 at 06:43
  • 1
    @Zoredache You can't permanently remove a disk and have ZFS shrink the pool. You can of course switch out failed disks. – Amok Oct 17 '09 at 06:52
  • @Leah Yes, you can add as time goes on. You just can't shrink :) And there are ways to replace disks with larger ones, they're just kind of a hack and involve a temporary loss of redundancy, so are not advised. @Zoredache Yes, I meant what Amuck said. You can of course swap drives in for failed ones, providing they are at least the same size. – Kamil Kisiel Oct 17 '09 at 16:36