Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get disksize?

Isaac_4
Frequent Advisor

How to get disksize?

Hi to all:

I want to know who can see the size disks there are installed in my Tru64 box.

Thank you !!!
The time is gold
6 REPLIES
Ravi_8
Honored Contributor

Re: How to get disksize?

Hi,

"sysconfig" can give you the entire system information. another way is by using "diskconfig",Looking into each disk will show you the disk size

never give up
Venkatesh BL
Honored Contributor

Re: How to get disksize?

On my system, I see that disklabel, diskconfig and sysconfig are executable by user "bin" and group "bin". So, I guess anyone belonging to this group would be able to see the disk size.
Joakim Brosten
Frequent Advisor

Re: How to get disksize?

You can find out which diskdevices that are configurated in the system by "hwmgr -show scsi"
Then, by using "disklabel -r dsk(the-disk-device-number-from-above-command) will show you the size of the disks as well as the partitions. (i.e. "disklabel -r dsk5")

/JB
Ralf Puchner
Honored Contributor

Re: How to get disksize?

disklabel -r/df is the right command if you will get only the size. A "partition" can also consist of virtuell parititions so physical device information is irrelevant in this case.

If you need the hardware (disktype etc.)information etc. use the other commands given in previous postings. Btw. if a san or disk array is used the information must be got on the storage controller itself.
Help() { FirstReadManual(urgently); Go_to_it;; }
Johan Brusche
Honored Contributor

Re: How to get disksize?


If the disk is already partioned with disklabel, then try:

disklabel dsk99 | grep " c:" | awk 'print $2/2048}'

It gives you the size in megabytes.

If the disk is not yet partitioned, then use:

hwmgr get attrib -id 123 | grep capacity | awk '{print $3/2048}'

__ Johan ;-)

_JB_
Han Pilmeyer
Esteemed Contributor

Re: How to get disksize?

Note that using disklabel may return stale information. Modern disk sub systems allow the size of a LUN to be changed dynamically. This change is not reflected in the disklabel.

Therefore I suggest to use the 2nd command suggested by Johan.

If you are really desparate to get the latest information from the storage device, then you can use the "show capacity" command in "scu". This will query the device.