Recent Changes - Search:

PoolTransfer

Random notes

 * Use 'screen'
 * Use 'usbconfig' to determine disk speeds
 * Use 'diskinfo -t' to determine sector size
 * Do some quick timing tests on the new pool

Create USB pool

zpool create -o ashift=12 -f usb ada? ada? ada? ada? ada? ada?

Remove existing snapshots:

zfs destroy storage@2014-01-05_19.48.04--1m
zfs destroy storage@2014-01-12_08.40.47--1m
zfs destroy storage@2014-01-19_06.00.00--1m
zfs destroy storage/tbla@2014-01-12_08.40.47--1m
zfs destroy storage/tbla@2014-01-19_06.00.00--1m
zfs destroy storage/tbla/backup@2014-01-05_19.48.04--1m
zfs destroy storage/tbla/backup@2014-01-12_08.40.47--1m
zfs destroy storage/tbla/backup@2014-01-19_06.00.00--1m
zfs destroy storage/tbla/camera@2014-01-05_19.48.04--1m
zfs destroy storage/tbla/camera@2014-01-12_08.40.47--1m
zfs destroy storage/tbla/camera@2014-01-19_06.00.00--1m
zfs destroy storage/tbla/documents@2014-01-05_19.48.04--1m
zfs destroy storage/tbla/documents@2014-01-12_08.40.47--1m
zfs destroy storage/tbla/documents@2014-01-19_06.00.00--1m
zfs destroy storage/tbla/music@2014-01-12_08.40.47--1m
zfs destroy storage/tbla/music@2014-01-19_06.00.00--1m
zfs destroy storage/tbla/video@2014-01-05_19.48.04--1m
zfs destroy storage/tbla/video@2014-01-12_08.40.47--1m
zfs destroy storage/tbla/video@2014-01-19_06.00.00--1m

Create new snapshots

zfs snapshot storage/tbla@snapshot1
zfs snapshot storage/tbla/backup@snapshot1
zfs snapshot storage/tbla/camera@snapshot1
zfs snapshot storage/tbla/documents@snapshot1
zfs snapshot storage/tbla/music@snapshot1
zfs snapshot storage/tbla/video@snapshot1

Copy snapshots to new pool

zfs send -R storage/tbla@snapshot1 | pv | zfs receive usb/tbla
zfs send -R storage/tbla/backup@snapshot1 | pv | zfs receive usb/tbla/backup
zfs send -R storage/tbla/camera@snapshot1 | pv | zfs receive usb/tbla/camera
zfs send -R storage/tbla/documents@snapshot1 | pv | zfs receive usb/tbla/documents
zfs send -R storage/tbla/music@snapshot1 | pv | zfs receive usb/tbla/music
zfs send -R storage/tbla/video@snapshot1 | pv | zfs receive usb/tbla/video

Unmount old filesystems

zfs unmount -a
/usr/local/etc/rc.d/sickbeard stop
/usr/local/etc/rc.d/sabnzbd stop

Create new snapshots

zfs snapshot storage/tbla@snapshot2
zfs snapshot storage/tbla/backup@snapshot2
zfs snapshot storage/tbla/camera@snapshot2
zfs snapshot storage/tbla/documents@snapshot2
zfs snapshot storage/tbla/music@snapshot2
zfs snapshot storage/tbla/video@snapshot2

Copy incremental snapshots to new pool

zfs send -i -R storage/tbla@snapshot1 storage/tbla@snapshot2 | pv | zfs receive usb/tbla
zfs send -i -R storage/tbla/backup@snapshot1 storage/tbla/backup@snapshot2 | pv | zfs receive usb/tbla/backup
zfs send -i -R storage/tbla/camera@snapshot1 storage/tbla/camera@snapshot2 | pv | zfs receive usb/tbla/camera
zfs send -i -R storage/tbla/documents@snapshot1 storage/tbla/documents@snapshot2 | pv | zfs receive usb/tbla/documents
zfs send -i -R storage/tbla/music@snapshot1 storage/tbla/music@snapshot2 | pv | zfs receive usb/tbla/music
zfs send -i -R storage/tbla/video@snapshot1 storage/tbla/video@snapshot2 | pv | zfs receive usb/tbla/video

Ensure data is present and safe

Store old history

zpool history > /root/zfs_history3

Destroy old filesystems

zfs destroy storage
zfs destroy storage/tbla
zfs destroy storage/tbla/backup
zfs destroy storage/tbla/camera
zfs destroy storage/tbla/documents
zfs destroy storage/tbla/music
zfs destroy storage/tbla/video

Destroy old pool

zpool destroy storage

Create new pool

zpool create -o ashift=12 -f storage raidz ada5 ada6 ada7 raidz ada8 ada0 ada1 raidz ada9 ada10 ada2

Create new snapshots

zfs snapshot usb/tbla@snapshot1
zfs snapshot usb/tbla/backup@snapshot1
zfs snapshot usb/tbla/camera@snapshot1
zfs snapshot usb/tbla/documents@snapshot1
zfs snapshot usb/tbla/music@snapshot1
zfs snapshot usb/tbla/video@snapshot1

Copy back filesystems

zfs send -R usb/tbla@snapshot1 | pv | zfs receive storage/tbla
zfs send -R usb/tbla/backup@snapshot1 | pv | zfs receive storage/tbla/backup
zfs send -R usb/tbla/camera@snapshot1 | pv | zfs receive storage/tbla/camera
zfs send -R usb/tbla/documents@snapshot1 | pv | zfs receive storage/tbla/documents
zfs send -R usb/tbla/music@snapshot1 | pv | zfs receive storage/tbla/music
zfs send -R usb/tbla/video@snapshot1 | pv | zfs receive storage/tbla/video
Page last modified by brett on January 22, 2014, at 05:55 AM