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 indiv...
  • g_lee's avatar
    15 years ago
    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)