From df device name to physical drive name (vendor / type)












4















Seeing the device name by df, is it somehow possible to resolve it to the physical drive name such as vendor / type.



/dev/sda3               915.4G     34.9G    880.0G   4% /share/HDA_DATA
/dev/sdd3 1.8T 668.1G 1.1T 36% /share/HDD_DATA


I have learnt that I find some info in sys/block, but I do not find the vendor's type name in there?



-- Added --



My system is a Linux based QNAP NAS, so things might be a little different there.



-- Added as of Steven's answer --



[~] # hdparm -I /dev/sdb3

/dev/sdb3:
HDIO_DRIVE_CMD(identify) failed: Invalid argument









share|improve this question

























  • Maybe you have more luck with dmesg or dmesg | grep -C10 sda.

    – jippie
    Jun 2 '12 at 18:26











  • Or sudo smartctl --all /dev/sda (requires root privileges).

    – jippie
    Jun 2 '12 at 18:27











  • The dmesg approach works, thx. Will rate your answer below as correct, and add a comment.

    – Horst Walter
    Jun 2 '12 at 22:08













  • Similar messages will appear in /var/log/syslog or /var/log/dmesg. Exact file name is highly dependent on distribution.

    – jippie
    Jun 2 '12 at 22:16
















4















Seeing the device name by df, is it somehow possible to resolve it to the physical drive name such as vendor / type.



/dev/sda3               915.4G     34.9G    880.0G   4% /share/HDA_DATA
/dev/sdd3 1.8T 668.1G 1.1T 36% /share/HDD_DATA


I have learnt that I find some info in sys/block, but I do not find the vendor's type name in there?



-- Added --



My system is a Linux based QNAP NAS, so things might be a little different there.



-- Added as of Steven's answer --



[~] # hdparm -I /dev/sdb3

/dev/sdb3:
HDIO_DRIVE_CMD(identify) failed: Invalid argument









share|improve this question

























  • Maybe you have more luck with dmesg or dmesg | grep -C10 sda.

    – jippie
    Jun 2 '12 at 18:26











  • Or sudo smartctl --all /dev/sda (requires root privileges).

    – jippie
    Jun 2 '12 at 18:27











  • The dmesg approach works, thx. Will rate your answer below as correct, and add a comment.

    – Horst Walter
    Jun 2 '12 at 22:08













  • Similar messages will appear in /var/log/syslog or /var/log/dmesg. Exact file name is highly dependent on distribution.

    – jippie
    Jun 2 '12 at 22:16














4












4








4


2






Seeing the device name by df, is it somehow possible to resolve it to the physical drive name such as vendor / type.



/dev/sda3               915.4G     34.9G    880.0G   4% /share/HDA_DATA
/dev/sdd3 1.8T 668.1G 1.1T 36% /share/HDD_DATA


I have learnt that I find some info in sys/block, but I do not find the vendor's type name in there?



-- Added --



My system is a Linux based QNAP NAS, so things might be a little different there.



-- Added as of Steven's answer --



[~] # hdparm -I /dev/sdb3

/dev/sdb3:
HDIO_DRIVE_CMD(identify) failed: Invalid argument









share|improve this question
















Seeing the device name by df, is it somehow possible to resolve it to the physical drive name such as vendor / type.



/dev/sda3               915.4G     34.9G    880.0G   4% /share/HDA_DATA
/dev/sdd3 1.8T 668.1G 1.1T 36% /share/HDD_DATA


I have learnt that I find some info in sys/block, but I do not find the vendor's type name in there?



-- Added --



My system is a Linux based QNAP NAS, so things might be a little different there.



-- Added as of Steven's answer --



[~] # hdparm -I /dev/sdb3

/dev/sdb3:
HDIO_DRIVE_CMD(identify) failed: Invalid argument






linux hard-disk disk-usage block-device






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 54 mins ago









Rui F Ribeiro

41.5k1483140




41.5k1483140










asked Jun 2 '12 at 16:10









Horst WalterHorst Walter

242410




242410













  • Maybe you have more luck with dmesg or dmesg | grep -C10 sda.

    – jippie
    Jun 2 '12 at 18:26











  • Or sudo smartctl --all /dev/sda (requires root privileges).

    – jippie
    Jun 2 '12 at 18:27











  • The dmesg approach works, thx. Will rate your answer below as correct, and add a comment.

    – Horst Walter
    Jun 2 '12 at 22:08













  • Similar messages will appear in /var/log/syslog or /var/log/dmesg. Exact file name is highly dependent on distribution.

    – jippie
    Jun 2 '12 at 22:16



















  • Maybe you have more luck with dmesg or dmesg | grep -C10 sda.

    – jippie
    Jun 2 '12 at 18:26











  • Or sudo smartctl --all /dev/sda (requires root privileges).

    – jippie
    Jun 2 '12 at 18:27











  • The dmesg approach works, thx. Will rate your answer below as correct, and add a comment.

    – Horst Walter
    Jun 2 '12 at 22:08













  • Similar messages will appear in /var/log/syslog or /var/log/dmesg. Exact file name is highly dependent on distribution.

    – jippie
    Jun 2 '12 at 22:16

















Maybe you have more luck with dmesg or dmesg | grep -C10 sda.

– jippie
Jun 2 '12 at 18:26





Maybe you have more luck with dmesg or dmesg | grep -C10 sda.

– jippie
Jun 2 '12 at 18:26













Or sudo smartctl --all /dev/sda (requires root privileges).

– jippie
Jun 2 '12 at 18:27





