怎样管理solaris里热插拔设备&〔USB〕

USB Devices

Universal Serial Bus (USB) devices were developed to provide a method to attach peripheral devices such as keyboards, printers, cameras, and disk drives using a common connector and interface. Furthermore, USB devices are hot-pluggable, which means they can be connected or disconnected while the system is running. The operating system automatically detects when a USB device has been connected and automatically configures the operating environment to make it available.

The Solaris 10 operating environment supports USB devices on Sun Blade, Netra, Sunfire, and x86/x64-based system. In addition, a USB interface can be added to Sun systems that may not already have one.

When hot-plugging a USB device, the device is immediately displayed in the device hierarchy. For example, a full device pathname for a USB Zip drive connected to an Ultra system would appear as follows:

/pci@1f,4000/usb@5/storage@1

A printer would look like this:

/pci@1f,4000/usb@5/hub@3/printer@1

Be careful when removing USB devices, however. If the device is being used when it is disconnected, you will get I/O errors and possible data errors. When this happens, you'll need to plug the device back in, stop the application that is using the device, and then unplug the device.

removable media such as floppy diskettes and CD-ROMs can be inserted and automatically mounted. When attaching a hot-pluggable device, it's best to restart vold after attaching the USB device as follows: pkill -HUP vold

Once vold identifies that the device has been connected, you'll see device names set up as follows:

zip1 -> /vol/dev/rdsk/c2t0d0/fat32        (USB Zip device)
zip0 -> /vol/dev/rdsk/c1t0d0/zip100       (USB Zip device)
jaz0 -> /vol/dev/rdsk/c3t0d0/jaz1gb       (USB Jaz device)

When disconnecting a USB device such as a Zip drive, unmount the device, stop vold, disconnect the device, and then restart vold as follows:

1.
Stop any application that is using the device.

2.
Unmount the USB device using the volrmmount command as follows:

volrmmount -e zip0

or the eject command as follows:

eject zip0

zip0 is a nickname for the Zip device. The following nicknames are recognized:

fd          /dev/rdiskette
fd0         /dev/rdiskette
fd1         /dev/rdiskette1
diskette    /dev/rdiskette
diskette0   /dev/rdiskette0
diskette1   /dev/rdiskette1
rdiskette   /dev/rdiskette
rdiskette0  /dev/rdiskette0
rdiskette1  /dev/rdiskette1
floppy      /dev/rdiskette
floppy0     /dev/rdiskette0
floppy1     /dev/rdiskette1
cdrom0      /vol/dev/rdsk/cXtYdZ/label
zip0        /vol/dev/rdsk/cXtYdZ/label
jaz0        /vol/dev/rdsk/cXtYdZ/label
rmdisk0     /vol/dev/rdsk/cXtYdZ/label

The -e option simulates the ejection of the media. For a more up-to-date listing of nicknames that might have been added since this writing, consult the volrmmount man page.

3.
As root, stop vold:

/etc/init.d/volmgt stop

4.
Disconnect the USB device.

5.
Start vold:

/etc/init.d/volmgt start
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值