AIXSPadmin
MIS
Everyone here is helpful in pointing me in the correct direction with help in C coding since I am not an expert in this area, and 99% of what I do can be done in shell. However, I have something else that I am thinking needs multi-dimensional arrays since it involves a table.
What I intend is if someone type in the size of filesystem they want, say 2GB and then they type in the size of the physical partition say 16MB, it will return 128 which is the number of logical partitions needed to create the logical volume of 2GB.
Thanks for the help.
The table I intend to use is:
GB MB KB 512blk 4MB-PP 8MB-PP 16MB-PP 32MB-PP 64MB-PP
0.125 128 131072 262144 32 16 8 4
0.25 256 262144 524288 64 32 16 8
0.375 384 393216 786432 96 48 24 12
0.5 512 524288 1048576 128 64 32 16
0.625 640 655360 1310720 160 80 40 20
0.75 768 786432 1572864 192 96 48 24
0.875 896 917504 1835008 224 112 58 28
1 1024 1048576 2097152 256 128 64 32
1.125 1152 1179648 2359296 288 144 72 36
1.25 1280 1310720 2621440 320 160 80 40
1.375 1408 1441792 2883584 352 176 88 44
1.5 1536 1572864 3145728 384 192 96 48
1.625 1664 1703936 3407872 416 208 104 52
1.75 1792 1835008 3670016 448 224 112 56
1.875 1920 1966080 3932160 480 240 120 60
2 2048 2097152 4194304 512 256 128 64
2.125 2176 2228224 4456448 544 272 136 68
2.25 2304 2359296 4718592 576 288 144 72
2.375 2432 2490368 4980736 608 304 152 76
2.5 2560 2621440 5242880 640 320 160 80
2.625 2688 2752512 5505024 672 336 168 84
2.75 2816 2883584 5767168 704 352 176 88
2.875 2944 3014656 6029312 736 368 184 92
3 3072 3145728 6291456 768 384 192 96
3.125 3200 3276800 6553600 800 400 200 100
3.25 3328 3407872 6815744 832 416 208 104
3.375 3456 3538944 7077888 864 432 216 108
3.5 3584 3670016 7340032 896 448 224 112
3.625 3712 3801088 7602176 928 464 232 116
3.75 3840 3932160 7864320 960 480 240 120
3.875 3968 4063232 8126464 992 496 248 124
4 4096 4194304 8388608 1024 512 256 128
What I intend is if someone type in the size of filesystem they want, say 2GB and then they type in the size of the physical partition say 16MB, it will return 128 which is the number of logical partitions needed to create the logical volume of 2GB.
Thanks for the help.
The table I intend to use is:
GB MB KB 512blk 4MB-PP 8MB-PP 16MB-PP 32MB-PP 64MB-PP
0.125 128 131072 262144 32 16 8 4
0.25 256 262144 524288 64 32 16 8
0.375 384 393216 786432 96 48 24 12
0.5 512 524288 1048576 128 64 32 16
0.625 640 655360 1310720 160 80 40 20
0.75 768 786432 1572864 192 96 48 24
0.875 896 917504 1835008 224 112 58 28
1 1024 1048576 2097152 256 128 64 32
1.125 1152 1179648 2359296 288 144 72 36
1.25 1280 1310720 2621440 320 160 80 40
1.375 1408 1441792 2883584 352 176 88 44
1.5 1536 1572864 3145728 384 192 96 48
1.625 1664 1703936 3407872 416 208 104 52
1.75 1792 1835008 3670016 448 224 112 56
1.875 1920 1966080 3932160 480 240 120 60
2 2048 2097152 4194304 512 256 128 64
2.125 2176 2228224 4456448 544 272 136 68
2.25 2304 2359296 4718592 576 288 144 72
2.375 2432 2490368 4980736 608 304 152 76
2.5 2560 2621440 5242880 640 320 160 80
2.625 2688 2752512 5505024 672 336 168 84
2.75 2816 2883584 5767168 704 352 176 88
2.875 2944 3014656 6029312 736 368 184 92
3 3072 3145728 6291456 768 384 192 96
3.125 3200 3276800 6553600 800 400 200 100
3.25 3328 3407872 6815744 832 416 208 104
3.375 3456 3538944 7077888 864 432 216 108
3.5 3584 3670016 7340032 896 448 224 112
3.625 3712 3801088 7602176 928 464 232 116
3.75 3840 3932160 7864320 960 480 240 120
3.875 3968 4063232 8126464 992 496 248 124
4 4096 4194304 8388608 1024 512 256 128