How to figure out if a disk is attached to local SATA ports or part of a JBOD array over an HBA card in Linux (Ubuntu)

If you followed my big write-up about installing an HBA card for the first time in Linux, then you probably know where this post is going.

In my particular setup (Chia Farming) – I have 6x SATA HD’s in the main enclosure and another 12x in an external enclosure. The host machine sees ALL of them as local disks, so my Disks application looks like this:

Ubuntu showing 21 disks on a single machine.

So you can imagine when I see my writes going to /dev/sdm – it’s really hard for me to figure out if that’s a local disk in the host case or one of the disks in the enclosure.

I went digging around for an answer and ran across a bunch of different tips around reading the /etc/fstab – but that has mounts defined by UUID, there is no device-connectivity clarified in there.

Then some suggestions using fdisk -l to varying degrees – but that just showed drive/partition information… in my case they are all the same.

What finally answered my question for me was doing:

ll /sys/block

This dumped a list of all the drives, along with what looks like some form of identifier for how they are connected:

Results of listing /sys/block devices
Screenshot shown for ease-of-viewing

I quickly saw that /dev/sdm-r are actually my local SATA drives and everything else is via the HBA card in the enclosure.


Leave a Comment