Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hard drive device name on Solaris

Tags:

solaris

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?

like image 215
Dan Littlejohn Avatar asked Sep 16 '08 23:09

Dan Littlejohn


People also ask

How do I find disk details in Solaris?

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.

How do I see disk size in Solaris 11?

Use the df command to show the amount of free disk space on each mounted disk.


3 Answers

/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.

like image 167
JBB Avatar answered Oct 20 '22 12:10

JBB


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.

like image 26
jlliagre Avatar answered Oct 20 '22 12:10

jlliagre


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.

like image 34
tpgould Avatar answered Oct 20 '22 10:10

tpgould