ebb43c6533c0173b262173880e18acabca8c6351
compute/zfs.md
| ... | ... | @@ -6,22 +6,23 @@ |
| 6 | 6 | ``` |
| 7 | 7 | zpool create newpool raidz3 sdX sdY sdZ .... |
| 8 | 8 | ``` |
| 9 | + |
|
| 9 | 10 | ### Send the data |
| 10 | 11 | ``` |
| 11 | 12 | zfs snapshot livepool@1 |
| 12 | 13 | zfs send -R livepool@1 | zfs receive -F newpool |
| 13 | 14 | ``` |
| 15 | + |
|
| 14 | 16 | ### Re-sync data that's changed since the initial snapshot |
| 15 | 17 | ``` |
| 16 | 18 | zfs snapshot livepool@2 |
| 17 | 19 | zfs send -IR livepool@1 livepool@2 | zfs receive -F newpool |
| 18 | 20 | ``` |
| 19 | -Repeat this step if it took longer than you want - increment the @ snapshot numbers each time |
|
| 21 | +Repeat this step if it took longer than you want - increment the @ snapshot numbers each time. |
|
| 22 | + |
|
| 20 | 23 | ### Flip the pools |
| 21 | -Shut down the apps. Check `lsof` and/or `fuser` to make sure nothing's using the FS. |
|
| 24 | +Shut down the apps. Check `lsof` and/or `fuser` to make sure nothing's using the FS. 'X' here is |
|
| 22 | 25 | ``` |
| 23 | -zfs snapshot livepool@X |
|
| 24 | -zfs send -IR livepool@X-1 livepool@X | zfs receive -F newpool |
|
| 25 | 26 | zpool export livepool |
| 26 | 27 | zpool import livepool livepool.old |
| 27 | 28 | zpool export livepool.old |