Unable to delete share that is a snapshot - read only

Hi, relatively new to Rockstor.

I setup two servers and did a replication from one to the other.

On the receiving server I went to delete the share that was created and an unable too because of a R/O filesystem that is created ( I think )

Error as follows:

Failed to delete the share (.snapshots/BE9189EA-C00D-443E-89C3-765B22EC77B9_Software/Software_1_replication_1). Error from the OS: Error running a command. cmd = /usr/bin/chattr -i /mnt2/Production/.snapshots/BE9189EA-C00D-443E-89C3-765B22EC77B9_Software/Software_1_replication_1. rc = 1. stdout = [‘’]. stderr = [‘/usr/bin/chattr: Read-only file system while setting flags on /mnt2/Production/.snapshots/BE9189EA-C00D-443E-89C3-765B22EC77B9_Software/Software_1_replication_1’, ‘’]

snapshot_share

@david_harrison Welcome to the Rockstor community.

Apologies for not getting back to you earlier on this one. I did see it at the time but unfortunately failed to get around to it until now. And continuing on from our short interaction via your more recent support email, I’ll paste the slightly more informative image you attached here as it gives a little more info:


and may help others recognise if they have the same scenario.

It looks like a replication specific snapshot (the first one), in the process of having it’s immutable flag removed via /usr/bin/chattr -i (a normal procedure in share/subvol delete), has encountered a Read-only file system:

“/usr/bin/chattr: Read-only file system while setting flags on”

Now the parent pool is currently showing as rw however it can be the case, due to shares/snapshots (btrfs subvols) being filesystems in their own right (almost), for a share/snapshot to be read only.

What I think has happened here is that the normal manual share delete procedure has failed in the case of this ‘special’ replication share/snapshots. These are normally deleted by the replication process itself, which takes 5 full cycles to ‘settle in’ to it’s then normally 3 deep cycle. And during this rotating cycle of snapshot promotion to shares transition we have a number of read only snapshots that are at times presented as shares.

If you are sure you are done with the associated replication process, ie it’s sender & receiver are now deleted, then what may get this snapshot/share issue resolved is to remove the ro true property of this persistent subvol.

I.e. using the root user (created during install) in a terminal (machine local or via ssh), or using the build in Web-UI System - System Shell (see System Shell In A Box spanner icon for settings) facility.

Run the following:

btrfs property set /mnt2/Production/.snapshots/BE9189EA-C00D-443E-89C3-765B22EC77B9_Software/Software_1_replication_1 ro false

You should then, hopefully, be able to delete this ‘special case’ Share.

Incidentally I have now opened a GitHub issue to reflect the short fall we have in the Web-UI’s capabilities here:

https://github.com/rockstor/rockstor-core/issues/2050

Hope that helps and thanks for helping to support Rockstor’s development via Stable subscriptions.

Excellent!

After issuing that command the share was mounted rw - and then could be deleted.

Many thanks

David

@david_harrison Thanks for the update and glad it’s sorted.

We also now have that GitHub issue so in time the Web-UI should be a little more capable in this case.

Thanks again for the report. Quite the corner case but an important one to get fixed.