Or sudo smartctl --all /dev/sda (requires root privileges).

– jippie
Jun 2 '12 at 18:27













The dmesg approach works, thx. Will rate your answer below as correct, and add a comment.

– Horst Walter
Jun 2 '12 at 22:08







The dmesg approach works, thx. Will rate your answer below as correct, and add a comment.

– Horst Walter
Jun 2 '12 at 22:08















Similar messages will appear in /var/log/syslog or /var/log/dmesg. Exact file name is highly dependent on distribution.

– jippie
Jun 2 '12 at 22:16





Similar messages will appear in /var/log/syslog or /var/log/dmesg. Exact file name is highly dependent on distribution.

– jippie
Jun 2 '12 at 22:16










5 Answers
5






active

oldest

votes


















4














sudo lshw -class disk
*-cdrom
description: DVD-RAM writer
product: CDDVDW SH-S223Q
vendor: TSSTcorp
physical id: 0
bus info: scsi@0:0.0.0
logical name: /dev/cdrom
logical name: /dev/cdrw
logical name: /dev/dvd
logical name: /dev/dvdrw
logical name: /dev/sr0
version: SB02
capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
configuration: ansiversion=5 status=ready
*-medium
physical id: 0
logical name: /dev/cdrom
*-disk
description: ATA Disk
product: WDC WD1600AAJS-0
vendor: Western Digital
physical id: 1
bus info: scsi@1:0.0.0
logical name: /dev/sda
version: 01.0
serial: WD-WMAV2P964464
size: 149GiB (160GB)
capabilities: partitioned partitioned:dos
configuration: ansiversion=5 signature=000c0805
*-disk
description: SCSI Disk
physical id: 0.0.0
bus info: scsi@6:0.0.0
logical name: /dev/sdb
size: 931GiB (1TB)
capabilities: partitioned partitioned:dos
configuration: signature=a39eabc7





share|improve this answer
























  • On my QNAP NAS I do not find this lshw command. Checked /sbin /usr/sbin Any idea where else I could find it? I believe you this is working, unfortunately not on my Linux based NAS.

    – Horst Walter
    Jun 2 '12 at 17:54











  • I am using the dmesg approach, as in jippie's comment above. Will rate this as answer anyway, since it is correct.

    – Horst Walter
    Jun 2 '12 at 22:10



















3














The QNAP NAS products run firmware that is essentially a custom Linux distro. It is quite spartan, with a minimal set of command line tools (and many of those provided by busybox). Fortunately, there is a decent implementation of hdparm in there, so you should be able to query a drive, as follows:



hdparm -I /dev/sda


Here's the output I get from a "QNAP TS-239 Pro NAS" with a "Western Digital RE4 1TB" drive (output is verbatim, except for the drive's serial number, which I have purposely obscured):



/dev/sda:

ATA device, with non-removable media
Model Number: WDC WD1003FBYX-01Y7B0
Serial Number: AB-CDEF01234567
Firmware Revision: 01.01V01
Standards:
Supported: 8 7 6 5
Likely used: 8
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63
--
CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 1953525168
device size with M = 1024*1024: 953869 MBytes
device size with M = 1000*1000: 1000204 MBytes (1000 GB)
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, with device specific minimum
R/W multiple sector transfer: Max = 16 Current = 0
Advanced power management level: unknown setting (0x0080)
Recommended acoustic management value: 128, current value: 254
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* NOP cmd
* READ BUFFER cmd
* WRITE BUFFER cmd
* Host Protected Area feature set
* Look-ahead
* Write cache
* Power Management feature set
Security Mode feature set
* SMART feature set
* FLUSH CACHE EXT command
* Mandatory FLUSH CACHE command
* Device Configuration Overlay feature set
* 48-bit Address feature set
* Automatic Acoustic Management feature set
SET MAX security extension
* SET FEATURES subcommand required to spinup after power up
Power-Up In Standby feature set
* Advanced Power Management feature set
* DOWNLOAD MICROCODE cmd
* General Purpose Logging feature set
* SMART self-test
* SMART error logging
Security:
Master password revision code = 65534
supported
not enabled
not locked
not frozen
not expired: security count
supported: enhanced erase
168min for SECURITY ERASE UNIT. 168min for ENHANCED SECURITY ERASE UNIT.
Checksum: correct


"Vendor" and "Type" are not explicitly reported by hdparm. However, "Model Number" is reported, and a quick web search on it should yield anything you need to know about a drive.






share|improve this answer
























  • Sounds good, in my case I do get the following response: HDIO_DRIVE_CMD(identify) failed: Invalid argument Have updated question.

    – Horst Walter
    Jun 2 '12 at 23:31











  • @Horst: Try hdparm -I /dev/sdb instead. /dev/sdb3 is most likely not a drive, but a partition, and hdparm needs a drive.

    – Steven Monday
    Jun 3 '12 at 2:06











  • Thanks for the hint, but no luck. I have tried sda, sdb, sdb3, sda3 etc, all the same issue HDIO_DRIVE_CMD(identify) failed: Invalid argument Run it as admin, which should be root on QNAP, sudo I cannot find (tried sudo hdparm ...)

    – Horst Walter
    Jun 3 '12 at 8:50





















3














Most modern Linux systems use udev to manage devices. This isn't the case on all embedded devices though; I don't know whether this specific device uses udev.



udevadm info -n /dev/sda3 -a
udevadm info -n /dev/sda3 -q property


will print everything the system knows about /dev/sda3. This is the same info you'll find in /sys, but udev does the work of walking down the hierarchy to collect all the data.






