[OpenIndiana-discuss] fuiture small expansion of raidz1 possible?

Jim Klimov jimklimov at cos.ru
Tue Feb 11 10:13:47 UTC 2014


> Suppose I set up a raidz1 of N disks now, and fill it up, and suddenly I realize I'm going to need more space, but not enough to warrant setting up a new raidz1 of another N or more disks, it's just a minor need, so I need N+1 disks, rather than just N.
> Can this be done w/o losing the data on the original zpool?

AFAIK, currently no - as you know :)
At this time you can replace the older disks with newer bigger
ones one-by-one, and then (auto-)expand the pool to use these
larger slices.

On the up-side, this would restart the time-to-death countdown
for your active main pool storage devices ;)

On 2014-02-11 10:25, jason matthews wrote:
>> And on a similar note: Suppose I have a signgle disk with data, and I decide I can just afford a raidz1 of 4 disks, so I buy 3 more.... can I somehow migrate the data on the original single disk onto a 3 disk raidz1 and then add the original disk to that raidz?
>
> Yes, you could migrate the original data to the 3 disk zpool if the configured size of the 3 disk pool is greater than the utilized size of the single disk.
> You could add to the new pool as a hot spare. Alternately, the pool has to be expanded in terms of vdevs which in this case is 3 drives.
>
> in this scenario, using mirrors makes the most sense.

Yes, especially if you mirror the existing disk and extend the
pool with another mirror (though this would be unbalanced for
IOs of new vs old data - which may matter for your usecase or
may be irrelevant).

Technically, it is possible to fool ZFS into making a pool with a
missing device (i.e. make a raidz1 with 3 disks and a file, then
delete the file and export-import the pool). This would cause the
pool to be degraded, but ready for re-attachment of your original
disk after migration is complete.

I would not gamble with this without backups (I did gamble with
this approach and did not lose a bit, but it is still risky),
and if possible - not forfeiting all redundancy (i.e. make a
degraded raidz2/3 with one or two disks missing instead of a
setup with no hiccup-protection at all).

HTH,
//Jim



More information about the OpenIndiana-discuss mailing list