Determine space on a disk


 
Thread Tools Search this Thread
Operating Systems AIX Determine space on a disk
# 1  
Old 12-10-2008
Determine space on a disk

Hello, I am trying to understand how to calculate actual disk space on a logical volume. Based on the output below, how would I convert the total and free PPs to MB and GB? Thank you.


HTML Code:
# lsvg rootvg
VOLUME GROUP:       rootvg                   VG IDENTIFIER:  000a8dac00004c00000000fca4046498
VG STATE:           active                   PP SIZE:        128 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      1092 (139776 megabytes)
MAX LVs:            256                      FREE PPs:       307 (39296 megabytes)
LVs:                18                       USED PPs:       785 (100480 megabytes)
OPEN LVs:           17                       QUORUM:         1
TOTAL PVs:          2                        VG DESCRIPTORS: 3
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         2                        AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size:           128 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable


# lsvg -p rootvg
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            546         232         11..00..03..109..109
hdisk3            active            546         75          15..00..02..00..58

David
# 2  
Old 12-10-2008
David,

All the information you need is given by "# lsvg rootvg"

In your example, the PP size for rootvg is 128 megabytes.

Total PP's for the volume group is 1092, so the total size of the volume group is 128 x 1092, which is 139776 megabytes, (136.5 Gb)

Free PP's is 307, so you have 307 x 1092 megabytes free, which is 39296Mb, or about 38Gb.

Last edited by Tony de Souza; 12-10-2008 at 10:35 AM..
Tony de Souza
# 3  
Old 12-10-2008
Tony, this helps a lot. Did you mean that the free calculation is 307 x 128 instead of 307 x 1092? Thank you kindly.

- David

Last edited by dkranes; 12-10-2008 at 11:14 AM..
# 4  
Old 12-10-2008
Yep, thats exactly what I meant.
Tony de Souza
# 5  
Old 12-11-2008
When a disk is added to a VG it is sliced to pieces of PPsize. These pieces are then added to LVs, quasi one at a time.

Therefore, to find out how much space a disk in a vg provides you can calculate the number of PPs it provides times the size of one such PP.

If you want to know the raw disk size you could try the "size_in_mb" attribute in the device database. Not all disk types support this attribute, however. For example get the size of a 36GB SCSI disk used as "hdisk0":

Code:
root@aix_5_3 # lsdev -l hdisk0
hdisk0 Available 7M-08-00-8,0 16 Bit LVD SCSI Disk Drive

root@aix_5_3 # lsattr -F value -l hdisk0 -a size_in_mb
36400

You could also use the "bootinfo -s" command to get the diskspace. The results differ slightly from the output of "lsattr" because the one reports formatted and the other raw diskspace.

Code:
root@aix_5_3 # bootinfo -s hdisk0
34715

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Determine free space in a Disk device

Version: Solaris 10 (August 2011) on VM I am kind of new to Solaris.From VM workstation i allocated 35 GB to this Solaris VM's Disk The disk was named c1t0d0 Few basic slices for root(8gb), swap(517mb) and /export/home(494mb) were created by the solaris Installer during the... (18 Replies)
Discussion started by: polavan
18 Replies

2. UNIX for Dummies Questions & Answers

How much disk space?

Hi, I have this : uname -a Linux servername 2.6.18-194.11.3.el5PAE #1 SMP Mon Aug 23 15:57:10 EDT 2010 i686 i686 i386 GNU/Linux df -k Sys. de fich. 1K-blocs Occupied Disponible Capacity Monted on /u01/applis 10321208 3190160 6606760 33% /applis Does it mean... (1 Reply)
Discussion started by: big123456
1 Replies

3. Shell Programming and Scripting

disk space

Hi, I am new to shell scripting, and want to monitor disk space using shell script continously on server, which will shoot mail after crossing threshold limit Please suggest. Regards Manoj (1 Reply)
Discussion started by: manoj.solaris
1 Replies

4. AIX

Determine disk space in AIX

Hi I need to extend a FS in AIX but Im not sure on how to calculate the free space Please advise if my math is correct: -------PP SIZE: 64 megabyte(s) --------TOTAL PPs: 1086 (69504 megabytes) so the total size of volume is 64 * 1086 = 69504 MB (695GB) Free PP is-- FREE... (4 Replies)
Discussion started by: hedkandi
4 Replies

5. Filesystems, Disks and Memory

disk space

Hello All- Am new member to this forum. Have some unix experience. But true believer in it compared to windows. Have a question regarding the disk space. I know a command to check the total disk space utilization using: df -k . but what is the command to check the same disk space by... (6 Replies)
Discussion started by: milkyway
6 Replies

6. UNIX for Dummies Questions & Answers

How to determine how much space is available on client machine

Hi, Is there a command to determine how much space is available / used on a client machine ?. Thanks (6 Replies)
Discussion started by: decamposem
6 Replies

7. HP-UX

determine the physical size of the hard disk

Hi is there a cmd in hpux 11 to determine the physical size of the hard disk. not bdf command. i have searched the other threads here but cant find an answer. thank you guys (4 Replies)
Discussion started by: hoffies
4 Replies

8. UNIX for Dummies Questions & Answers

how to determine the disk space usage

how can we determine the disk space used by a certain directory? (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies

9. UNIX for Dummies Questions & Answers

available disk space on disk device???

Hello, Can someone please tell me which command to use to determine the available disk space on a given disk device? I have to write a shell script that compresses files and stores them in a specific location but I am not sure how "conservative" I should be? Thanks in advance! Al. (4 Replies)
Discussion started by: alan
4 Replies

10. UNIX for Dummies Questions & Answers

Out of disk space?

Hi I'm trying to install gcc and the installation program tells me that I'm out of disk space! I have just installed the os (using the default settings for partitions and sizes) and have only installed apache on the machine. Can it really be out of disk space already? How do I check how much... (4 Replies)
Discussion started by: alfabetman
4 Replies
Login or Register to Ask a Question