I tried the 2 methods, both failed.
# ls -l /dev/mapper/mpatha
lrwxrwxrwx 1 root root 7 Nov 26 17:39 /dev/mapper/mpatha -> ../dm-0
# mount -t btrfs /dev/mapper/mpatha /mnt/test
# mount
/dev/sdu3 on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devtmpfs on /dev type devtmpfs (rw,mode=0755) # devtmpfs is mounted on /dev
tmpfs on /dev/shm type tmpfs (rw,mode=1777)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
...
/dev/mapper/mpatha on /mnt/test type btrfs (rw)
In xfstests, it uses "df -T" to get the filesystem on the specified disk.
devtmpfs doesn't match btrfs, and thus xfstests fails to kick off.
----------------------------------------------------------------------------------------
# df -T /dev/mapper/mpatha
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/mapper/mpatha btrfs 20971520 4992 18841600 1% /mnt/test
# df -T /dev/dm-0
Filesystem Type 1K-blocks Used Available Use% Mounted on
devtmpfs devtmpfs 2469696 5056 2464640 1% /dev
Check /dev/disk/by-id:
-----------------------------------------------------------------------
# ls -l /dev/disk/by-id/ | grep dm-0
lrwxrwxrwx 1 root root 10 Nov 26 17:39 dm-name-mpatha -> ../../dm-0
lrwxrwxrwx 1 root root 10 Nov 26 17:39
dm-uuid-mpath-36005076304ffce9f0000000000000079 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Nov 26 17:39
scsi-36005076304ffce9f0000000000000079 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Nov 26 17:39 scsi-mpatha -> ../../dm-0
lrwxrwxrwx 1 root root 10 Nov 26 17:39
wwn-0x6005076304ffce9f0000000000000079 -> ../../dm-0
# df -T /dev/disk/by-id/scsi-36005076304ffce9f0000000000000079
Filesystem Type 1K-blocks Used Available Use% Mounted on
devtmpfs devtmpfs 2469696 5056 2464640 1% /dev
2012/11/26 David Sterba
On Mon, Nov 26, 2012 at 08:01:23AM +0800, Ryan Wang wrote:
I tried to kick off xfstests against btrfs on multipath device, e.g I set TEST_DEV="/dev/mapper/mpatha", which is a symlink to "/dev/dm-0". I mkfs.btrfs mpatha beforehand.
If the device path is a symlink, use TEST_DEV=`readlink -f /dev/mapper/mpatha`
as a workaround. IIRC there are some patches pending to fix that.
david -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org