Re: diskgroup calculations
Date: Wed, 14 Jan 2009 17:36:09 -0800 (PST)
On Jan 14, 8:21 pm, just_real <jth..._at_gmail.com> wrote:
> On Jan 15, 12:05 pm, Steve Howard <stevedhow..._at_gmail.com> wrote:
> > On Jan 14, 7:56 pm, just_real <jth..._at_gmail.com> wrote:
> > > Hi
> > > I am using this query to display the size of the diskgroups in Oracle
> > > and manually adding the figures up to get the total size of the
> > > diskgroup.
> > > select b.instance_name, a.LABEL,a.NAME,a.TOTAL_MB,a.GROUP_NUMBER from
> > > v
> > > $asm_disk a, v$asm_client b where a.group_number = b.group_number;
> > > The question I have is:
> > > 1. Is there a better way to work out the calculations of total
> > > diskgroup size?
> > > 2. The above query only works if the diskgroup is managed by ASM. What
> > > would I be doing if there is no ASM? What would I have to change in
> > > the query above?
> > > Thank you.
> > Hi,
> > 1) select total_mb,free_mb from v$asm_diskgroup;
> > 2) I don't understand the question. What diskgroup is not is ASM?
> > Do you mean a disk that is a candidate device, but not part of a
> > diskgroup? I think there is a column for that (state or status, I
> > think), but I don't remember the name. You can filter the correct
> > column in v$asm_disk and sum the bytes to get the total size of
> > devices not allocated.
> > In linux, you can also do a...
> > blockdev --getsize /dev/raw/$RAW_DEVICE_NAME
> > HTH,
> > Steve
> Hi Steve
> Thanks for the prompt reply. Sorry for my terminologies - still a newb
> and just realised that diskgroups = ASM. I think what I was trying to
> ask was how then would i calculate the size for a non-disk group.
> I will try to paint a scenario - I've got A1, A2 are cluster databases
> managed by ASM. Using the query that I had above would give me the
> size of the A diskgroup. But on the same server is B on its own. So I
> guess how would I calculate the size of the B filesystem? (i hope i am
> making sense)
> Thanks again
I'm still not following. Do you mean you have the following raw devices, with their ownership (or lack of) by an ASM diskgroup.
/dev/raw/raw1 - GROUP1 (A in your example) /dev/raw/raw2 - GROUP1 (A in your example) /dev/raw/raw3 - Not part of ASM /dev/raw/raw4 - Not part of ASM /dev/raw/raw5 - GROUP2 (B in your example) /dev/raw/raw6 - GROUP2 (B in your example)
Are GROUP1 and GROUP2 managed by the same ASM instance? The answer should be yes :) If so, then both diskgroups are fully available to any database instance that uses them for storage on that node.
>> But on the same server is B on its own. So I guess how would I calculate the size of the B filesystem?
If you wish to calculate the size of each diskgroup, I would use the v $asm_diskgroup view I mentioned earlier. Also, since you mentioned a filesystem, you can have datafiles in both ASM and on a filesystem. ASM doesn't have to be used exclusively.
HTH, Steve Received on Wed Jan 14 2009 - 19:36:09 CST