Forum Discussion

Patm1's avatar
Patm1
Level 2
15 years ago

How do I determine the size of a disk before I add it to a DG?

I have multiple disks that I have done a vxdisksetup on and formatted them as aixdisk.
There are two different sized disks in the lot and I need to figure out how to determine the size of the individual disks before I create the DG.
I am totally new to vxvm and aix. I tried the aix command of lspv and it said the disk contained a veritas volume group.
Can someone tell me the vxvm command and options to give me the size of the disk? Is it somewhere in the output of the vxdisk list output?

thanks,
Patm
  • If you've initialized the disks, you might be able to get an idea of the disk size from the public region length (minus some sectors used for private region and reserved space)

    eg: (from a Solaris machine)
    # vxdisk list <dmname>
    [...]
    public:    slice=3 offset=65793 len=83771135 disk_offset=16384
    private:   slice=3 offset=1 len=65536 disk_offset=16384
    [...]

    so public region length is 83771135 sectors, which gives rough idea of overall disk length (in this case the disk is actually 83853312 sectors, as some additional sectors are reserved and/or used by private region)

    However, this will only work if you've initialized the disks (and assuming it shows same format/similar output as other platforms)

    Safer bet would be to use AIX level commands to see what size AIX sees the disks as first, since this will work regardless of whether you're using VxVM. Believe the following should work:
    # bootinfo -s hdiskX
    edit: can also try: # getconf DISK SIZE /dev/hdiskX
    (both bootinfo and getconf should report size in MB)

3 Replies

  • If you've initialized the disks, you might be able to get an idea of the disk size from the public region length (minus some sectors used for private region and reserved space)

    eg: (from a Solaris machine)
    # vxdisk list <dmname>
    [...]
    public:    slice=3 offset=65793 len=83771135 disk_offset=16384
    private:   slice=3 offset=1 len=65536 disk_offset=16384
    [...]

    so public region length is 83771135 sectors, which gives rough idea of overall disk length (in this case the disk is actually 83853312 sectors, as some additional sectors are reserved and/or used by private region)

    However, this will only work if you've initialized the disks (and assuming it shows same format/similar output as other platforms)

    Safer bet would be to use AIX level commands to see what size AIX sees the disks as first, since this will work regardless of whether you're using VxVM. Believe the following should work:
    # bootinfo -s hdiskX
    edit: can also try: # getconf DISK SIZE /dev/hdiskX
    (both bootinfo and getconf should report size in MB)

  • I always used this script. Maybe it helps too.

    for i in ` vxdisk -o alldgs list | awk '$4=="-" {print $1}'`
    do
    echo $i
    vxdisk list $i | grep "^public:"
    echo "******************************************************************"
    done

    Regards

    Manuel