On 2015-05-14 20:09, Christian wrote: > Hi, > > My laptop has a small ext4 /boot partition /dev/sda1 and a large btrfs > partition containing / and /home as a sub volume /dev/sda3 > > When I run scrub on /dev/sda3 and check status with sudo btrfs scrub > status -d /dev/sda3 I get: > > scrub status for 3d52dc93-c89f-453f-965d-8601d11e7710 > scrub device /dev/sda3 (id 1) history > scrub started at Thu May 14 19:54:02 2015 and finished after 235 > seconds > total bytes scrubbed: 111.03GiB with 0 errors > scrub device (id 0) history > scrub started at Thu May 14 19:54:02 2015 and was aborted after 0 > seconds > total bytes scrubbed: 0.00B with 0 errors > > As device (id 0) is indicated, but I have no idea what it is. > > When I run scrub with a script (cron) the same device (id 0) shows up in > a warning: > > /etc/cron.daily/btrfs-scrub: > WARNING: device 0 not present > scrub device /dev/sda3 (id 1) done > scrub started at Sat May 2 08:03:46 2015 and finished after 241 > seconds > total bytes scrubbed: 109.06GiB with 0 errors > scrub device (id 0) canceled > scrub started at Sat May 2 08:03:46 2015 and was aborted after 0 > seconds > total bytes scrubbed: 0.00B with 0 errors > > What is this device (id 0) which never gets scrubbed but always shows up? > > I'm running Ubuntu 15.04 with the 3.19.0-16-generic kernel. > Have you ever run 'btrfs replace' to replace a device in the filesystem? I know that new device in a replace operation get's tagged as device id 0 until the replace operation completes (at which point it gets the devid of the device it replaced). Personally, this is the only case that I know of that devid 0 is actually used in the code. Thinking further though, it might also be an off-by-one error somewhere, although I have no idea where.