[DRBD-user] Rescue a drbd partition

Lars Ellenberg lars.ellenberg at linbit.com
Thu Jan 24 17:41:00 CET 2019

On Sun, Jan 20, 2019 at 12:15:50PM +0100, Jeroen van Iddekinge wrote:
> Hi all,
> I have a qnap  nas (TS-851) that uses  DRBD over linux raid partition.
> The problem is that the device has a hardware problem and doesn't boot.    I
> want to rescue the data by attaching the disks to a computer, read the
> partition and copy the data.
> My question is, how can I access the files on the drbd partition?  I would
> like to do it as safe as possible
> Is there an easier way than installing a drbd server?
> Any suggestions?

What roland and robert said already.
Adding my sauce:

"magic detection" by libblkid may get in your way with confusing messages

Say, you have an ext4 on /dev/drbd0,
which is has a backing LV on /dev/scratch/s0.

Something happens, catastrophic failure,
you are in a last resort recovery scenario.

You now try to mount /dev/scratch/s0 directly:
mount /dev/scratch/s0 /mnt/s0/
mount: unknown filesystem type 'drbd'

Well, yes. That is mount being nice to you, trying to prevent you from
shooting yourself in the foot by "accidentally" bypassing DRBD.

If you *mean* it, though, just tell it:
mount -t ext4 /dev/scratch/s0 /mnt/s0/

(same for xfs or whatever)

If you happen to use DRBD as PV for LVM,
you usually have changed the lvm device filter settings
so the PV signature will only be "visible" on /dev/drbd
and not on the backends (again to make sure you do
not bypass DRBD in normal operation).
You may need to adapt that filter
to allow lvm to see the backend device directly,
if you *mean* to bypass drbd in a recovery scenario.

: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker

DRBD® and LINBIT® are registered trademarks of LINBIT
please don't Cc me, but send to list -- I'm subscribed

More information about the drbd-user mailing list