Start a Conversation

Unsolved

This post is more than 5 years old

1621

January 29th, 2008 22:00

Command to find free space in a particular disk group ?

Can anyone provide me the command to find the freespace available in a particular diskgroup.

Some usefull commands which give freespace info but doesnt solve my issue :( :

symconfigure list -freespace -sid XXX
symdev list -sid 752 -da all -space
symdisk list -sid 752


Kindly help me.

Thanks

2.8K Posts

January 29th, 2008 23:00

Unfortunatly right now (with S.E. 6.4.2 AFAIK) there is no "-disk_group" option in symconfigure file. And symdisk is unable to give you grand totals. So you have to work a little with your favourite shell :D

Try to run the following:

symdisk -disk_group $SYM_DG -sid $SID list | grep DF | tr -s " " ":" | cut -f 9 -d ":"

Now you have a long list of numbers. Sum all the values and you'll find the freespace in your disk group :D

76 Posts

January 30th, 2008 00:00

Super Cool !!!!!!!!!!!!!

You rock \m/

Thanks !!!!!! Cheers!!!

2.8K Posts

January 30th, 2008 00:00

The command looks very hot!!!! lol


I'm the king of the shell ;-)

But does no good :( I cant add 300 drives free space!!! :)


Hmmm you can paste them in an excel sheet and add a =SUM($A$1:$A$300) at the very end of the list :D

also I am on windows so grep doesnt work :(

I think that grep is the last of your problems .. On windows almost every command I used will not work unless you install CygWin (an unix-like CLI environment)

This means my problem stays unresolved ?

I think that the answer is YES, 'till you open an RFE (request for enhancement) or you install CygWin.. I think that the later may be faster :D

Cheers !!

2.8K Posts

January 30th, 2008 00:00

:-)

Trust me .. I don't rock .. Simply maybe I use symcli more often then you and love Unix .. so I try to have an unix like environment also on my company laptop :D

76 Posts

January 30th, 2008 00:00

The command looks very hot!!!! lol

But does no good :( I cant add 300 drives free space !!! :)

also I am on windows so grep doesnt work :(
This means my problem stays unresolved ?

Thanks for the help ! Appreciate it...

76 Posts

January 30th, 2008 01:00

Ic...
But i cant install cygwin here due to some reasons :(
I was with EMC as a clariion support engineer
now moved from CX to DMX.!!

2.8K Posts

January 30th, 2008 02:00

Ic...
But i cant install cygwin here due to some reasons :(


I'm sorry .. I have no other options .. Maybe someone else have better ideas :D

I was with EMC as a clariion support engineer
now moved from CX to DMX.!!


Ok ... you are a lucky man :)

Cheers!

1 Rookie

 • 

20.4K Posts

January 30th, 2008 02:00

can you install any tools ? i am trying to find the name of the package that i used a while back. It contained your essential unix command (grep,awk,cat ..etc) and did not require you to install full blown cygwin environment

76 Posts

January 31st, 2008 22:00

No ..

Hey , I am browsing through Storage Scope but thats also not helpful...
Am I wrong ? Or is there a way we can find in ECC storage scope

131 Posts

February 1st, 2008 02:00

Does "symdisk list -by_diskgroup" not give you what you want?

Granted, it doesn't give a total, but as suggested above you can cut & paste the list into Excel & sum the column.

M

32 Posts

February 7th, 2008 16:00

i have done this using Storage scope 5.2 using custom fields.

you have to get the list of devices in each diskgroup(using symcli) and then use the control center "custom field bulk load utility" to associate the diskgroup name to each device.

going through the custom field bulk load utility documentation in powerlink will give you a better idea on this.

Once this is done, it should not be a problem to create a report on free scape in Storage scope.

let me know if you need any more help on this

March 3rd, 2008 09:00

Hello

you can specifiy the disk group in the command line:

symdisk list -disk_group x

where x is the group number. As mentioned before it will not summarize, but you can cut and paste to find out the total space remaining

15 Posts

March 5th, 2008 01:00

I find the 'awk' command useful for this kind of stuff & have a few set commands that
I tend to use for Total/Free reporting :-


First, here's what a straight 'list' command looks like for my disk group to get an idea of the column headings :-
# symdisk -disk_group 3 list
Disks Selected : 240
Capacity(MB)
Ident Symb Int TID Vendor Type Hypers Total Free Actual
------ ---- --- --- ---------- ---------- ------ -------- -------- --------
DF-2A 02A C 7 SEAGATE C146LDF 75 140014 30149 140014
DF-16A 16A C 7 SEAGATE C146LDF 75 140014 30149 140014
DF-2B 02B D 7 SEAGATE C146LDF 75 140014 30149 140014
DF-16B 16B D 7 SEAGATE C146LDF 75 140014 30149 140014
DF-1C 01C D 7 SEAGATE C146LDF 75 140014 30149 140014
DF-15C 15C D 7 SEAGATE C146LDF 75 140014 30149 140014
DF-1D 01D C 7 SEAGATE C146LDF 75 140014 30149 140014
DF-15D 15D C 7 SEAGATE C146LDF 75 140014 30149 140014



Then I'll use awk to add up column nine giving me total space in MB :-
# symdisk -sid 252 -disk_group 3 list|awk '{a += $9};END{print a}'
19432


Or, run the last command & divide the output by 1024 using the 'expr' command so it reports in GB :-
# expr `symdisk -sid 252 -disk_group 3 list|awk '{a += $9};END{print a}'` / 1024
18


The columns in awk start at zero, so if I need to find out the available space I would
use column 8 :-
# expr `symdisk -sid 252 -disk_group 3 list|awk '{a += $8};END{print a}'` / 1024
3281


Again, all of this depends on a *nix shell such as cygwin etc etc.
No Events found!

Top