Welcome to the Linux Foundation Forum!

How to identify the driver associated with a major number?

Options
DJCerdas
DJCerdas Posts: 2
edited June 2020 in Drivers

Trying to get familiar with HFS and /dev FS in particular, after listed a block/character device I saw the major(driver) and minor(id of the device) number but I was trying to find out what is exactly the driver associated?, I tried to find my own, ended up sharing the question in this Forum.

# egrep "major|sda1" /proc/partitions
major minor #blocks name
8 1 1048576 sda1

Comments

  • DJCerdas
    DJCerdas Posts: 2
    edited June 2020
    Options

    After Some more research, I think I found an answer:

    # lsscsi
    [1:0:0:0] cd/dvd VBOX CD-ROM 1.0 /dev/sr0
    [2:0:0:0] disk ATA VBOX HARDDISK 1.0 /dev/sda <-- my disk
    # lspci | egrep ATA
    00:0d.0 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 02)
    # lspci -v -s 00:0d.0 |egrep Kernel
    Kernel driver in use: ahci
    Kernel modules: ahci
    # modinfo ahci| head -3
    filename: /lib/modules/3.10.0-1127.el7.x86_64/kernel/drivers/ata/ahci.ko.xz
    version: 3.0
    license: GPL

Categories

Upcoming Training