# strace hdparm -i /dev/sda
…
ioctl(3, HDIO_GET_IDENTITY, 0x7fffa930c320) = 0
brk(0) = 0x1c42000
brk(0x1c63000) = 0x1c63000
write(1, "\n", 1
) = 1
write(1, " Model=…
So hdparm gets its information from the HDIO_GET_IDENTITY ioctl, not from sysfs. That doesn't mean that the information can't be accessed from sysfs, of course.
Next we can look up HDIO_GET_IDENTITY in the kernel source. LXR is convenient for that. The relevant hit shows a call to ata_get_identity. This function looks up the model in the device description at the offset ATA_ID_PROD in the device description.
Looking at where else ATA_ID_PROD is used, and with sysfs in mind, we find a hit in ide-sysfs.c, in a function called model_show. This function is referenced by the macro call just below DEVICE_ATTR_RO(model), so if the ata driver is exposing the IDE interface, there's a file called model in the device's sysfs directory that contains this information.
If the ata driver is exposing the SCSI interface, tracing the kernel source is a lot more complicated, because the code uses different ways of extracting the information from the hardware. But as it turns out there is also a model field in the device's sysfs directory.
As for where the device's sysfs directory is, there are several ways to access it. The sysfs.txt file in the kernel documentation documents this, not very well. The simplest way to access it is via /sys/block which contains an entry for each block device:
$ cat /sys/block/sda/device/model
There are a lot of symbolic links in /sys. The “physical” location of that directory depends on how the disk is connected to the system; for example it has the form /sys/devices/pci…/…/ata…/host…/target…/… for an ATA device with a SCSI interface that's connected to a PCI bus.