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.
Example:
sys_chunk_array[2048]:
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:
sys_chunk_array[2048]:
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?