1833379 Members
3649 Online
110052 Solutions
New Discussion

commande

 
kacou
Regular Advisor

commande

How can I calculate the size available of a disc?
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor

Re: commande

Hi:

If you mean a physical disk, then:

# diskinfo /dev/rdsk/cXtYdZ

...note the *raw* device.

Regards!

...JRF...
Tingli
Esteemed Contributor

Re: commande

If it is in lvm, then vgdisplay -v vg** shows the available disk space in the end of the output, such as:

--- Physical volumes ---
PV Name /dev/dsk/c0t0d0s2
PV Status available
Total PE 979
Free PE 32
Autoswitch On
Proactive Polling On

Need to multiply the Free PE with the PE Size (Mbytes) to get the real size of the available space.
James R. Ferguson
Acclaimed Contributor

Re: commande

Hi (again):

In all of your recent questions (of which most you have yet to evaluate (score)), we have reminded you to *be* *specific* in your question.

Here, does "disk" mean a whole physical disk or does it mean a LVM volume (of one or more physical disks) or does it mean available space in a volume group, or logical volume?

The better *you* frame the question and the more details you provide, the better the answer(s) you will receive!

...JRF...
kacou
Regular Advisor

Re: commande

It means LV in a volume group
James R. Ferguson
Acclaimed Contributor

Re: commande

Hi:

> It means LV in a volume group

Well then:

# lvdisplay

...will *show* you the size.

Regards!

...JRF...
Tingli
Esteemed Contributor

Re: commande

bdf will work.
Torsten.
Acclaimed Contributor

Re: commande

You want to know the size of an LVOL?

# lvdisplay -v /dev/vg00/lvol1|more
--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 300
...

This LVOL is 300 MB.


This is the size of the disk:

# diskinfo /dev/rdsk/c0t6d0
SCSI describe of /dev/rdsk/c0t6d0:
vendor: SEAGATE
product id: ST39236LW
type: direct access
size: 8886762 Kbytes
bytes per sector: 512

It's a 9GB disk.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!