Unsolved
This post is more than 5 years old
3 Posts
0
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
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
0 events found
No Events found!


stefan_lux
25 Posts
0
March 10th, 2008 09:00
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
sbelisle
3 Posts
0
March 10th, 2008 10:00
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;
stefan_lux
25 Posts
0
March 10th, 2008 11:00
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.
stefan_lux
25 Posts
1
March 10th, 2008 11:00
TOTAL_NUM=`symdisk -sid $SID -cyl list | grep "^DF" | awk '{if ($9 >= 8740) print $9}' | wc -l`
expr $TOTAL_NUM / 2
RRR
6 Operator
•
5.7K Posts
0
March 11th, 2008 03:00
xe2sdc
6 Operator
•
2.8K Posts
0
March 11th, 2008 03:00
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
sbelisle
3 Posts
0
March 11th, 2008 06:00
xe2sdc
6 Operator
•
2.8K Posts
0
March 11th, 2008 09:00
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.
rawstorage
4 Apprentice
•
423 Posts
0
March 11th, 2008 09:00