Re: [Hampshire] Detect USB or SATA drive
On Thu, 30 Apr 2020 at 10:12, Rob Malpass via Hampshire wrote: > It would be useful to me if I could determine (via df -h if poss) which are > usb and which are usb. > > I’ve tried lsusb and lshw -C disk but neither are helping. lshw keeps > telling me they’re all SCSI for example which I know is wrong. They’re all > SATA – it’s just that some are connected via USB, some aren’t. You might also like to try listing /dev/disk/by-path/ For example: $ ls -l /dev/disk/by-path total 0 lrwxrwxrwx. 1 root root 13 Apr 28 21:24 pci-:02:00.0-nvme-1 -> ../../nvme0n1 lrwxrwxrwx. 1 root root 15 Apr 28 21:24 pci-:02:00.0-nvme-1-part1 -> ../../nvme0n1p1 lrwxrwxrwx. 1 root root 15 Apr 28 21:24 pci-:02:00.0-nvme-1-part2 -> ../../nvme0n1p2 lrwxrwxrwx. 1 root root 15 Apr 28 21:24 pci-:02:00.0-nvme-1-part3 -> ../../nvme0n1p3 lrwxrwxrwx. 1 root root 15 Apr 28 21:24 pci-:02:00.0-nvme-1-part4 -> ../../nvme0n1p4 lrwxrwxrwx. 1 root root 15 Apr 28 21:24 pci-:02:00.0-nvme-1-part5 -> ../../nvme0n1p5 lrwxrwxrwx. 1 root root 15 Apr 28 21:24 pci-:02:00.0-nvme-1-part6 -> ../../nvme0n1p6 lrwxrwxrwx. 1 root root 9 Apr 30 21:34 pci-:06:00.3-usb-0:2:1.0-scsi-0:0:0:0 -> ../../sda lrwxrwxrwx. 1 root root 10 Apr 30 21:34 pci-:06:00.3-usb-0:2:1.0-scsi-0:0:0:0-part1 -> ../../sda1 ^^^ `-- bus type here HTH, Chris. -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
Re: [Hampshire] Detect USB or SATA drive
On Thu, 30 Apr 2020 at 10:12, Rob Malpass via Hampshire wrote: > I have about 6 drives connected to my media server. 2 are inside the case > connected by SATA (1 is the OS (Xenial) and the other is media). Then there > are 4 connected externally (in one 4 bay das jbod). > You could try: hdparm -i /dev/sda (Change sda for each device) This will give output like: Model=M4-CT512M4SSD1, FwRev=070H, SerialNo=12310911C3A4 You could then look at the actual HDD to see which serial number each on is. Kind Regards James -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --
[Hampshire] Detect USB or SATA drive
Hi all I need a bit of help identifying drives that I (stupidly) didn't put a sticker on before I initialised them. I have about 6 drives connected to my media server. 2 are inside the case connected by SATA (1 is the OS (Xenial) and the other is media). Then there are 4 connected externally (in one 4 bay das jbod). It would be useful to me if I could determine (via df -h if poss) which are usb and which are usb. I've tried lsusb and lshw -C disk but neither are helping. lshw keeps telling me they're all SCSI for example which I know is wrong. They're all SATA - it's just that some are connected via USB, some aren't. Cheers Rob -- Please post to: Hampshire@mailman.lug.org.uk Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire LUG URL: http://www.hantslug.org.uk --