On Wed, 2007-06-27 at 14:50 -0700, Darren Dunham wrote:
> > Darren Dunham wrote:
> > >> The problem I've come across with using mirror or raidz for this setup
> > >> is that (as far as I know) you can't add disks to mirror/raidz groups,
> > >> and if you just add the disk to the pool, you end up in the same
> > >> situation as above (with more space but no redundancy).
> > > 
> > > You can't add to an existing mirror, but you can add new mirrors (or
> > > raidz) items to the pool.  If so, there's no loss of redundancy.
> > 
> > Maybe I'm missing some context, but you can add to an existing mirror
> > - see zpool attach.
> 
> It depends on what you mean by "add".  :-) 
> 
> The original message was about increasing storage allocation.  You can
> add redundancy to an existing mirror with attach, but you cannot
> increase the allocatable storage.
> 

With mirrors, there is currently more flexibility than with raid-Z[2].
You can increase the allocatable storage size by replacing each disk in
the mirror with a larger sized one (assuming you wait for a
re-sync ;-P )

Thus, the _safe_ way to increase a mirrored vdev's size is:

Disk A:  100GB
Disk B:  100GB
Disk C:  250GB
Disk D:  250GB


zpool create tank mirror A B
(yank out A, put in C)
(wait for resync)
(yank out B, put in D)
(wait for resync)

and voila!  tank goes from 100GB to 250GB of space.

I believe this should also work if LUNs are used instead of actual disks
- but I don't believe that resizing a LUN currently in a mirror will
work (please, correct me on this), so, for a SAN-backed ZFS mirror, it
would be:

Assuming A = B < C, and after resizing A, A = C > B

zpool create tank mirror A B
zpool attach tank A C   (where C is a new LUN of the new size desired)
(wait for sync of C)
zpool detach tank A
(unmap LUN A from host, resize A to be the same as C, then map back)
zpool attach C A  
(wait for sync of A)
zpool detach B

I believe that will now result in a mirror of the full size of C, not of
B.

I'd be interested to know if you could do this:

zpool create tank mirror A B
(resize LUN A and B to new size)


without requiring a system reboot after resizing A & B  (that is, the
reboot would be needed to update the new LUN size on the host).


-- 
Erik Trimble
Java System Support
Mailstop:  usca14-102
Phone:  x17195
Santa Clara, CA
Timezone: US/Pacific (GMT-0800)

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to