kdave / btrfs-progs

Development of userspace BTRFS tools
GNU General Public License v2.0
527 stars 239 forks source link

Update error message for ro->rw property change #763

Closed CorrosiveTruths closed 3 months ago

CorrosiveTruths commented 3 months ago

Hi, when trying to set an ro snapshot to rw, you get the following error:

ERROR: cannot flip ro->rw with received_uuid set, use force if you really want that

In prop set --help the -f option reads: force the change, could potentially break something

The error at least should reflect the current behaviour where the received_uuid is unset, but perhaps both need revising?

Something more like?

ERROR: cannot flip ro->rw with received_uuid set, use -f to force unset.

or maybe something more advisory?

ERROR: cannot flip ro->rw with received_uuid set, use -f to force unset. received_uuid is used for incremental send. Consider making a snapshot instead.

CorrosiveTruths commented 3 months ago

Came about in this discussion on reddit: https://www.reddit.com/r/btrfs/comments/1bkqor2/received_uuid_error_after_btrfs_send/

kdave commented 3 months ago

Thanks for forwarding the question and the suggestion. I've added more text so it's clear and points to the manual page that tells more about the received_uuid and subvolume ro/rw status. The erro message is long but I guess 'more is better'.

                                error(                                                                                                                                                                               
"cannot flip ro->rw with received_uuid set, use force option -f if you really want unset the read-only status."                                                                                                      
" The value of received_uuid is used for incremental send, consider making a snapshot instead."                                                                                                                      
" Read more at btrfs-subvolume(8) and Subvolume flags.");