[SOLVED] Can't mount BTRFS backup drive >> wrong fs type, bad option, bad superblock

Edit:// 02.01.2020 :white_check_mark: Solution: see post 3


Hi, and happy new Year!

As I was going to restore my backup I was about to write a step-by-step guide on restoring NCP from a backup but did not go very far.

  • I’m using the NextCloudPi_RPi_11-27-20.img on a Pi 4.

Here is every step I took:

  • login via SSH

  • use df -h to list attatched drives

  • backup drive is not listed

  • try to create a mountpoint: type sudo fdisk -l

  • found device: Disk /dev/sda: 3.7 TiB, 40...

  • Created mountpoint by typing sudo mkdir /media/BackupPi

  • Atempted to mount: sudo mount /dev/sda /media/BackupPi/

output:

mount: /media/BackupPi: wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or helper program, or other error.

searched the internet

  • typed: lsblk -f

output:

NAME FSTYPE LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
sda
-sda1 btrfs BackupPi d9f57f36-1e07-4a32-b06b-5dc635fda293 sdb |-sdb1 vfat boot 4ADC-240F 197.4M 22% /boot -sdb2 ext4 rootfs 89cef7ba-d45a-47e7-8d42-aff18afcec80 222.6G 1% /

searched the internet

  • typed: dmesg

output:

I assume this “Magic Missmatch” has a connection to my mounting problem?

Searched the forum

  • tiped: cat /etc/fstab

output:

PARTUUID=bfcedfe1-01 /boot vfat defaults 0 2
PARTUUID=bfcedfe1-02 / ext4 defaults,noatime 0 1
a swapfile is not a swap partition, no line here
use dphys-swapfile swap[on|off] for that

  • typed: sudo fdisk -l /dev/sda

output:

Disk /dev/sda: 3.7 TiB, 4000786153472 bytes, 7814035456 sectors
Disk model: My Book 25EE
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 9EE02654-C76E-49A5-A1D5-A43D4F8077D7
Device Start End Sectors Size Type
/dev/sda1 2048 7814033407 7814031360 3.7T Linux filesystem

  • tried to repair by typing: btrfs check --repair /dev/sda

output:

enabling repair mode
Opening filesystem to check…
No valid Btrfs found on /dev/sda
ERROR: cannot open file system

  • typed: mount -t btrfs -o degraded /dev/sda

output:

mount: /dev/sda: can’t find in /etc/fstab.

found this

  • typed: btrfs-zero-log /dev/sda

output:

command not found

  • typed: btrfs rescue zero-log /dev/sda

output:

No valid Btrfs found on /dev/sda
ERROR: could not open ctree

searched the forum but run out of ideas…

Is my backup corrupted? Any hope of rescue?
Is this my only chance? (How to recover a BTRFS partition)

1 Like

Toady morning I came up with the ingenious idea of connecting the BTRFS backup drive to my Linux machine… and look what popped up:

why is this even possible

Why is it possible here but not on the Pi?

Did you enable nc-automount?

Gosh… How embarrassing is that! No, I did not.

works:

2 Likes

You were always using “/dev/sda” in your above commands, whereas “/dev/sda1” should have been used, I guess. You don’t want to mount the entire disk (/dev/sda) but rather the first (and probably only) partition on that disk (/dev/sda1).

Cheers,
Richard.

:man_facepalming:t3: