How to recover an old FreeBSD ZFS droplet ?

Posted March 22, 2020 759 views
DigitalOcean Accounts


I have created a FreeBSD (10) droplet for at least 3 years now.
I have lost the SSH keys.

The problem is that I tried the recovery mode but:

  • the recovery mode does not recognize the droplet as a FreeBSD with ZFS and is not able to mount the ZFS volume,
  • I tried to mount the volume myself, but it does not work (I tried the command: mount -t zfs /dev/vda1 /mnt),

After investigating the script, it seems that it expects to find the /dev/vda3 device. But I do not find this endpoint.

Is it a problem in the script ? As my droplet is an old one, does DigitalOcean has changed the mapping and it does not work anymore for the old droplets ?

How can I recover an old FreeBSD droplet ?

Thanks in advance.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

I also have this problem :(

If your droplet is otherwise functional you can boot it into single user mode, set your root filesystem zpool to read-write and then make the changes you need to gain access to your system. Before you make changes I highly suggest creating a snapshot with the droplet powered off. Note that this advice is based on a fairly unmodified FreeBSD 12.2-RELEASE system with a ZFS root filesystem.

First, in the droplet control panel, under Recovery, make sure you have selected “Boot from Hard Drive”. To get into single user mode, starting from a powered off droplet, power on the droplet and open the web console as soon as the droplet control panel indicates the droplet console is available. With the console open you should see the FreeBSD bootloader screen with the option to start in single user mode (press “s” I think).

Once you’re at a # prompt, run zfs set readonly=off <zpool name>. In my case the system zpool is named zroot which I believe is DigitalOcean standard, but zpool list can help you determine the correct name. At this point you should be able to make any changes needed to the system to regain access to your droplet. Once you’ve made changes just run reboot and your system should come back up. If your changes corrected the problem your system should now be accessible.