[opensuse-kernel] How to run xfstests against btrfs on multipath disks?
Hello, 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. When I run "./check 001", it said: " common.rc: Error: $TEST_DEV (/dev/dm-0) is not a MOUNTED btrfs filesystem " The I checked the script common.rc, and found that it uses df to determine the filesystem type and it uses the realpath "/dev/dm-0" instead of "/dev/mapper/mpatha", while df always shows "devtmpfs" instead of "btrfs" for /dev/dm-0. I run "mount" and found that devtmpfs is mount on /dev/ ***by default***. Even though I run "mount -t btrfs /dev/dm-0 /somedir", df still showed devtmpfs. Any ideas to kick off the xfstests? thanks, -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
On Mon, Nov 26, 2012 at 1:01 AM, Ryan Wang <openspace.wang@gmail.com> wrote:
Hello,
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. Not related for the problem, but please use /dev/disk/by-id/.. on SUSE to work with multipathed devices.
When I run "./check 001", it said: " common.rc: Error: $TEST_DEV (/dev/dm-0) is not a MOUNTED btrfs filesystem "
The I checked the script common.rc, and found that it uses df to determine the filesystem type and it uses the realpath "/dev/dm-0" instead of "/dev/mapper/mpatha", while df always shows "devtmpfs" instead of "btrfs" for /dev/dm-0.
I run "mount" and found that devtmpfs is mount on /dev/ ***by default***. Even though I run "mount -t btrfs /dev/dm-0 /somedir", df still showed devtmpfs.
Any ideas to kick off the xfstests?
thanks, -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org
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
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 <dsterba@suse.cz>:
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
participants (3)
-
David Sterba
-
Dinar Valeev
-
Ryan Wang