RAID device UUIDs in superblock missing?

Hi. I have a friend whose Rockstor NAS I manage. In the midst of a drive failure and rebuild(rebalance) of one of his storage pools I noticed something strange in the superblock of his array.

My NAS is run by Ubuntu 16.04 using BTRFS. I don’t personally use Rockstor just because I have no need for a GUI. The superblock for my 4-disk RAID5 array has the UUIDs of the devices that make up the array.


item 0 key (FIRST_CHUNK_TREE CHUNK_ITEM 2408574877696)
	chunk length 100663296 owner 2 stripe_len 65536
	type SYSTEM|RAID5 num_stripes 4
		stripe 0 devid 4 offset 341115404288
		dev uuid: ac82678b-8b7a-4740-9c70-5b472a72c2a6
		stripe 1 devid 3 offset 1452277760
		dev uuid: 32669560-a681-4561-9c2a-dd1c7287e81b
		stripe 2 devid 1 offset 1472200704
		dev uuid: 9861b35c-89d2-406d-af64-5785c92bf299
		stripe 3 devid 2 offset 1452277760
		dev uuid: 451f15b5-0a4c-49b4-a720-ec68ad141f56

While recovering his RAID array using the btrfs command line tools I noticed the superblock for his RAID devices don’t have the UUIDs:

item 0 key (FIRST_CHUNK_TREE CHUNK_ITEM 21881113542656)
	chunk length 67108864 owner 2 stripe_len 65536
	type SYSTEM|RAID5 num_stripes 5
		stripe 0 devid 5 offset 76236718080
		stripe 1 devid 3 offset 1347420160
		stripe 2 devid 1 offset 1367343104
		stripe 3 devid 2 offset 1347420160
		stripe 4 devid 4 offset 1347420160

I recently helped someone on reddit recover a broken array in Rockstor and his superblock did contain the UUIDs.

The array will mount fine in degraded mode (one drive is dead and removed from the system) but I’m curious why the UUIDs are not contained in the superblock and how the array is being mounted without them when dev names are shuffling around from drives being added and removed to the system?

@HittingSmoke Hello there. I would like to offer you a very very belated welcome to the Rockstor community. Some how we just managed to miss that greeting in your case; sorry.

As to youre superblock output uuid question I purposefully left a comment on this to others more knowledgeable in btrfs than me but my own outputs on the Rockstor systems I’ve looked at here are akin to the first output and I don’t see any like the second out. That is all outputs from:

btrfs-show-super -f /dev/sdX

include dev uuid: entries, including the oldest ones which would be the system partition created with the older tools contained within the installer image.

To my knowledge Rockstor does no btrfs patching of the progs (user space) or kernel (unmodified elrepo-ml). They are simply updated from upstream from time to time.

OK, I’ve just managed to reproduce your output. If I boot from the rockstor.iso installer into troubleshooting mode and ‘skip to shell’ then execute the same command there are no dev uuid: entries in the same sys_chunk_array[2048]: section so to control for btrfs-progs version differences I tried the same using a Fedora 23 server install iso and received the same output, ie no dev uuid: entries. Irrespective of mount status.

Rockstor 3.8-13 install iso had btrfs-progs v3.16.2
Fedora 23 server install iso had btrfs-progs v4.2.2

Anyone see anything obvious here?