By Dave N
The last discussion I see on this topic is six years old. It is now nearly 2020 and DO has added many new features.
Can someone tell me how to do the intial setup on a Droplet which will be configured with BTRFS and will use a filesystem layout compatible with the Snapper snapshot tool?
I am familiar with Linux, BTRFS and Snapper, as I use these on my own servers. I am comfortable working in the command line, and I know which steps I would perform to achieve my goal on my own server. Therefore, my question is mainly about how to do those steps on a DO VPS.
One possible option is to boot into a live image and go to work setting things up from scratch. Can I do that on DO?
Another possible option is to convert an existing Droplet from Ext4 to BTRFS. However, with that option, I’m not sure how easy it will be to get the filesystem layout I desire.
I will be running Ubuntu, but the Snapper-compatible filesystem layout I plan to use is described on the Arch Wiki. One of the things I wish to avoid is having the root filesystem in the top level BTRFS subvolume. However, if I convert from Ext4 to BTRFS, I think the result is that undesirable configuration.
However, assuming there is a solution for that issue, would this approach to converting to BTRFS work on DO?
How to: convert your VPS root filesystem to btrfs (using rescue boot)
Finally, if neither of the above two options are suitable, are there other ways to achieve my goal on DO?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.
Setting up a Droplet with BTRFS and a Snapper-compatible filesystem layout at DigitalOcean does require a few additional steps as compared to doing it on personal servers. Unfortunately, booting into a live image is not currently supported on DigitalOcean.
However, you can convert an existing Droplet with EXT4 to BTRFS. Please bear in mind this process requires substantial knowledge and precision while operating on the command line. Missteps could lead to data loss or system crashes.
Although creating the Snapper-compatible layout might not be straightforward due to the existing EXT4 partition structure, you can still manually adjust the layout once the filesystem conversion is complete.
However, if you don’t want to have your root filesystem be the top-level BTRFS subvolume, it would indeed be challenging to accomplish this with a conversion from EXT4 to BTRFS. It might be more appropriate in your case to go for a fresh setup with the desired configuration, even though it implies more work initially.
Remember, always back up your data before making significant changes to your filesystem!
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.