making a predictable passX name
G. Paul Ziemba
pz-freebsd-scsi at ziemba.us
Fri Jun 24 23:58:30 UTC 2011
bartsch at dssgmbh.de (Alfred Bartsch) writes:
>Am 24.06.2011 16:57, schrieb G. Paul Ziemba:
>> Is there another way to trigger on the attach/detach events for /dev/chX?
>> Or a way to hard-wire assignment of the /dev/passX names?
>>
>You can achieve this behaviour via editing /boot/device.hints:
>...
># SCSI tape peripherals
>#
>hint.scbus.0.at="mpt0"
>hint.scbus.0.bus="0"
>#
># Drive
>hint.sa.0.at="scbus0"
>hint.sa.0.target="4"
>hint.sa.0.lun="0"
>hint.pass.0.at="scbus0"
>hint.pass.0.target="4"
>hint.pass.0.lun="0"
># Changer
>hint.ch.0.at="scbus0"
>hint.ch.0.target="4"
>hint.ch.0.lun="1"
>hint.pass.1.at="scbus0"
>hint.pass.1.target="4"
>hint.pass.1.lun="1"
>#
>all You have to know is:
>- - the SCSI driver (in our case mpt) with its associated bus number (0)
>- - target and lun of drive and changer
>it is then possible to freely choose a pass device number, in this example:
>SCSI_ID 0:4:0 gets pass0 (drive), SCSI_ID 0:4:1 gets pass1 (changer)
>changes take effect after reboot, HTH.
Aha. I only looked at the man page for pass(4); I should have
looked at scsi(4).
Thanks!
--
G. Paul Ziemba
FreeBSD unix:
4:56PM up 41 days, 20:37, 32 users, load averages: 0.89, 0.77, 0.69
More information about the freebsd-scsi
mailing list