On Wed, Jul 6, 2016 at 1:17 PM, Austin S. Hemmelgarn <ahferro...@gmail.com> wrote:
> In bash or most other POSIX compliant shells, you can run this: > echo $? > to get the return code of the previous command. > > In your case though, it may be reporting the FS ready because it had already > seen all the devices, IIUC, the flag that checks is only set once, and never > unset, which is not a good design in this case. Oh dear. [root@f24s ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert 1 VG Vwi---tz-- 50.00g thintastic 2 VG Vwi---tz-- 50.00g thintastic 3 VG Vwi-a-tz-- 50.00g thintastic 2.54 thintastic VG twi-aotz-- 90.00g 5.05 2.92 [root@f24s ~]# btrfs dev scan Scanning for Btrfs filesystems [root@f24s ~]# echo $? 0 [root@f24s ~]# btrfs device ready /dev/mapper/VG-3 [root@f24s ~]# echo $? 0 [root@f24s ~]# btrfs fi show warning, device 2 is missing Label: none uuid: 96240fd9-ea76-47e7-8cf4-05d3570ccfd7 Total devices 3 FS bytes used 2.26GiB devid 3 size 50.00GiB used 3.01GiB path /dev/mapper/VG-3 *** Some devices missing Cute, device 1 is also missing but that's not mentioned. In any case, the device is still ready even after a dev scan. I guess this isn't exactly testable all that easily unless I reboot. -- Chris Murphy -- 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