I have a BTRFS filesystem with a set of subvolumes in it. So far so good. I need to change the name of a subvolume, unfortunately the btrfs
program does not allow me to rename a subvolume. Searching with Google has yielded some results, one said I can just mv
, the other said I can just snapshot
to a new name and delete the old subvolume. Before I crash my partition and have to reload it from the backup (it's quite large), my question is:
- What is the currently best way to rename a subvolume?
- Is it ok to just
mv
it, or will it invalidate some internal structures? - Is making a new snapshot and removing the old subvolume the way to go, or has this some drawbacks?
I know everything is still experimental, but for my purposes it has been working quite well (so far, and I have incremental backups for each day).
Best Answer
Just
mv
it. That's the recommended way in the Ubuntu community documentation.And to further clarify why that is the right way to do it, here is a quote from the btrfs sysadmin guide: