> You need to fix the partition/filesystem size mismatch first.
>
> fdisk -l /dev/sda
> btrfs insp dump-s /dev/sdaN
Hi Chris, thank you for taking the time to help me.
The reason I performed all those actions is that those are the actions
that are suggested in order to recover btrfs mount failures. I tried
to perform them in order from the least to the most dangerous and only
tried the next one after the previous one didn't help. In any case, I
did have dumped the failed btrfs partition to .img file in case the
things will go terribly wrong. I was hoping that I could just restore
it if to much damage were introduced. But I did take an image only of
the failed partition and not the entire drive, so now I'm afraid that
maybe the data needed to restore the partition is gone or overwritten,
because this data may be in the area outside the partition itself as
you suggested.
In any case, here are the outputs of the commands that you asked for:
$> fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 476.96 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: SAMSUNG MZVLW512HMJP-000H1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 63C1ED58-4B39-428F-90F1-9CA561B96111
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 309247 307200 150M EFI System
/dev/nvme0n1p2 775952384 796432383 20480000 9.8G Linux swap
/dev/nvme0n1p3 309248 368949247 368640000 175.8G Linux filesystem
/dev/nvme0n1p7 796432384 1000214527 203782144 97.2G Linux filesystem
$> btrfs insp dump-s /dev/nvme0n1p3
superblock: bytenr=65536, device=/dev/nvme0n1p3
---------------------------------------------------------
csum_type 0 (crc32c)
csum_size 4
csum 0x043ea018 [match]
bytenr 65536
flags 0x1
( WRITTEN )
magic _BHRfS_M [match]
fsid 90e9d74c-3606-4028-9e72-c10e76f44a7c
metadata_uuid 90e9d74c-3606-4028-9e72-c10e76f44a7c
label data
generation 49
root 8612052992
sys_array_size 97
chunk_root_generation 46
root_level 1
chunk_root 1048576
chunk_root_level 1
log_root 0
log_root_transid 0
log_root_level 0
total_bytes 188743680000
bytes_used 182011633664
sectorsize 4096
nodesize 16384
leafsize (deprecated) 16384
stripesize 4096
root_dir 6
num_devices 1
compat_flags 0x0
compat_ro_flags 0x0
incompat_flags 0x161
( MIXED_BACKREF |
BIG_METADATA |
EXTENDED_IREF |
SKINNY_METADATA )
cache_generation 48
uuid_tree_generation 48
dev_item.uuid e2815a2c-6ec8-45c6-baae-7f429a5f0f78
dev_item.fsid 90e9d74c-3606-4028-9e72-c10e76f44a7c [match]
dev_item.type 0
dev_item.total_bytes 188743680000
dev_item.bytes_used 184704565248
dev_item.io_align 4096
dev_item.io_width 4096
dev_item.sector_size 4096
dev_item.devid 1
dev_item.dev_group 0
dev_item.seek_speed 0
dev_item.bandwidth 0
dev_item.generation 0