Yes, in Korn shell code.
I have a number of disks of differing sizes and a number of disk
groups which contain multiple volumes of different sizes. Disks can
not be shared by diskgroups, but volumes can span disks.
I need a script that will take a list of disks, and the volumes in the
disk groups, and come up with the best fit of disks per disk group
with as little waste as possible and everything fitting. There will
always be enough disk space, so long as the correct disks are put in
the correct disk group. The trick is not to waste space!
Assume that the required information is already in comma delimited
files or tables; ie.
For disks: Disk1,123456 (disk name and it's size in K)
For Volumes: Vol1,Group1,1234 (Volume name, disk group that the volume
is in, Volume size)
Results need to be in a table or file in the form:
DiskGroup1,Disk1,Disk2,Disk3
Variations for improvement are gladly accepted. The target OS is AIX,
but PDL would be preferred for OS specific commands... please
highlight any PDL tho.
Thanks in advance. |