Thomas Maier-Komor wrote:
Ben schrieb:
Thomas,
Could you post an example of what you mean (ie commands in the order to use 
them)?  I've not played with ZFS that much and I don't want to muck my system 
up (I have data backed up, but am more concerned about getting myself in a mess 
and having to reinstall, thus losing my configurations).

Many thanks for both of your replies,
Ben

I'm not an expert on this, and I haven't tried it, so beware:


1) If the pool you want to expand is not the root pool:

$ zpool export mypool
# now replace one of the disks with a new disk
$ zpool import mypool
# zpool status will show that mypool is in degraded state because of a
missing disk
$ zpool replace mypool replaceddisk
# now the pool will start resilvering

# Once it is done with resilvering:
$ zpool detach mypool <otherdisk>
#  now physically replace <otherdisk>
$ zpool replace mypool <otherdisk>

This will all work well. But I have a couple of suggestions for you as well.

If you are using mirrored vdevs then you can also grow the vdev by making it a 3 or a 4 way mirror. This way you don't lose your resiliency in your vdev whilst you are migrating to larger disks. Now of course you have to be able to take the extra device in your system either via a spare drive bay in a storage enclosure or SAN or iSCSI based LUNS.

When you have a lot of data and the business requires you to minimize any risk as much as possible this is a good idea. The pool was only offline for 14 seconds to gain the extra
space and at all times there were *always* two devices in my mirror vdev.

Here is a cut and paste from this process from just the other day with a live production server where the maintenance window was only 5 minutes. This pool was increased from 300 to 500 GB on LUNS
from two disparate datacentres.

2009-06-17.13:57:05 zpool attach blackboard c4t600C0FF0000000000924686710D4CF02d0 c4t600C0FF0000000000082CA2312B99E05d0

2009-06-17.18:12:14 zpool detach blackboard c4t600C0FF0000000000080797CC7A87F02d0

2009-06-17.18:12:57 zpool attach blackboard c4t600C0FF0000000000924686710D4CF02d0 c4t600C0FF0000000000086136F22B65F05d0

2009-06-17.20:02:00 zpool detach blackboard c4t600C0FF0000000000924686710D4CF02d0

2009-06-18.05:58:52 zpool export blackboard

2009-06-18.05:59:06 zpool import blackboard

For home users this is probably overkill, but I thought I would mention it for more enterprise type
people that are maybe familiar with disksuiite and not ZFS as much.

2) if you are working on the root pool, just skip export/import part and
boot with only one half of the mirror. Don't forget to run installgrub
after replacing a disk.

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

--
_______________________________________________________________________


Scott Lawson
Systems Architect
Manukau Institute of Technology
Information Communication Technology Services Private Bag 94006 Manukau
City Auckland New Zealand

Phone  : +64 09 968 7611
Fax    : +64 09 968 7641
Mobile : +64 27 568 7611

mailto:sc...@manukau.ac.nz

http://www.manukau.ac.nz

________________________________________________________________________


perl -e 'print
$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'

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

Reply via email to