# Sanoid Troubleshooting

Use this file when automated snapshots do not behave as expected.

## Quick checks

```sh
which sanoid
sanoid --version
zfs list | grep clawdie-runtime
zfs list -t snapshot | grep clawdie-runtime
```

## Common failure signatures

### No snapshots created

Likely causes:

- wrong dataset path in `sanoid.conf`
- `autosnap = yes` missing
- service/cron not wired correctly

### Snapshots exist but prune never happens

Likely causes:

- `autoprune = yes` missing
- wrong policy/template mapping

### Wrong datasets getting snapshotted

Likely cause:

- too-broad dataset selection too early

Response:

- narrow policy back to `zroot/clawdie-runtime/jails/controlplane`


### Sanoid installed but no config exists

Observed good install signature on FreeBSD:

- `pkg install -y sanoid` succeeds
- package message points to `/usr/local/etc/sanoid/sanoid.conf`
- sample is placed at `/usr/local/etc/sanoid/sanoid.conf.sample`

Likely next step:

- write `/usr/local/etc/sanoid/sanoid.conf` for the intended datasets

### Package install worked but snapshots never appear

Likely causes:

- `sanoid.conf` not created yet
- wrong dataset path in config
- `autosnap = yes` missing
- `sanoid --cron` not wired into the host scheduler


### First `sanoid --readonly --verbose` run warns about `zpoolname/parent2`

Observed signature:

```text
cannot open 'zpoolname/parent2': dataset does not exist
INFO: dataset cache expired - updating from zfs list.
```

Meaning:

- this comes from the shipped sample config block still present in `/usr/local/etc/sanoid/sanoid.conf`
- it is not a Clawdie dataset failure
- the second run may be clean once the dataset cache is refreshed

Recommended response:

- treat the first warning as benign if your real Clawdie datasets validate normally
- later, comment out or remove the sample `zpoolname/parent2` block once the host config is stabilized
