I need to figure out the hard drive name for a solaris box and it is not clear to me what the device name is. On linux, it would be something like /dev/hda
or /dev/sda
, but on solaris I am getting a bit lost in the partitions and what the device is called. I think that entries like /dev/rdsk/c0t0d0s0
are the partitions, how is the whole hard drive referenced?
To identify disks, launch the Format utility by issuing the format command. The command displays the disks in the system similar to the following example: # format AVAILABLE DISK SELECTIONS: 0.
Use the df command to show the amount of free disk space on each mounted disk.
/dev/rdsk/c0t0d0s0 means Controller 0, SCSI target (ID) 0, and s means Slice (partition) 0.
Typically, by convention, s2 is the entire disk. This partition overlaps with the other partitions.
prtvtoc /dev/rdsk/c0t0d0s0 will show you the partition table for the disk, to make sure.
If you run Solaris on non SPARC hardware and don't use EFI, the whole hard drive is not c0t0d0s2
but c0t0d0p0
, s2
is in that case just the Solaris primary partition.
What do you want to do to the whole disk? Look at the EXAMPLES section of the man page for the command in question to see how much of a disk name the command requires.
zpool doesn't require a partition, as in: c0t0d0 newfs does: c0t0d0s0 dd would use the whole disk partition: c0t0d0s2
Note: s2 as the entire disk is just a convention. A root user can use the Solaris format command and change the extent of any of the partitions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With