Skip to content

Truenas storage driver#6

Open
mrstux wants to merge 232 commits intomainfrom
truenas-storage-driver
Open

Truenas storage driver#6
mrstux wants to merge 232 commits intomainfrom
truenas-storage-driver

Conversation

@mrstux
Copy link
Copy Markdown
Collaborator

@mrstux mrstux commented Aug 14, 2025

This PR has actually been merged into main now via lxc#2344

I thought it would be fairly useful to capture the history though as a closed PR.

jbendtsen and others added 30 commits August 12, 2025 07:19
Signed-off-by: Jack Bendtsen <jack.bendtsen@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
```
incus storage create pool4 truenas source=dozer/se-incus truenas.host=$TN_HOST truenas.api_key=$TN_APIKEY
incus storage ls
incus storage rm pool4
```

host/api_key support currently commented out in d.runTool, and a key.txt file will need to be used.

Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
volumes can be created, and when using an admin-tool which auto-shares
they can be mounted, and even utilized.

custom  volumes can be created, and removed

`incus launch images:alpine/3.18 first2 -s pool2`

will download the image, but fail during cloning

Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
When deleting cloned instances, the instance needs to be able to be renamed

Thus origin/clones need to be onbtainable.

Additionally, when renaming a dataset that is going to be mounted we need
to be able to update the shares on the server

Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
…tem|snapshot

Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Jack Bendtsen <jack.bendtsen@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
…1.8, minimum version v0.2.0

Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
…e with snapshots

Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
requires TNA v0.3 for datasets > 1

Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Jack Bendtsen <jack.bendtsen@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
This is performed when we handle Mount(), which is performed twice as part of
creating a pool.

Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
Stuart Espey added 30 commits August 12, 2025 07:20
Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
after each FS test the filesystem is set, this results in a future test trying
to resize a btrfs fs and failing, in this specific case this can be reproduced
by running the "storage_driver_truenas" test followed by "incremental_copy" test

Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
…ailing spaces

Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
truenas driver does work with clusters, but the tests use net-ns to setup pseudo clusters and the iSCSI client
used by the TrueNAS tool does not work without additional hand-holding in namespaces

Signed-off-by: Stuart Espey <stuart.espey@mactrix.com>
The TrueNAS storage driver uses open-iscsi, which is incompatible with net-ns, which is used by the cluster tests
This file was used during the development of the driver, but should not be needed anymore.
The loop was problematic, it took a long time, and was sensitive to drivers which require
longer to re-activate after a kill

The core issue was that if we use >4s then we get good reliability, but we can exceed the
60s timeout window, and thus fail the loop

The solution is to try to wait for the PID to be available, rather than hoping it it is available
after we wait for a fixed time.

This actually results in faster testing, and should be more reliable
The `:` characters in IPv6 IP address was resulting in improper host:dataset splitting when parsing source property
…reate activate failure

When locate --create is called, and create succeeds, but discovery fails, the tool may not return an error, and skip activation. In this case we return an obtuse error about unable to find path.

The error has been fixed in the tool, but as belt+braces, more explici handling has been added to the driver to suggest a possible communications issue

Also, the generic error has been improved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants