Skip to contentSkip to conversation

Can I use btrfs-restore to restore ceph osds?

DISCUSSION Guido Winkelmann 2 participants 3 messages May 9, 2012 – May 10, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

I'm currently trying to re-enable my experimental ceph cluster that has been offline for a few months. Unfortunately, it appears that, out of the six btrfs volumes involved, only one can still be mounted, the other five are broken somehow. (If I ever use Ceph in production, it's probably not going to be on btrfs after this... I cannot recall whether or not the servers were properly shut down the last time, but even if not, this is a bit ridiculous.)

I cannot seem to repair the broken filesystem with btrfsck, but I can extract data from them with btrfs-restore.

If I want to restore this whole thing, can I just run btrfs-restore to recover the files that were on the broken volume, then make a new filesystem on the old partition, and finally copy over the directories and file restored by btrfs-restore? Or will that lose important information?

Guido

#1 lore raw

Am Mittwoch, 9. Mai 2012, 19:15:19 schrieben Sie:

Quoted 7 lines

I'm currently trying to re-enable my experimental ceph cluster that has been offline for a few months. Unfortunately, it appears that, out of the six btrfs volumes involved, only one can still be mounted, the other five are broken somehow. (If I ever use Ceph in production, it's probably not going to be on btrfs after this... I cannot recall whether or not the servers were properly shut down the last time, but even if not, this is a bit ridiculous.)

In case anybody was wondering, the machines were using kernel 3.1.1 when they last ran. (And still are, but I'm preparing a newer kernel.) I don't know yet what bug has caused this breakage and whether or not it's still present in newer kernels.

Guido

#2 lore raw
In reply to Guido Winkelmann
Quoted 9 lines · Guido Winkelmann

I'm currently trying to re-enable my experimental ceph cluster that has been offline for a few months. Unfortunately, it appears that, out of the six btrfs volumes involved, only one can still be mounted, the other five are broken somehow. (If I ever use Ceph in production, it's probably not going to be on btrfs after this... I cannot recall whether or not the servers were properly shut down the last time, but even if not, this is a bit ridiculous.)

I cannot seem to repair the broken filesystem with btrfsck, but I can extract data from them with btrfs-restore.

OSD uses btrfs snapshots internally. Any restore operation would have to bring the snapshots back exactly as they were, too. It seems there's a -s option for that, but whether things will work out is hard to predict.. since it was a test cluster, perhaps you're better off scrapping the data and setting up a new cluster.