share|improve this answer
























  • Again no luck with my QNAP system, udevadm not available. Nevertheless we do have a comprehensive summary of commands here right now, thanks.

    – Horst Walter
    Jun 4 '12 at 8:05



















1














Install gsmartcontrol a GUI tool with loads of information: http://gsmartcontrol.berlios.de/home/images/info_identity.png



gsmartcontrol (1)    - Hard disk drive health inspection tool





share|improve this answer
























  • Useful hint, but the system is a QNAP NAS, I cannot install GUI related tools. Thanks anyway, and sorry that I did not tell this in the question.

    – Horst Walter
    Jun 2 '12 at 17:33



















1














I had this problem too. I discovered command:



/sbin/get_hd_smartinfo



When run with out args prints usage guide.



To connect disk number to device use like this:



/sbin/get_hd_smartinfo -d 2 -i 1



Press ctrl-c to terminate and it will print "Save file to /tmp/sdX_smart_zzzzzzz" where sdX is your device.



[/var/log] # /sbin/get_hd_smartinfo -d 2 -i 1 
001 Raw_Read_Error_Rate 215244560 119 099 006 OK
...
242 Lifetime_Reads_To_Host 23449824883497 100 253 000 OK
^CCatch interrupt Singal,Interrupt ..
Save file to /tmp/sdb_smart_563ffc1c





