Files
presentations/2025/zfs-migrations/slides.md
T

144 lines
2.4 KiB
Markdown

# Migration Geodesic ZFS
----
# Needs
![intro](./assets/intro.png =500x)
----
# Summary
- Rsync
- Offline migration (data files)
- Online migration (dumps)
- Snapshots
- Virtual Machines
- ZFS/BTRFS
- Container-based solutions
----
## rsync/scp : offline migration
![rsync 1](./assets/rsync_1.png)
----
## rsync/scp : online migration
![rsync 2](./assets/rsync_2.png)
----
## rsync/scp
#### Possible practical issues :
- File permissions
- Postgres permissions
- SSH keys
- Configuration mismatch
<!--- Static files : `rsync` or `scp` --->
```diff
+ No big architectural changes
- Lots of configuration
- Heavy : will take time to backup and restore
- Hacky ?
```
----
## Snapshots
![gitflow1.svg](./assets/gitflow1.svg =100%x)
----
## Snapshots
![gitflow2.svg](./assets/gitflow2.svg =100%x)
----
## Snapshots
![gitflow3.svg](./assets/gitflow3.svg =100%x)
----
## Snapshots
![gitflow4.svg](./assets/gitflow4.svg =100%x)
----
### Virtual Machine cloning
```diff
- Must fiddle with hypervisor
- We don't want to nest virtual machines
```
----
### ZFS
<!-- https://cdn.arstechnica.net/wp-content/uploads/2020/05/copyonwrite-000-nocow.gif -->
![cow.gif](./assets/copyonwrite-000-nocow.gif)
> Conventional Filesystem
----
### ZFS
<!-- https://cdn.arstechnica.net/wp-content/uploads/2020/05/copyonwrite-000-nocow.gif -->
![cow.gif](./assets/copyonwrite-001-data-comet.gif)
> Copy on write (CoW)
----
### ZFS
<!-- https://cdn.arstechnica.net/wp-content/uploads/2020/05/copyonwrite-002-data-worm.gif -->
![cow.gif](./assets/copyonwrite-002-data-worm.gif)
> Simplified CoW representation
----
### ZFS
<!-- https://cdn.arstechnica.net/wp-content/uploads/2020/05/copyonwrite-003-visualizing-snapshots.gif -->
![cow.gif](./assets/copyonwrite-003-visualizing-snapshots.gif)
> Snapshots using CoW
----
### ZFS
#### Tools :
- [zrepl](https://zrepl.github.io/quickstart.html)
- [syncoid](https://github.com/jimsalterjrs/sanoid/wiki/Syncoid)
```diff
+ Automatic / Seamless
- Possible use of untested additional tools/programs
- Additional system complexity
```
----
### Container-based solutions
#### LXD
- Hypervisor for Linux Containers (LXC) and virtual machines
- Can use ZFS
- Canonical maintaned
```diff
+ Automatic / Seamless
- Additional architectural complexity
```
----
#### Kubernetes Volume Cloning
```diff
+ Automatic / Seamless
- Additional architectural complexity
- Definitely Hacky
- Kubernetes
- Better handled with operators/pods
```