Jason Zhao wrote: > jan damborsky wrote: >>> I run the driver on OpenSolaris >>> with ZFS root. Why does libtd list the dump device or >>> swap device as a disk? >>> # test_td -d >>> Disk discovery >>> Total number of disks: 3 >>> --------------------------------- >>> num | name| ctype|size [MB]| >>> --------------------------------- >>> 1 | c3d0| ata| 76293| >>> 2 | c3d1| ata| 76293| >>> 3 | dump|unknown| 507| >>> --------------------------------- >>> >> >> I think it is a bug - Target discovery should filter out >> ZFS volumes. Could you please file bug for this ? >> > Thank you, I have filed 5929 as bug track.
Thanks. >>> 2. How to find a disk when its ctype is "usb"? >>> >> >> I think you could use following commands: >> >> * format(1M) when invoked in expert mode (with -e option) >> * rmformat(1) >> * iostat(1M) -En >> > Thanks, I will try it later since I don't have usb stick > or storage in hand now. > > The "ctype" in libtd means "controller type", not "target disk type", > right? > Because obviously the "c0t0d0" is a sd target device, but the connected > controller device which is a "ehci" device. Yes, this is correct. >> >>> # /export/test_td -d >>> Disk discovery >>> Total number of disks: 3 >>> --------------------------------- >>> num | name| ctype|size [MB]| >>> --------------------------------- >>> 1 | c0t0d0| usb| 38154| >>> 2 |* c4d0| ata| 152625| >>> 3 | swap|unknown| 512| >>> --------------------------------- >>> >>> Right now, c0t0d0's device is >>> "/pci at 0,0/pci17aa,20ab at 1d,7/storage at 2/disk at 0,0", >>> through "prtconf -Dv", I could get its major number >>> is "50"(sd driver), but "/pci at 0,0/pci17aa,20ab at 1d,7" is >>> a usb controller which driver is "ehci". So it looks >>> like the way to check if target disk is "usb" is to >>> check the output of "prtconf" and libdevinfo. Do you >>> know some other simpler ways to get the correct >>> disk ctype? >>> >>> I am developing the test suite now, and very possible >>> to have more questions to interrupt you, thank you very >>> much for your patience. >>> >> >> No problem at all :-) Please feel free to ask if you have questions >> or need more information. >> >> I will be on vacation following two weeks, but will be available >> starting January 5th. >> > Thank you very much. Jan. You are quite welcome :-) Jan
