Spyua
ZFS Replication Overview
Outline
1.Overview
2.Setting && Flow
3.Software Block Diagram
4.AP&&EXE FUN
5.Simple Demo
Overview
Primary Secondary
Snapshot A
Snapshot B
Snapshot C
ZFS Replication
Pool
Based on Snapshot
Setting && Flow
Primary Secondary
Command: zfs send zpxxx/dsxxx@sn01 |
ssh –o StrictHostKeyChecking=no IP zfs receive zpxxx/dsxxx
Step1: Connect Setting
Use rsync transfer primary public key to secondary authorized_keys.
Step2: Create Snapshot
Primary create snapshot which do replication.
Step3: Execute zfs command
Execute zfs replication command.
Step1:Connect Setting
Primary
1.Install rsync
2.Setting rsync.secrets
setting the secondary rsync password in primary rsync.secrets.
1.Install rsync
2.Setting rsync.conf and rsync.secrets (/etc/..)
rsync connect setting.
1.Rsync Setting
Use ssh-keygen generator public key
ssh-keygen -t rsa (/root/.ssh/id_rsa.pub).
2.Primary generator the public key.
3.Primary use rsync command to transfer public key
Secondary
Step2: Create Snapshot
Primary Secondary
Snapshot A
Snapshot B
Snapshot C
ZFS Replication
Pool
Command:zfs snapshot zpxxx/dsxxx@snxx
Step3: Execute zfs Command
Primary Secondary
Snapshot A
Snapshot B
Snapshot C
ZFS Replication
Pool
Command:
zfs send [shapshot]
| ssh –o StrictHostKeyChecking=no IP zfs receive [dataset Path]
zfs send –i [shapshot1] [snapshot2]
| ssh –o StrictHostKeyChecking=no IP receive [dataset Path]
Software Block Diagram
Connect Setting
RPC Exe Fun
Put public key to remote
SSH Exe Fun
Gen Public Key
ZFS AP
Snapshot
Replication
Remote Host
~/.ssh/authorized_keys
ssh command
zfs send && zfs receive
sshkey transfer
AP&&EXE FUN
•RSYNC EXE
rsync_exe.py
•SSH EXE
ssh_exe.py
•ZFS REPLICATION AP
stor_rep_add.py
stor_rep_list.py
Simple Demo
Primary Execution: ssh-keygen -t rsa
Simple Demo
Primary Execution:
Primary copy id_rsa.pub to secondary
Simple Demo
Primary Execution:
zfs snapshot zp146093/ds808450@sn01
Simple Demo
Primary Execution:
zfs send zp146093/ds808450@sn01
| ssh -p 234 10.88.3.91 zfs receive zp712879/ds80845
END
Software Block Diagram
Connect Setting
RSYNC Exe Fun
Put public key to remote
SSH Exe Fun
Gen Public Key
ZFS AP
Snapshot
Replication
Remote Host
~/.ssh/authorized_keys
ssh command
zfs send && zfs receive
Rsync transfer

Zfs replication overview