This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
zfsraid [2013/06/08 09:07] – Add note about lack of defragmentation peterjeremy | zfsraid [2015/04/24 08:17] (current) – The pool does get defrag'd peterjeremy | ||
---|---|---|---|
Line 6: | Line 6: | ||
by adding 3 new disks '' | by adding 3 new disks '' | ||
a 3ware 9650SE-2LP since I'd run out of motherboard ports). | a 3ware 9650SE-2LP since I'd run out of motherboard ports). | ||
- | |||
- | Note that this procedure will not defragment your pool and you should do a send|recv if possible. | ||
===== Original Configuration ===== | ===== Original Configuration ===== | ||
Line 119: | Line 117: | ||
The overall process is: | The overall process is: | ||
- | - Create a 6-way RAIDZ2 across the 3 new disks (ie each disk provides two vdevs) | + | - Create a 6-way RAIDZ2 across the 3 new disks (ie each disk provides two vdevs). |
- | - Copy the existing pool onto the new disks | + | - Copy the existing pool onto the new disks. |
- | - Switch the system to use the new 6-way pool | + | - Switch the system to use the new 6-way pool. |
- | - Destroy the original pool | + | - Destroy the original pool. |
- | - Replace the second vdev in each disk with one of the original disks | + | - Replace the second vdev in each disk with one of the original disks. |
- Re-partition the new disks to expand the remaining vdev to occupy the now unused space. | - Re-partition the new disks to expand the remaining vdev to occupy the now unused space. | ||
Line 257: | Line 255: | ||
causes additional seeking between vdevs. | causes additional seeking between vdevs. | ||
+ | < | ||
zpool scrub tank2 | zpool scrub tank2 | ||
+ | </ | ||
==== Switch to new pool ==== | ==== Switch to new pool ==== | ||
Line 269: | Line 269: | ||
In order to prevent any updates, the system should be brought down to | In order to prevent any updates, the system should be brought down to | ||
single-user mode: | single-user mode: | ||
+ | < | ||
shutdown now | shutdown now | ||
+ | </ | ||
Once nothing is writing to ZFS, a second snapshot can be taken and | Once nothing is writing to ZFS, a second snapshot can be taken and | ||
Line 275: | Line 277: | ||
altered since the previous 'zfs recv' (this includes atime updates). | altered since the previous 'zfs recv' (this includes atime updates). | ||
+ | < | ||
zfs snapshot -r tank@20101105bu | zfs snapshot -r tank@20101105bu | ||
zfs rollback -R tank2@20101104bu | zfs rollback -R tank2@20101104bu | ||
zfs send -R -I tank@20101104bu tank@20101105bu | zfs recv -vu -d tank2 | zfs send -R -I tank@20101104bu tank@20101105bu | zfs recv -vu -d tank2 | ||
+ | </ | ||
The original pool is now renamed by exporting and importing it under a | The original pool is now renamed by exporting and importing it under a | ||
new name and then exporting it to umount it. | new name and then exporting it to umount it. | ||
+ | < | ||
zpool export tank | zpool export tank | ||
zpool import tank tanko | zpool import tank tanko | ||
zpool export tanko | zpool export tanko | ||
+ | </ | ||
And the new pool is renamed to the wanted name via export/ | And the new pool is renamed to the wanted name via export/ | ||
+ | < | ||
zpool export tank2 | zpool export tank2 | ||
zpool import tank2 tank | zpool import tank2 tank | ||
+ | </ | ||
The system can now be returned to multiuser mode and any required testing | The system can now be returned to multiuser mode and any required testing | ||
performed. | performed. | ||
+ | |||
+ | < | ||
exit | exit | ||
+ | </ | ||
==== Replace vdevs ==== | ==== Replace vdevs ==== | ||
Line 337: | Line 348: | ||
In order to expand the pool, the vdevs on the 3 new disks need to be | In order to expand the pool, the vdevs on the 3 new disks need to be | ||
- | resized. | + | resized. |
requires a (short) outage. | requires a (short) outage. | ||
Line 352: | Line 363: | ||
The system needs to be placed in single-user mode to allow the partitions | The system needs to be placed in single-user mode to allow the partitions | ||
and pool to be manipulated: | and pool to be manipulated: | ||
+ | |||
+ | < | ||
shutdown now | shutdown now | ||
+ | </ | ||
Once in single-user mode, all 3 partition 6's can be deleted and the | Once in single-user mode, all 3 partition 6's can be deleted and the | ||
Line 368: | Line 382: | ||
</ | </ | ||
- | The pool has now expandedto | + | The pool has now expanded to 4TB: |
< | < | ||
zpool list | zpool list | ||
Line 377: | Line 391: | ||
And the system can be restarted: | And the system can be restarted: | ||
+ | < | ||
exit | exit | ||
+ | </ | ||
Remember to add the new disks to (eg) daily_status_smart_devices | Remember to add the new disks to (eg) daily_status_smart_devices | ||