Re: How to find driver usage.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-10-14 at 15:52 +0100, Dan Track wrote:
> I've got two disks /dev/sda and /dev/sdb. I'd like to reload the
> driver that they are using. How can I find out what driver is being
> used by them?

The sysfs file system (normally mounted at /sys) is your friend, e.g:

$ ls -l /sys/block/sda/device/driver
lrwxrwxrwx 1 root root 0 2009-10-14 16:16 /sys/block/sda/device/driver
-> ../../../../../../bus/scsi/drivers/sd

But this just tells us that it's being driven by the SCSI disk driver
(sd) which is kinda obvious.

A lot more information is hidden away here however - you can use tools
like udevinfo or systool to trawl the file system and output the
information in a more readable format.

To get all attributes for sda:

$ udevinfo -ap /block/sda

http://pastebin.com/m1fb2047d

To get device attributes for all scsi disks on the system:

$ systool -c scsi_disk -v

http://pastebin.com/m263ebacc

Regards,
Bryn.


-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux