Not possible to read device stats for devices added after mount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I discovered one minor bug in BTRFS filesystem. I made nagios check
for btrfs which reads device statistics for all devices in mounted
btrfs filesystem, calling btrfs dev stats /btrfs.

But there is one problem ... it's output looks like this:

[/dev/sda].corruption_errs 0
..
...
[/dev/sdt].generation_errs 0
ERROR: ioctl(BTRFS_IOC_GET_DEV_STATS) on /dev/sdb2 failed: No such device
ERROR: ioctl(BTRFS_IOC_GET_DEV_STATS) on /dev/sdh failed: No such device
ERROR: ioctl(BTRFS_IOC_GET_DEV_STATS) on /dev/sdj failed: No such device
ERROR: ioctl(BTRFS_IOC_GET_DEV_STATS) on /dev/sdk failed: No such device
ERROR: ioctl(BTRFS_IOC_GET_DEV_STATS) on /dev/sdl failed: No such device
ERROR: ioctl(BTRFS_IOC_GET_DEV_STATS) on /dev/sdp failed: No such device
ERROR: ioctl(BTRFS_IOC_GET_DEV_STATS) on /dev/sdq failed: No such device
ERROR: ioctl(BTRFS_IOC_GET_DEV_STATS) on /dev/sds failed: No such device
ERROR: ioctl(BTRFS_IOC_GET_DEV_STATS) on /dev/sde failed: No such device

But this is not true ... all specified devices exist and are members
of btrfs filesystem. In dmesg I see this:
...
[973077.098957] btrfs: get dev_stats failed, not yet valid
[973077.098984] btrfs: get dev_stats failed, not yet valid
[973077.099011] btrfs: get dev_stats failed, not yet valid
[973077.099038] btrfs: get dev_stats failed, not yet valid
[973077.099065] btrfs: get dev_stats failed, not yet valid
[973077.099092] btrfs: get dev_stats failed, not yet valid
[973077.099118] btrfs: get dev_stats failed, not yet valid
....

What makes device statistics valid ? I tried doing full filesystem
scrub ... but it did not fix that issue.

Thank you for any hints

Using this kernel (if it matters):
3.10-2-amd64 #1 SMP Debian 3.10.7-1 (2013-08-17) x86_64 GNU/Linux

Ondřej Kunc
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux