Skip to contentSkip to conversation

How do I correctly mount a multidevice volume via fstab?

DISCUSSION Thomas Kuther 2 participants 3 messages Feb 6, 2009 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi all,

I am using a single volume across two devices sdb7 and sda1, initially created on sdb7, and added sda1 using btrfs-vol later. The fstab entry:

/dev/disk/by-id/scsi-SATA_ST31000333AS_9TE12DSC-part7
/mnt/btrfs btrfs defaults 1 2

Now after boot I get:
----
device fsid c4822885057410c-d2d65a83c2f15fb4 devid 1
transid 73034 /dev/sdb7
btrfs: failed to read chunk tree on sdb7
----

So I have to run btrfsctl -a first, then mounting works. Can this be done via fstab?

Thanks,
Thomas

#1 lore raw

2009/2/7 Thomas Kuther <[email protected]>:

Quoted 15 lines

Hi all,

I am using a single volume across two devices sdb7 and sda1, initially created on sdb7, and added sda1 using btrfs-vol later. The fstab entry:

/dev/disk/by-id/scsi-SATA_ST31000333AS_9TE12DSC-part7
/mnt/btrfs btrfs defaults 1 2

Now after boot I get:
----
device fsid c4822885057410c-d2d65a83c2f15fb4 devid 1
transid 73034 /dev/sdb7
btrfs: failed to read chunk tree on sdb7
----

Quoted 2 lines

So I have to run btrfsctl -a first, then mounting works. Can this be done via fstab?

you can add 'device=/dev/xxx' to the mount options field.

for example:
/dev/disk/by-id/scsi-SATA_ST31000333AS_9TE12DSC-part7 /mnt/btrfs btrfs device=/dev/disk/by-id/scsi-SATA_ST31000333AS_9TE12DSC-part1 1 2

Regards
Yan Zheng

#2 lore raw
Quoted 11 lines · Yan Zheng <yanzheng <at> 21cn.com> writes:
Quoted 2 lines

So I have to run btrfsctl -a first, then mounting works. Can this be done via fstab?

you can add 'device=/dev/xxx' to the mount options field.

for example:
/dev/disk/by-id/scsi-SATA_ST31000333AS_9TE12DSC-part7 /mnt/btrfs btrfs device=/dev/disk/by-id/scsi-SATA_ST31000333AS_9TE12DSC-part1 1 2

Regards
Yan Zheng

Ah nice, that easy.

Thank you!

Best,
Thomas