share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f39886%2ffrom-df-device-name-to-physical-drive-name-vendor-type%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    5 Answers
    5






    active

    oldest

    votes








    5 Answers
    5






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    4














    sudo lshw -class disk
    *-cdrom
    description: DVD-RAM writer
    product: CDDVDW SH-S223Q
    vendor: TSSTcorp
    physical id: 0
    bus info: scsi@0:0.0.0
    logical name: /dev/cdrom
    logical name: /dev/cdrw
    logical name: /dev/dvd
    logical name: /dev/dvdrw
    logical name: /dev/sr0
    version: SB02
    capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
    configuration: ansiversion=5 status=ready
    *-medium
    physical id: 0
    logical name: /dev/cdrom
    *-disk
    description: ATA Disk
    product: WDC WD1600AAJS-0
    vendor: Western Digital
    physical id: 1
    bus info: scsi@1:0.0.0
    logical name: /dev/sda
    version: 01.0
    serial: WD-WMAV2P964464
    size: 149GiB (160GB)
    capabilities: partitioned partitioned:dos
    configuration: ansiversion=5 signature=000c0805
    *-disk
    description: SCSI Disk
    physical id: 0.0.0
    bus info: scsi@6:0.0.0
    logical name: /dev/sdb
    size: 931GiB (1TB)
    capabilities: partitioned partitioned:dos
    configuration: signature=a39eabc7





    share|improve this answer
























    • On my QNAP NAS I do not find this lshw command. Checked /sbin /usr/sbin Any idea where else I could find it? I believe you this is working, unfortunately not on my Linux based NAS.

      – Horst Walter
      Jun 2 '12 at 17:54











    • I am using the dmesg approach, as in jippie's comment above. Will rate this as answer anyway, since it is correct.

      – Horst Walter
      Jun 2 '12 at 22:10
















    4














    sudo lshw -class disk
    *-cdrom
    description: DVD-RAM writer
    product: CDDVDW SH-S223Q
    vendor: TSSTcorp
    physical id: 0
    bus info: scsi@0:0.0.0
    logical name: /dev/cdrom
    logical name: /dev/cdrw
    logical name: /dev/dvd
    logical name: /dev/dvdrw
    logical name: /dev/sr0
    version: SB02
    capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
    configuration: ansiversion=5 status=ready
    *-medium
    physical id: 0
    logical name: /dev/cdrom
    *-disk
    description: ATA Disk
    product: WDC WD1600AAJS-0
    vendor: Western Digital
    physical id: 1
    bus info: scsi@1:0.0.0
    logical name: /dev/sda
    version: 01.0
    serial: WD-WMAV2P964464
    size: 149GiB (160GB)
    capabilities: partitioned partitioned:dos
    configuration: ansiversion=5 signature=000c0805
    *-disk
    description: SCSI Disk
    physical id: 0.0.0
    bus info: scsi@6:0.0.0
    logical name: /dev/sdb
    size: 931GiB (1TB)
    capabilities: partitioned partitioned:dos
    configuration: signature=a39eabc7





    share|improve this answer
























    • On my QNAP NAS I do not find this lshw command. Checked /sbin /usr/sbin Any idea where else I could find it? I believe you this is working, unfortunately not on my Linux based NAS.

      – Horst Walter
      Jun 2 '12 at 17:54











    • I am using the dmesg approach, as in jippie's comment above. Will rate this as answer anyway, since it is correct.

      – Horst Walter
      Jun 2 '12 at 22:10














    4












    4








    4







    sudo lshw -class disk
    *-cdrom
    description: DVD-RAM writer
    product: CDDVDW SH-S223Q
    vendor: TSSTcorp
    physical id: 0
    bus info: scsi@0:0.0.0
    logical name: /dev/cdrom
    logical name: /dev/cdrw
    logical name: /dev/dvd
    logical name: /dev/dvdrw
    logical name: /dev/sr0
    version: SB02
    capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
    configuration: ansiversion=5 status=ready
    *-medium
    physical id: 0
    logical name: /dev/cdrom
    *-disk
    description: ATA Disk
    product: WDC WD1600AAJS-0
    vendor: Western Digital
    physical id: 1
    bus info: scsi@1:0.0.0
    logical name: /dev/sda
    version: 01.0
    serial: WD-WMAV2P964464
    size: 149GiB (160GB)
    capabilities: partitioned partitioned:dos
    configuration: ansiversion=5 signature=000c0805
    *-disk
    description: SCSI Disk
    physical id: 0.0.0
    bus info: scsi@6:0.0.0
    logical name: /dev/sdb
    size: 931GiB (1TB)
    capabilities: partitioned partitioned:dos
    configuration: signature=a39eabc7





    share|improve this answer













    sudo lshw -class disk
    *-cdrom
    description: DVD-RAM writer
    product: CDDVDW SH-S223Q
    vendor: TSSTcorp
    physical id: 0
    bus info: scsi@0:0.0.0
    logical name: /dev/cdrom
    logical name: /dev/cdrw
    logical name: /dev/dvd
    logical name: /dev/dvdrw
    logical name: /dev/sr0
    version: SB02
    capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
    configuration: ansiversion=5 status=ready
    *-medium
    physical id: 0
    logical name: /dev/cdrom
    *-disk
    description: ATA Disk
    product: WDC WD1600AAJS-0
    vendor: Western Digital
    physical id: 1
    bus info: scsi@1:0.0.0
    logical name: /dev/sda
    version: 01.0
    serial: WD-WMAV2P964464
    size: 149GiB (160GB)
    capabilities: partitioned partitioned:dos
    configuration: ansiversion=5 signature=000c0805
    *-disk
    description: SCSI Disk
    physical id: 0.0.0
    bus info: scsi@6:0.0.0
    logical name: /dev/sdb
    size: 931GiB (1TB)
    capabilities: partitioned partitioned:dos
    configuration: signature=a39eabc7






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jun 2 '12 at 16:31









    jippiejippie

    9,08172956




    9,08172956













    • On my QNAP NAS I do not find this lshw command. Checked /sbin /usr/sbin Any idea where else I could find it? I believe you this is working, unfortunately not on my Linux based NAS.

      – Horst Walter
      Jun 2 '12 at 17:54











    • I am using the dmesg approach, as in jippie's comment above. Will rate this as answer anyway, since it is correct.

      – Horst Walter
      Jun 2 '12 at 22:10



















    • On my QNAP NAS I do not find this lshw command. Checked /sbin /usr/sbin Any idea where else I could find it? I believe you this is working, unfortunately not on my Linux based NAS.

      – Horst Walter
      Jun 2 '12 at 17:54











    • I am using the dmesg approach, as in jippie's comment above. Will rate this as answer anyway, since it is correct.

      – Horst Walter
      Jun 2 '12 at 22:10

















    On my QNAP NAS I do not find this lshw command. Checked /sbin /usr/sbin Any idea where else I could find it? I believe you this is working, unfortunately not on my Linux based NAS.

    – Horst Walter
    Jun 2 '12 at 17:54





    On my QNAP NAS I do not find this lshw command. Checked /sbin /usr/sbin Any idea where else I could find it? I believe you this is working, unfortunately not on my Linux based NAS.

    – Horst Walter
    Jun 2 '12 at 17:54













    I am using the dmesg approach, as in jippie's comment above. Will rate this as answer anyway, since it is correct.

    – Horst Walter
    Jun 2 '12 at 22:10





    I am using the dmesg approach, as in jippie's comment above. Will rate this as answer anyway, since it is correct.

    – Horst Walter
    Jun 2 '12 at 22:10













    3














    The QNAP NAS products run firmware that is essentially a custom Linux distro. It is quite spartan, with a minimal set of command line tools (and many of those provided by busybox). Fortunately, there is a decent implementation of hdparm in there, so you should be able to query a drive, as follows:



    hdparm -I /dev/sda


    Here's the output I get from a "QNAP TS-239 Pro NAS" with a "Western Digital RE4 1TB" drive (output is verbatim, except for the drive's serial number, which I have purposely obscured):



    /dev/sda:

    ATA device, with non-removable media
    Model Number: WDC WD1003FBYX-01Y7B0
    Serial Number: AB-CDEF01234567
    Firmware Revision: 01.01V01
    Standards:
    Supported: 8 7 6 5
    Likely used: 8
    Configuration:
    Logical max current
    cylinders 16383 16383
    heads 16 16
    sectors/track 63 63
    --
    CHS current addressable sectors: 16514064
    LBA user addressable sectors: 268435455
    LBA48 user addressable sectors: 1953525168
    device size with M = 1024*1024: 953869 MBytes
    device size with M = 1000*1000: 1000204 MBytes (1000 GB)
    Capabilities:
    LBA, IORDY(can be disabled)
    Queue depth: 32
    Standby timer values: spec'd by Standard, with device specific minimum
    R/W multiple sector transfer: Max = 16 Current = 0
    Advanced power management level: unknown setting (0x0080)
    Recommended acoustic management value: 128, current value: 254
    DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
    Cycle time: min=120ns recommended=120ns
    PIO: pio0 pio1 pio2 pio3 pio4
    Cycle time: no flow control=120ns IORDY flow control=120ns
    Commands/features:
    Enabled Supported:
    * NOP cmd
    * READ BUFFER cmd
    * WRITE BUFFER cmd
    * Host Protected Area feature set
    * Look-ahead
    * Write cache
    * Power Management feature set
    Security Mode feature set
    * SMART feature set
    * FLUSH CACHE EXT command
    * Mandatory FLUSH CACHE command
    * Device Configuration Overlay feature set
    * 48-bit Address feature set
    * Automatic Acoustic Management feature set
    SET MAX security extension
    * SET FEATURES subcommand required to spinup after power up
    Power-Up In Standby feature set
    * Advanced Power Management feature set
    * DOWNLOAD MICROCODE cmd
    * General Purpose Logging feature set
    * SMART self-test
    * SMART error logging
    Security:
    Master password revision code = 65534
    supported
    not enabled
    not locked
    not frozen
    not expired: security count
    supported: enhanced erase
    168min for SECURITY ERASE UNIT. 168min for ENHANCED SECURITY ERASE UNIT.
    Checksum: correct


    "Vendor" and "Type" are not explicitly reported by hdparm. However, "Model Number" is reported, and a quick web search on it should yield anything you need to know about a drive.






    share|improve this answer
























    • Sounds good, in my case I do get the following response: HDIO_DRIVE_CMD(identify) failed: Invalid argument Have updated question.

      – Horst Walter
      Jun 2 '12 at 23:31











    • @Horst: Try hdparm -I /dev/sdb instead. /dev/sdb3 is most likely not a drive, but a partition, and hdparm needs a drive.

      – Steven Monday
      Jun 3 '12 at 2:06











    • Thanks for the hint, but no luck. I have tried sda, sdb, sdb3, sda3 etc, all the same issue HDIO_DRIVE_CMD(identify) failed: Invalid argument Run it as admin, which should be root on QNAP, sudo I cannot find (tried sudo hdparm ...)

      – Horst Walter
      Jun 3 '12 at 8:50


















    3














    The QNAP NAS products run firmware that is essentially a custom Linux distro. It is quite spartan, with a minimal set of command line tools (and many of those provided by busybox). Fortunately, there is a decent implementation of hdparm in there, so you should be able to query a drive, as follows:



    hdparm -I /dev/sda


    Here's the output I get from a "QNAP TS-239 Pro NAS" with a "Western Digital RE4 1TB" drive (output is verbatim, except for the drive's serial number, which I have purposely obscured):



    /dev/sda:

    ATA device, with non-removable media
    Model Number: WDC WD1003FBYX-01Y7B0
    Serial Number: AB-CDEF01234567
    Firmware Revision: 01.01V01
    Standards:
    Supported: 8 7 6 5
    Likely used: 8
    Configuration:
    Logical max current
    cylinders 16383 16383
    heads 16 16
    sectors/track 63 63
    --
    CHS current addressable sectors: 16514064
    LBA user addressable sectors: 268435455
    LBA48 user addressable sectors: 1953525168
    device size with M = 1024*1024: 953869 MBytes
    device size with M = 1000*1000: 1000204 MBytes (1000 GB)
    Capabilities:
    LBA, IORDY(can be disabled)
    Queue depth: 32
    Standby timer values: spec'd by Standard, with device specific minimum
    R/W multiple sector transfer: Max = 16 Current = 0
    Advanced power management level: unknown setting (0x0080)
    Recommended acoustic management value: 128, current value: 254
    DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
    Cycle time: min=120ns recommended=120ns
    PIO: pio0 pio1 pio2 pio3 pio4
    Cycle time: no flow control=120ns IORDY flow control=120ns
    Commands/features:
    Enabled Supported:
    * NOP cmd
    * READ BUFFER cmd
    * WRITE BUFFER cmd
    * Host Protected Area feature set
    * Look-ahead
    * Write cache
    * Power Management feature set
    Security Mode feature set
    * SMART feature set
    * FLUSH CACHE EXT command
    * Mandatory FLUSH CACHE command
    * Device Configuration Overlay feature set
    * 48-bit Address feature set
    * Automatic Acoustic Management feature set
    SET MAX security extension
    * SET FEATURES subcommand required to spinup after power up
    Power-Up In Standby feature set
    * Advanced Power Management feature set
    * DOWNLOAD MICROCODE cmd
    * General Purpose Logging feature set
    * SMART self-test
    * SMART error logging
    Security:
    Master password revision code = 65534
    supported
    not enabled
    not locked
    not frozen
    not expired: security count
    supported: enhanced erase
    168min for SECURITY ERASE UNIT. 168min for ENHANCED SECURITY ERASE UNIT.
    Checksum: correct


    "Vendor" and "Type" are not explicitly reported by hdparm. However, "Model Number" is reported, and a quick web search on it should yield anything you need to know about a drive.






    share|improve this answer
























    • Sounds good, in my case I do get the following response: HDIO_DRIVE_CMD(identify) failed: Invalid argument Have updated question.

      – Horst Walter
      Jun 2 '12 at 23:31











    • @Horst: Try hdparm -I /dev/sdb instead. /dev/sdb3 is most likely not a drive, but a partition, and hdparm needs a drive.

      – Steven Monday
      Jun 3 '12 at 2:06











    • Thanks for the hint, but no luck. I have tried sda, sdb, sdb3, sda3 etc, all the same issue HDIO_DRIVE_CMD(identify) failed: Invalid argument Run it as admin, which should be root on QNAP, sudo I cannot find (tried sudo hdparm ...)

      – Horst Walter
      Jun 3 '12 at 8:50
















    3












    3








    3







    The QNAP NAS products run firmware that is essentially a custom Linux distro. It is quite spartan, with a minimal set of command line tools (and many of those provided by busybox). Fortunately, there is a decent implementation of hdparm in there, so you should be able to query a drive, as follows:



    hdparm -I /dev/sda


    Here's the output I get from a "QNAP TS-239 Pro NAS" with a "Western Digital RE4 1TB" drive (output is verbatim, except for the drive's serial number, which I have purposely obscured):



    /dev/sda:

    ATA device, with non-removable media
    Model Number: WDC WD1003FBYX-01Y7B0
    Serial Number: AB-CDEF01234567
    Firmware Revision: 01.01V01
    Standards:
    Supported: 8 7 6 5
    Likely used: 8
    Configuration:
    Logical max current
    cylinders 16383 16383
    heads 16 16
    sectors/track 63 63
    --
    CHS current addressable sectors: 16514064
    LBA user addressable sectors: 268435455
    LBA48 user addressable sectors: 1953525168
    device size with M = 1024*1024: 953869 MBytes
    device size with M = 1000*1000: 1000204 MBytes (1000 GB)
    Capabilities:
    LBA, IORDY(can be disabled)
    Queue depth: 32
    Standby timer values: spec'd by Standard, with device specific minimum
    R/W multiple sector transfer: Max = 16 Current = 0
    Advanced power management level: unknown setting (0x0080)
    Recommended acoustic management value: 128, current value: 254
    DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
    Cycle time: min=120ns recommended=120ns
    PIO: pio0 pio1 pio2 pio3 pio4
    Cycle time: no flow control=120ns IORDY flow control=120ns
    Commands/features:
    Enabled Supported:
    * NOP cmd
    * READ BUFFER cmd
    * WRITE BUFFER cmd
    * Host Protected Area feature set
    * Look-ahead
    * Write cache
    * Power Management feature set
    Security Mode feature set
    * SMART feature set
    * FLUSH CACHE EXT command
    * Mandatory FLUSH CACHE command
    * Device Configuration Overlay feature set
    * 48-bit Address feature set
    * Automatic Acoustic Management feature set
    SET MAX security extension
    * SET FEATURES subcommand required to spinup after power up
    Power-Up In Standby feature set
    * Advanced Power Management feature set
    * DOWNLOAD MICROCODE cmd
    * General Purpose Logging feature set
    * SMART self-test
    * SMART error logging
    Security:
    Master password revision code = 65534
    supported
    not enabled
    not locked
    not frozen
    not expired: security count
    supported: enhanced erase
    168min for SECURITY ERASE UNIT. 168min for ENHANCED SECURITY ERASE UNIT.
    Checksum: correct


    "Vendor" and "Type" are not explicitly reported by hdparm. However, "Model Number" is reported, and a quick web search on it should yield anything you need to know about a drive.






    share|improve this answer













    The QNAP NAS products run firmware that is essentially a custom Linux distro. It is quite spartan, with a minimal set of command line tools (and many of those provided by busybox). Fortunately, there is a decent implementation of hdparm in there, so you should be able to query a drive, as follows:



    hdparm -I /dev/sda


    Here's the output I get from a "QNAP TS-239 Pro NAS" with a "Western Digital RE4 1TB" drive (output is verbatim, except for the drive's serial number, which I have purposely obscured):



    /dev/sda:

    ATA device, with non-removable media
    Model Number: WDC WD1003FBYX-01Y7B0
    Serial Number: AB-CDEF01234567
    Firmware Revision: 01.01V01
    Standards:
    Supported: 8 7 6 5
    Likely used: 8
    Configuration:
    Logical max current
    cylinders 16383 16383
    heads 16 16
    sectors/track 63 63
    --
    CHS current addressable sectors: 16514064
    LBA user addressable sectors: 268435455
    LBA48 user addressable sectors: 1953525168
    device size with M = 1024*1024: 953869 MBytes
    device size with M = 1000*1000: 1000204 MBytes (1000 GB)
    Capabilities:
    LBA, IORDY(can be disabled)
    Queue depth: 32
    Standby timer values: spec'd by Standard, with device specific minimum
    R/W multiple sector transfer: Max = 16 Current = 0
    Advanced power management level: unknown setting (0x0080)
    Recommended acoustic management value: 128, current value: 254
    DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
    Cycle time: min=120ns recommended=120ns
    PIO: pio0 pio1 pio2 pio3 pio4
    Cycle time: no flow control=120ns IORDY flow control=120ns
    Commands/features:
    Enabled Supported:
    * NOP cmd
    * READ BUFFER cmd
    * WRITE BUFFER cmd
    * Host Protected Area feature set
    * Look-ahead
    * Write cache
    * Power Management feature set
    Security Mode feature set
    * SMART feature set
    * FLUSH CACHE EXT command
    * Mandatory FLUSH CACHE command
    * Device Configuration Overlay feature set
    * 48-bit Address feature set
    * Automatic Acoustic Management feature set
    SET MAX security extension
    * SET FEATURES subcommand required to spinup after power up
    Power-Up In Standby feature set
    * Advanced Power Management feature set
    * DOWNLOAD MICROCODE cmd
    * General Purpose Logging feature set
    * SMART self-test
    * SMART error logging
    Security:
    Master password revision code = 65534
    supported
    not enabled
    not locked
    not frozen
    not expired: security count
    supported: enhanced erase
    168min for SECURITY ERASE UNIT. 168min for ENHANCED SECURITY ERASE UNIT.
    Checksum: correct


    "Vendor" and "Type" are not explicitly reported by hdparm. However, "Model Number" is reported, and a quick web search on it should yield anything you need to know about a drive.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jun 2 '12 at 22:49









    Steven MondaySteven Monday

    1,173911




    1,173911













    • Sounds good, in my case I do get the following response: HDIO_DRIVE_CMD(identify) failed: Invalid argument Have updated question.

      – Horst Walter
      Jun 2 '12 at 23:31











    • @Horst: Try hdparm -I /dev/sdb instead. /dev/sdb3 is most likely not a drive, but a partition, and hdparm needs a drive.

      – Steven Monday
      Jun 3 '12 at 2:06











    • Thanks for the hint, but no luck. I have tried sda, sdb, sdb3, sda3 etc, all the same issue HDIO_DRIVE_CMD(identify) failed: Invalid argument Run it as admin, which should be root on QNAP, sudo I cannot find (tried sudo hdparm ...)

      – Horst Walter
      Jun 3 '12 at 8:50





















    • Sounds good, in my case I do get the following response: HDIO_DRIVE_CMD(identify) failed: Invalid argument Have updated question.

      – Horst Walter
      Jun 2 '12 at 23:31











    • @Horst: Try hdparm -I /dev/sdb instead. /dev/sdb3 is most likely not a drive, but a partition, and hdparm needs a drive.

      – Steven Monday
      Jun 3 '12 at 2:06











    • Thanks for the hint, but no luck. I have tried sda, sdb, sdb3, sda3 etc, all the same issue HDIO_DRIVE_CMD(identify) failed: Invalid argument Run it as admin, which should be root on QNAP, sudo I cannot find (tried sudo hdparm ...)

      – Horst Walter
      Jun 3 '12 at 8:50



















    Sounds good, in my case I do get the following response: HDIO_DRIVE_CMD(identify) failed: Invalid argument Have updated question.

    – Horst Walter
    Jun 2 '12 at 23:31





    Sounds good, in my case I do get the following response: HDIO_DRIVE_CMD(identify) failed: Invalid argument Have updated question.

    – Horst Walter
    Jun 2 '12 at 23:31













    @Horst: Try hdparm -I /dev/sdb instead. /dev/sdb3 is most likely not a drive, but a partition, and hdparm needs a drive.

    – Steven Monday
    Jun 3 '12 at 2:06





    @Horst: Try hdparm -I /dev/sdb instead. /dev/sdb3 is most likely not a drive, but a partition, and hdparm needs a drive.

    – Steven Monday
    Jun 3 '12 at 2:06













    Thanks for the hint, but no luck. I have tried sda, sdb, sdb3, sda3 etc, all the same issue HDIO_DRIVE_CMD(identify) failed: Invalid argument Run it as admin, which should be root on QNAP, sudo I cannot find (tried sudo hdparm ...)

    – Horst Walter
    Jun 3 '12 at 8:50







    Thanks for the hint, but no luck. I have tried sda, sdb, sdb3, sda3 etc, all the same issue HDIO_DRIVE_CMD(identify) failed: Invalid argument Run it as admin, which should be root on QNAP, sudo I cannot find (tried sudo hdparm ...)

    – Horst Walter
    Jun 3 '12 at 8:50













    3














    Most modern Linux systems use udev to manage devices. This isn't the case on all embedded devices though; I don't know whether this specific device uses udev.



    udevadm info -n /dev/sda3 -a
    udevadm info -n /dev/sda3 -q property


    will print everything the system knows about /dev/sda3. This is the same info you'll find in /sys, but udev does the work of walking down the hierarchy to collect all the data.






    share|improve this answer
























    • Again no luck with my QNAP system, udevadm not available. Nevertheless we do have a comprehensive summary of commands here right now, thanks.

      – Horst Walter
      Jun 4 '12 at 8:05
















    3














    Most modern Linux systems use udev to manage devices. This isn't the case on all embedded devices though; I don't know whether this specific device uses udev.



    udevadm info -n /dev/sda3 -a
    udevadm info -n /dev/sda3 -q property


    will print everything the system knows about /dev/sda3. This is the same info you'll find in /sys, but udev does the work of walking down the hierarchy to collect all the data.






    share|improve this answer
























    • Again no luck with my QNAP system, udevadm not available. Nevertheless we do have a comprehensive summary of commands here right now, thanks.

      – Horst Walter
      Jun 4 '12 at 8:05














    3












    3








    3







    Most modern Linux systems use udev to manage devices. This isn't the case on all embedded devices though; I don't know whether this specific device uses udev.



    udevadm info -n /dev/sda3 -a
    udevadm info -n /dev/sda3 -q property


    will print everything the system knows about /dev/sda3. This is the same info you'll find in /sys, but udev does the work of walking down the hierarchy to collect all the data.






    share|improve this answer













    Most modern Linux systems use udev to manage devices. This isn't the case on all embedded devices though; I don't know whether this specific device uses udev.



    udevadm info -n /dev/sda3 -a
    udevadm info -n /dev/sda3 -q property


    will print everything the system knows about /dev/sda3. This is the same info you'll find in /sys, but udev does the work of walking down the hierarchy to collect all the data.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jun 3 '12 at 23:00









    GillesGilles

    542k12810991616




    542k12810991616













    • Again no luck with my QNAP system, udevadm not available. Nevertheless we do have a comprehensive summary of commands here right now, thanks.

      – Horst Walter
      Jun 4 '12 at 8:05



















    • Again no luck with my QNAP system, udevadm not available. Nevertheless we do have a comprehensive summary of commands here right now, thanks.

      – Horst Walter
      Jun 4 '12 at 8:05

















    Again no luck with my QNAP system, udevadm not available. Nevertheless we do have a comprehensive summary of commands here right now, thanks.

    – Horst Walter
    Jun 4 '12 at 8:05





    Again no luck with my QNAP system, udevadm not available. Nevertheless we do have a comprehensive summary of commands here right now, thanks.

    – Horst Walter
    Jun 4 '12 at 8:05











    1














    Install gsmartcontrol a GUI tool with loads of information: http://gsmartcontrol.berlios.de/home/images/info_identity.png



    gsmartcontrol (1)    - Hard disk drive health inspection tool





    share|improve this answer
























    • Useful hint, but the system is a QNAP NAS, I cannot install GUI related tools. Thanks anyway, and sorry that I did not tell this in the question.

      – Horst Walter
      Jun 2 '12 at 17:33
















    1














    Install gsmartcontrol a GUI tool with loads of information: http://gsmartcontrol.berlios.de/home/images/info_identity.png



    gsmartcontrol (1)    - Hard disk drive health inspection tool





    share|improve this answer
























    • Useful hint, but the system is a QNAP NAS, I cannot install GUI related tools. Thanks anyway, and sorry that I did not tell this in the question.

      – Horst Walter
      Jun 2 '12 at 17:33














    1












    1








    1







    Install gsmartcontrol a GUI tool with loads of information: http://gsmartcontrol.berlios.de/home/images/info_identity.png



    gsmartcontrol (1)    - Hard disk drive health inspection tool





    share|improve this answer













    Install gsmartcontrol a GUI tool with loads of information: http://gsmartcontrol.berlios.de/home/images/info_identity.png



    gsmartcontrol (1)    - Hard disk drive health inspection tool






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jun 2 '12 at 16:36









    jippiejippie

    9,08172956




    9,08172956













    • Useful hint, but the system is a QNAP NAS, I cannot install GUI related tools. Thanks anyway, and sorry that I did not tell this in the question.

      – Horst Walter
      Jun 2 '12 at 17:33



















    • Useful hint, but the system is a QNAP NAS, I cannot install GUI related tools. Thanks anyway, and sorry that I did not tell this in the question.

      – Horst Walter
      Jun 2 '12 at 17:33

















    Useful hint, but the system is a QNAP NAS, I cannot install GUI related tools. Thanks anyway, and sorry that I did not tell this in the question.

    – Horst Walter
    Jun 2 '12 at 17:33





    Useful hint, but the system is a QNAP NAS, I cannot install GUI related tools. Thanks anyway, and sorry that I did not tell this in the question.

    – Horst Walter
    Jun 2 '12 at 17:33











    1














    I had this problem too. I discovered command:



    /sbin/get_hd_smartinfo



    When run with out args prints usage guide.



    To connect disk number to device use like this:



    /sbin/get_hd_smartinfo -d 2 -i 1



    Press ctrl-c to terminate and it will print "Save file to /tmp/sdX_smart_zzzzzzz" where sdX is your device.



    [/var/log] # /sbin/get_hd_smartinfo -d 2 -i 1 
    001 Raw_Read_Error_Rate 215244560 119 099 006 OK
    ...
    242 Lifetime_Reads_To_Host 23449824883497 100 253 000 OK
    ^CCatch interrupt Singal,Interrupt ..
    Save file to /tmp/sdb_smart_563ffc1c





    share|improve this answer




























      1














      I had this problem too. I discovered command:



      /sbin/get_hd_smartinfo



      When run with out args prints usage guide.



      To connect disk number to device use like this:



      /sbin/get_hd_smartinfo -d 2 -i 1



      Press ctrl-c to terminate and it will print "Save file to /tmp/sdX_smart_zzzzzzz" where sdX is your device.



      [/var/log] # /sbin/get_hd_smartinfo -d 2 -i 1 
      001 Raw_Read_Error_Rate 215244560 119 099 006 OK
      ...
      242 Lifetime_Reads_To_Host 23449824883497 100 253 000 OK
      ^CCatch interrupt Singal,Interrupt ..
      Save file to /tmp/sdb_smart_563ffc1c





      share|improve this answer


























        1












        1








        1







        I had this problem too. I discovered command:



        /sbin/get_hd_smartinfo



        When run with out args prints usage guide.



        To connect disk number to device use like this:



        /sbin/get_hd_smartinfo -d 2 -i 1



        Press ctrl-c to terminate and it will print "Save file to /tmp/sdX_smart_zzzzzzz" where sdX is your device.



        [/var/log] # /sbin/get_hd_smartinfo -d 2 -i 1 
        001 Raw_Read_Error_Rate 215244560 119 099 006 OK
        ...
        242 Lifetime_Reads_To_Host 23449824883497 100 253 000 OK
        ^CCatch interrupt Singal,Interrupt ..
        Save file to /tmp/sdb_smart_563ffc1c





        share|improve this answer













        I had this problem too. I discovered command:



        /sbin/get_hd_smartinfo



        When run with out args prints usage guide.



        To connect disk number to device use like this:



        /sbin/get_hd_smartinfo -d 2 -i 1



        Press ctrl-c to terminate and it will print "Save file to /tmp/sdX_smart_zzzzzzz" where sdX is your device.



        [/var/log] # /sbin/get_hd_smartinfo -d 2 -i 1 
        001 Raw_Read_Error_Rate 215244560 119 099 006 OK
        ...
        242 Lifetime_Reads_To_Host 23449824883497 100 253 000 OK
        ^CCatch interrupt Singal,Interrupt ..
        Save file to /tmp/sdb_smart_563ffc1c






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 9 '15 at 2:01









        user3489409user3489409

        6113




        6113






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f39886%2ffrom-df-device-name-to-physical-drive-name-vendor-type%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt