Using diskutil to obtain disk drive info on OS X

To obtain information on the disk drives attached to a Mac OS X system, you can use the diskutil list command, which will show all of the disk drives attached to the system.

Pams-Computer:~ pam$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *250.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            249.7 GB   disk0s2
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *8.0 GB     disk1
   1:                 DOS_FAT_32 SI_IMPRESS              8.0 GB     disk1s1
Pams-Computer:~ pam$

If you want further information on a particular drive you can use the command diskutil info diskn where n designates the drive number, e.g., disk1.

Pams-Computer:~ pam$ diskutil info disk1
   Device Identifier:        disk1
   Device Node:              /dev/disk1
   Part Of Whole:            disk1
   Device / Media Name:      Lexar USB Flash Drive Media

   Volume Name:
   Escaped with Unicode:

   Mounted:                  No

   File System:              None

   Partition Type:           FDisk_partition_scheme
   Bootable:                 Not bootable
   Media Type:               Generic
   Protocol:                 USB
   SMART Status:             Not Supported

   Total Size:               8.0 GB (8017412096 Bytes) (exactly 15659008 512-Byte-Blocks)
   Volume Free Space:        Not Applicable

   Read-Only Media:          No
   Read-Only Volume:         Not applicable (no filesystem)
   Ejectable:                Yes

   Whole:                    Yes
   Internal:                 No
   OS 9 Drivers:             No
   Low Level Format:         Not Supported

Pams-Computer:~ pam$

Some drives support Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T), aka SMART. If a drive does support SMART, you can use tools that can check the SMART status of a drive to see if the drive has hardware problems or may be in danger of an imminent drive failure. You can determine whether a drive supports SMART by using the diskutil info command.

Pams-Computer:~ pam$ diskutil info disk0 | grep SMART
   SMART Status:             Verified
Pams-Computer:~ pam$ diskutil info disk1 | grep SMART
   SMART Status:             Not Supported

If the drive is experiencing hardware problems, you may see a SMART status of "Failing".

$ diskutil info disk0 | grep SMART
   SMART Status:             Failing

If you issue the diskutil command with no parameters, you can see a list of the parameters the command accepts.

Generic Category (English)120x600
Pams-Computer:~ pam$ diskutil
Disk Utility Tool
Utility to manage local disks and volumes
Most options require root access to the device

Usage:  diskutil [quiet] <verb> <options>, where <verb> is as follows:

     list                  (List the partitions of a disk)
     info[rmation]         (Get information on a specific disk or partition)
     listFilesystems       (List file systems available for formatting)

     u[n]mount             (Unmount a single volume)
     unmountDisk           (Unmount an entire disk (all volumes))
     eject                 (Eject a disk)
     mount                 (Mount a single volume)
     mountDisk             (Mount an entire disk (all mountable volumes))

     enableJournal         (Enable HFS+ journaling on a mounted HFS+ volume)
     disableJournal        (Disable HFS+ journaling on a mounted HFS+ volume)
     moveJournal           (Move the HFS+ journal onto another volume)
     enableOwnership       (Treat as exact User/Group IDs for a mounted volume)
     disableOwnership      (Ignore on-disk User/Group IDs for a mounted volume)

     rename[Volume]        (Rename a volume)

     verifyVolume          (Verify the file system data structure of a volume)
     repairVolume          (Repair the file system data structure of a volume)

     verifyPermissions     (Verify the permissions of a Mac OS X volume)
     repairPermissions     (Repair the permissions of a Mac OS X volume)

     eraseDisk             (Erase an existing disk, removing all volumes)
     eraseVolume           (Erase an existing volume)
     eraseOptical          (Erase optical media (CD/RW, DVD/RW, etc.))
     zeroDisk              (Erase a disk, writing zeros to the media)
     randomDisk            (Erase a disk, writing random data to the media)
     secureErase           (Securely erase a disk or freespace on a volume)
     resizeVolume          (Resize a volume, increasing or decreasing its size)

     partitionDisk         ((re)Partition a disk, removing all volumes)
     splitPartition        (Split an existing partition into two or more)
     mergePartitions       (Combine two or more existing partitions into one)

     appleRAID <raidverb>  (Perform additional verbs related to AppleRAID)

diskutil <verb> with no options will provide help on that verb

Pams-Computer:~ pam$

If you wish to see detailed information on a drive that is shown by the diskutil list command, you can add that drive's designator after the command, e.g., diskutil list disk1.

Hide.me 25% discount
Pams-Computer:~ pam$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *250.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            249.7 GB   disk0s2
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *8.0 GB     disk1
   1:                 DOS_FAT_32 SI_IMPRESS              8.0 GB     disk1s1
Pams-Computer:~ pam$ diskutil info disk1
   Device Identifier:        disk1
   Device Node:              /dev/disk1
   Part Of Whole:            disk1
   Device / Media Name:      Lexar USB Flash Drive Media

   Volume Name:
   Escaped with Unicode:

   Mounted:                  No

   File System:              None

   Partition Type:           FDisk_partition_scheme
   Bootable:                 Not bootable
   Media Type:               Generic
   Protocol:                 USB
   SMART Status:             Not Supported

   Total Size:               8.0 GB (8017412096 Bytes) (exactly 15659008 512-Byte-Blocks)
   Volume Free Space:        Not Applicable

   Read-Only Media:          No
   Read-Only Volume:         Not applicable (no filesystem)
   Ejectable:                Yes

   Whole:                    Yes
   Internal:                 No
   OS 9 Drivers:             No
   Low Level Format:         Not Supported

Pams-Computer:~ pam$

References:

  1. Checking SMART Hard Drive Status under OS X
    MoonPoint Support

 

TechRabbit ad 300x250 newegg.com

Justdeals Daily Electronics Deals1x1 px

Valid HTML 4.01 Transitional

Created: Friday July 24, 2015