Unsolved

This post is more than 5 years old

3 Posts

1225

March 10th, 2008 08:00

DMX device creation tool

Hi,

I was wondering if anyone had a script or tool that would take the output of a symdisk (or other symcli cmd) and create an output that would tell you how many devices could be created with existing disk.

ie:

sid 123
Diskgroup1
config=2-way-mir
8gb devs possible = xxx
4gb devs possible = xxx
2gb devs possible = xxx

Right now we are stuck running symconfigure prep's manually for each size and slowly decreasing the device count until it passes. The fragmentation occurred due to previously unrestricted creation/deletion of devices including non-standard sizing.

Any help would be great. Thanks all!

-scott

25 Posts

March 10th, 2008 09:00

Hi,

this is not very comfortable, but it's an quick and easy way...

This gives you the sum of column #9 of the symdisk-Output(the free Cap in MB):
symdisk list | grep "^DF" | awk '{print $9}' | awk '{sum += $1}END{print sum}'

If you add another pipe and devide the result by 1024 you'll get GB:
| awk '{print $1/1024}'

And after all you might devide this result by the required Hyper size
| awk '{NUM2GB = $1/2; printf "%-50s\n", "Number of 2GB Devices:" NUM2GB}'

Perhaps you play around this a little... with a few more seconds to spend this could be put into a shell script... with the addition of variable Hyper sizes and a nice formatted output.

Hope that helps for now?
Stefan

3 Posts

March 10th, 2008 10:00

Right, that will help to get a total for non-protected devices I could create, but what I'm looking for is something to help in verifying protected devices, in this case 2-way-mir. It would need some way to figure in the Sym protection formula used - like diff FA's. buses, spindles, etc.

For instance, my symconfigure file contains the below line. I run it over and over manually again lowering or raising the count=?? value until I can't make devices. Short of writing a script to start at zero and increment by 1 until it failed, is there anything else anyone can think of?

create dev count=?? size=8740, emulation=FBA, config=2-way-mir, disk_group=1;

25 Posts

March 10th, 2008 11:00

sorry... I got it now!

For a quick overview of the total # of free cylinders you might try this:
symconfigure -sid $SID list -freespace -v -units CYLINDERS

But this output will not tell you if there are 8740 free Cyl on every single disk... will think of an intelligent way of finding disks with more than 8740 free Cyls...
As far as I know the only way could be
symdisk -sid $SID -cyl list
and find the disks that contain more than 8740 free Cyls(once again via awk) and count them. After you got the number of disks that countain a sufficient # of Cyls you might devide this by 2 and you'll get the number of 2-Way-Mirrs you are able to create.

25 Posts

March 10th, 2008 11:00

give me one last try...

TOTAL_NUM=`symdisk -sid $SID -cyl list | grep "^DF" | awk '{if ($9 >= 8740) print $9}' | wc -l`
expr $TOTAL_NUM / 2

6 Operator

 • 

5.7K Posts

March 11th, 2008 03:00

Same here. Just trial and error.... Works fine for me. If I need more details, I'll ask my CE to do some digging.

6 Operator

 • 

2.8K Posts

March 11th, 2008 03:00

I think it's hard to tell "awk" how to protect your data in the backend ;-)

If you really want to find the right number of devices you can create, the only way to find the right number is to use "symconfigure preview" and try with different numbers. Just like someone is already doing :D

3 Posts

March 11th, 2008 06:00

Thanks for the work on this Stefanlux, while not the silver bullet I was looking for, it at least gave me a better range of possible dev counts to use =)

6 Operator

 • 

2.8K Posts

March 11th, 2008 09:00

check out emc180481


Nice solution !! But finding the right number of devices is however a complex task ..

As the primus suggests you have to find all available gaps in the backend (symdisk -sid xxx -v -gaps list) and account for a little overhead (4 cyls as per the primus). Having that said, you can't account for mirroring or raid restrictions that may reduce the number of devices you can create.

4 Apprentice

 • 

423 Posts

March 11th, 2008 09:00

check out emc180481, this is for creating save devs to fit into the gaps you have available however the calculation can be adapted to ensure that you are choosing the right device size to fit into the gaps available for other STD device types.

0 events found

No Events found!

Top