On Fri, 12 Feb 2021, Greg Troxel wrote:
David Brownlee <abs%absd.org@localhost> writes:Does {r}xbd0 behave differently to {r}xbd0d? - worth a quick test?On a random 9/amd64 box, "ls -l /dev/*xbd0{,d}" shows: crw-r----- 1 root operator 142, 3 Jan 7 2019 /dev/rxbd0 crw-r----- 1 root operator 142, 3 Oct 21 2016 /dev/rxbd0d brw-r----- 1 root operator 142, 3 Jan 7 2019 /dev/xbd0 brw-r----- 1 root operator 142, 3 Oct 21 2016 /dev/xbd0d So my theory is that one can use /dev/xbd0 or /dev/xbd0d, never a raw device, and needs an actua. pathname, not somethihng that is used to search for a pathname (as many other tools do).
Ah, that's useful, Greg. I've not run MAKEDEV recently (for some definition of recently)since upgrading to -9 and so I did not have the device
nodes without letter suffices. You'll see from the dev dates that I last ran it before kre's 2016 change: http://cvsweb.netbsd.org/bsdweb.cgi/src/etc/MAKEDEV.tmpl?only_with_tag=MAIN#rev1.181 So: # cd /dev # sh MAKEDEV xbd1 # ls -l /dev/xbd1* brw-r----- 1 root operator 142, 19 Feb 12 16:17 /dev/xbd1 brw-r----- 1 root operator 142, 16 Nov 23 2015 /dev/xbd1a brw-r----- 1 root operator 142, 17 Nov 23 2015 /dev/xbd1b brw-r----- 1 root operator 142, 18 Nov 23 2015 /dev/xbd1c brw-r----- 1 root operator 142, 19 Nov 23 2015 /dev/xbd1d brw-r----- 1 root operator 142, 20 Nov 23 2015 /dev/xbd1e [snip] # zpool create tank xbd1 # zpool export tank # zpool import tank # zpool destroy tank # zpool create tank xbd1d # zpool export tank # zpool import tank The xbd1 node is required for the import: # rm /dev/xbd1 # zpool create tank xbd1d # zpool export tank # zpool import tank cannot import 'tank': no such pool available And when it does exist, it switches to it on an import: # zpool create tank xbd1d # zpool status pool: tank state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 xbd1d ONLINE 0 0 0 errors: No known data errors # zpool export tank # zpool import tank # zpool status pool: tank state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 xbd1 ONLINE 0 0 0 errors: No known data errors -- Stephen