On Mon, Dec 08, 2014 at 03:58:09PM +0100, Goffredo Baroncelli wrote: > In another patch set, I proposed a mount.btrfs helper which is > in position to perform these analysis and to pick the "right" > device (even with the user suggestion). > > Today the lvm-snapshot and btrfs behave very poor: it is not > predictable which device is pick (the original or the snapshot). > These patch *avoid* most problems skipping the snapshots, which > to me seems a reasonable default. > For the other case the user is still able to mount any disks > [combination] passing them directly via command line ( > mount /dev/sdX -o device=/dev/sdY,device=/dev/sdz... );
Beware that passing 'device' does not mean that btrfs will use that device to assemble the filesystem. It only says to scan the device the same way any preceding 'btrfs dev scan' would do. super.c: 822 case Opt_device: 823 device_name = match_strdup(&args[0]); 824 if (!device_name) { 825 error = -ENOMEM; 826 goto out; 827 } 828 error = btrfs_scan_one_device(device_name, 829 flags, holder, fs_devices); 830 kfree(device_name); 831 if (error) 832 goto out; 833 break; > Anyway I think for these kind of setup (btrfs on lvm-snapshot), > passing the disks explicitly is the only solution; [...] ... for which you'd need another mount option and update the code that selects the devices accordingly. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html