ptr727 Posted January 24, 2020 Share Posted January 24, 2020 How can I mount the BTRFS cache volume from Ubuntu? My cache consists of 4 x 1TB SSD drives. Looking at the btrfs docs, it looks like I need to know the disk layout when I mount the disks. What would the btrfs mount options be for a 4 drive cache volume created by Unraid? Quote Link to comment
JorgeB Posted January 24, 2020 Share Posted January 24, 2020 Yes, you just need to mount one of the devices (any one), the other ones will mount together (if present obviously), don't forget to add the partition, e.g. mount -t btrfs /dev/sdX1 /mountpoint Quote Link to comment
ptr727 Posted January 24, 2020 Author Share Posted January 24, 2020 Thx, out of curiosity, how does the OS know the other partitions? Quote Link to comment
JorgeB Posted January 24, 2020 Share Posted January 24, 2020 There is only one partition on each disk, do you mean how does it know the other members? The superblock contains info of how many devices there should be, and each device has the same UUID, as well as the device ID, for example this is from one of my servers during btrfs initialization: Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid cea535d2-33f9-4cf2-9ff0-0b51826d48a1 devid 2 transid 11309479 /dev/nvme1n1p1 Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid 53359b43-aa0a-4561-9b41-404192b54104 devid 1 transid 1808 /dev/sdk1 Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid 53359b43-aa0a-4561-9b41-404192b54104 devid 2 transid 1808 /dev/sdl1 Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid 8f4b1e6c-bec2-4c5e-9d2b-f403d057b23e devid 1 transid 152 /dev/sdf1 Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid 6e74e4b1-1162-4279-9893-2dd114c6812d devid 1 transid 173 /dev/sdh1 Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid 36dbc084-e967-4836-9236-73f6e84af0eb devid 1 transid 164 /dev/sdi1 Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid 29000c9a-e690-494b-af97-516a8c04d300 devid 1 transid 175 /dev/sdg1 Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid 36398be0-8704-4c35-8bd8-905b5528337b devid 1 transid 56313 /dev/sdc1 Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid 36398be0-8704-4c35-8bd8-905b5528337b devid 2 transid 56313 /dev/sdd1 Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid 0549bb2a-df88-4960-9893-e3a41cbc2fed devid 6 transid 99039 /dev/sdb1 Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid 36398be0-8704-4c35-8bd8-905b5528337b devid 3 transid 56313 /dev/sde1 Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid 53359b43-aa0a-4561-9b41-404192b54104 devid 3 transid 1808 /dev/sdm1 Jan 11 13:56:30 Tower1 kernel: BTRFS: device fsid 4a11944e-a912-441c-9239-2ee256b21817 devid 1 transid 23317 /dev/sdj1 You can see that some devices have the same UUID and a different devid, so for example sdk, sdl and sdm are from one pool, sdc, sdd and sde are from another one, all members of a pool should also be on the same transid, if not that device is out of date, but can be brought up to date if with a scrub (if the pool is redundant). Quote Link to comment
ptr727 Posted January 24, 2020 Author Share Posted January 24, 2020 I see, does this imply that the /dev/foo identifiers need to match, or can btrfs figure out how to match the UUID with the devid? E.g. what if I swap drive bay positions, or a different controller changes the device identifier? Quote Link to comment
JorgeB Posted January 24, 2020 Share Posted January 24, 2020 9 minutes ago, ptr727 said: does this imply that the /dev/foo identifiers need to match No, these can change during boot or with different hardware, they don't matter. Quote Link to comment
ptr727 Posted January 24, 2020 Author Share Posted January 24, 2020 Thx, I'll give it a try tonight when I get home. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.