Deleting snapshots will delete rockons data directories

Hello all!

I have the following rockons ​​installed:

  • owncloudHTTPS
  • MariaDB

After I installed and configured them following the Owncloud SSL Offical Image Guide OwnCloud worked successfully.

After I deleted the spare (in my opinion) snapshots (Storage-> Snapshots) for share rockons-root owncloudHTTPS and MariaDB stopped running, yielding the following errors:

Current status: exitcode: 255 error: stat / mnt2 / rockons-root / btrfs / subvolumes / 729ae76e8c031e81f226f6da5aea1e2bc571541363961d1a04571b5d21085330: no such file or directory
Current status: exitcode: 255 error: stat / mnt2 / rockons-root / btrfs / subvolumes / d4e155a468861c355d0d756da8cb2eedbca1c0ae1b8ac8cc98b735d951591cfb: no such file or directory

Obviously, somehow, on the Storage-> Snapshots page, you can delete not the snapshots, but the directories with the data rockons.

Tell me, please, is this normal behavior or am I doing something wrong?

Hi @oivanenko,

It is a normal behavior due to how Docker uses btrfs subvolumes for containers layers. As explained by @phillxnet in this post, these are detected by Rockstor as snapshots so deleting them actually corresponds to deleting the different layers of the containers. This is a known shortcoming and there already has been discussion on how to improve Rockstor’s behavior to this regard:
rock-ons-root snapshot warning · Issue #1682 · rockstor/rockstor-core · GitHub

I am actually interested in having a go at working on this as soon as I’m done with my current focus. In the meantime, however, you will see that in the first forum thread I referenced, there is an easy fix as you simply need to uninstall / reinstall the rock-ons in question. Using the same shares you defined for each will allow you to come back to where you were before without loosing any data (pending you chose dedicated shares for each as recommended).

Let us know how it goes :wink:

Hi, Flox!

Thank you for explanation! I’ve got it now. Somehow my mariadb and owncloudhttps rockons haven’t their own data shares and all data was stored in docker subvolumes (“snapshots”) and deleted now. I think I have pressed “Next” button before list of shares appeared in wizard during installation…

So, I have to reinstall owncloud :frowning:

I learned an important thing today about btrfs, don’t delete snapshots of rockon btrfs subvolumes :slight_smile:

When i first started using rockstor, I was surprised that there was no clear possibility for installing docker containers using cli or portainer. But I experimented, and have successfully installed portainer, portainer-agent and handbrake using command line, and then photoprism with mariadb (docker compose file) using portainer stack. Everything was working fine before I removed the snapshots.

After deleting the snapshots, there was not possible to install them again (with original names). I removed the containers, and install complained about missing subvolume container. A quick fix was to turn off rockons, then deleting everything in rockon share, then activate rockon again. Then new default config files are generated. Then install all containers again. Since these have their own share, everything was already in place :slight_smile:

Cheers
Erik

1 Like