Originally posted by: SystemAdmin
Hello All!
As promised I am back to update you on the steps/procedures which we ended up using to meet our requirements. We initially pulled in 8 x 500GB Data Direct 9550 LUNs on to an IBM 9117-570 (running 5.3) system with 4 Emulex LP10000 fiber channel cards and an IBM 7039-651 (running 5.2) with 1 Emulex 9802 fiber channel card. If you remember, we needed to create stripe groups with a width of 4 (knowing that in the future we will have to add drives in groups of 4...we are fine with that). So, after I ran cfgmgr we went to pull in the first 4 disks into our new-and-improved volume group with the following command (oh, and a quick note - I tested this on both AIX 5.2 and 5.3 - we were trying to achieve the same results with both 5.2 and 5.3, with the exception of the stripe size (128k versus 2M due to the limitation in AIX 5.2):
-
mkvg -S -y 9550_vg00 hdisk7 hdisk8 hdisk9 hdisk10 (AIX 5.3)
-
mkvg -B -y 9550_vg00 hdisk7 hdisk8 hdisk9 hdisk10 (AIX 5.2)
This created our volume group and pulled in the initial 4 drives (remember, we needed to test our ability to successfully extend this guy out so that is why we didn't add in all 8 drives :-) ). Next, we created the logical volume from the 4 hdisks we added above:
-
mklv -C 4 -S2M -t jfs2 -x 32512 -y 9550_lv00 9550_vg00 7448 (AIX 5.3)
-
mklv -u4 -S128k -t jfs2 -x 32512 -y 9550_lv00 9550_vg00 7448 (AIX 5.2)
You will notice a distinct difference between the 5.2 and 5.2 commands here due to some of the limitations of AIX 5.2 (or at least the limitations the man page said were in effect...specifically the stripe size of 128k versus 2M which the 5.2 man pages say is the limit (128k that is...not the 2M). In fact, if you put in 256k or 512k you will get an error that says "0516-1332 mklv: Stripe size of a logical volume must be less than or equal to the LTG size of the volume group". You might be able to change the LTG I guess under 5.2 but I do not know how...sorry. Also, the 7448 at the end of the command there was found by running "lsvg 9550_vg00" in the FREE PPs: column and since we want to use all the space and use it all now, we put in the full amount shown of 7448.
Okay, so our volume group was created and our logical volume was set up as a stripe and now I created the file system on the logical volume with the following command:
-
crfs -v jfs2 -d /dev/9550_lv00 -m /WESTTEST -A y -p rw -a logname=INLINE (AIX 5.3)
-
crfs -v jfs2 -d /dev/9550_lv00 -m /WESTTEST -A y -p rw -a logname=INLINE (AIX 5.2)
Now, this took about 30 seconds to run (all the previous commands were pretty much instantaneous) and will echo out that the filesystem has been created and the size in kilobytes and then gives you another size but with no annotation as to the metric being displayed...it looks like 512k blocks but I didn't want to waste time doing the math :-) I now mounted up the new filesystem to the mount point listed after the -m option:
-
mount /WESTTEST
A df -g showed that this worked and I had my just-under-two-terrabyte filesystem mounted up and ready for use. Now it was time to practice/test the extension of the filesystem (which is critical with all the large satellite files we produce/keep and space gets used up pretty fast). I used the following series of commands to grow the filesystem on the fly:
-
extendvg 9550_vg00 hdisk11 hdisk12 hdisk13 hdisk14
-
chlv -u 8 9550_lv00
-
time extendlv 9550_lv00 7448 (command ran in 6 seconds)
-
time chfs -a size=+1906688M /TEMPIASI (command ran in 24 seconds)
The chlv command had to be run BEFORE I could extend out the logical volume because of an error I received the very first time I tried which said the following:
0516-1034 lquerypv: Not enough physical partitions in physical volume hdisk7.
0516-788 extendlv: Unable to extend logical volume.
I did some digging on Google (is there any better source :-) ) and found out that the problem was the fact that I had an "UPPER BOUND" of 4. I looked at the manpage for mkvg and mklv and didn't see anything in there (I could have missed it) on how to set that when the vg or lv are created - so I could set it to 32 or 64 or whatever. It looks like it just set it to the number of devices I added when I first created the vg - or it could be related, I guess, to the stripe width of 4...I still need to look into that. Anyway, in order to see what your UPPER BOUND is set to run the following command:
-
lslv 9550_lv00
So, the answer is to increase the UPPER BOUND so that it will allow me to extend the logical volume. I just extended it out to what I needed (in my case 8), but I did test setting it higher and was able to go all the way up to 1024 and when I tried to set it to 2048 I got the following error (which makes pretty obvious the limit to which you can set this parameter :-))):
0516-1203 chlv: The -u parameter for upperbound must be between 1 and 1024
I don't know if there is an adverse affect to setting it to 1024 if I only need 8...that, unfortunately, will require some more testing :-) I then was able to extend the logical volume and then I had to run the chfs command which I will explain:
-
time chfs -a size=+1906688M /WESTTEST (command ran in 24 seconds)
We timed it because we were curious how long it would take to add in ~2TB of storage to an existing filesystem which was mounted up and being used...24 seconds was not bad :-) The size= argument deserves some explanation and we got that number, 1906688M, by running the same command as before when we ran "lsvg 9550_vg00" and then looked at the FREE PPs column and grabbed all the free PPs we could :-) so it was nice not to have to break out a calculator. It was nice that we did this with the filesystem mounted, I/O running to it, and didn't have to unmount it or anything like that...all on the fly!
With the filesystem set up and mounted it was now time to migrate over the data (the fun part I guess :-) ). I decided to go with CPIO and actually found that as a recommended method on the IBM website of all places! Here is the link:
Link:
http://publib.boulder.ibm.com/infocenter/dsichelp/ds8000ic/index.jsp?topic=/com.ibm.storage.ssic.help.doc/f2c_usinglvmdirectcopy_1cug94.html Now, I immediately noticed that CPIO does not support files larger than 2GB and we actually tested that fact and found out that yes, it will throw an error message saying that it cannot read the file and continue on, but we didn't have too many files over 2GB in size and we manually moved them over with a script using the cp command (which we could not find any information that it could NOT handle files 2GB in size or larger and it certainly moved the ones over we needed moved and the data looks good...if I am wrong here, please let me know! :-) Okay, here are the commands I ran to find the files over 2GB in size and then the command (as seen on the IBM web site) to cpio over all the files UNDER 2GB in size :-)
-
cd /WEST
-
find . -size +2000000k -print
-
find . -size +2000000k -print | wc -l (to get a count to compare to later)
-
time find . -print | cpio -pdmuv /WESTTEST (this moved everything UNDER 2GB to the new filesystem)
Well...there you have it! I am not saying it is the most efficient way to get it done, but we are done...and if you are wondering, to move 2.1TB of data mounted under /WEST and stored on a Data Direct S2A8000-series array to the /WESTTEST mount point which had storage from a Data Direct S2A9550-series storage array going through Brocade 24000s took 11.7 hours! Not bad I guess and now it is on to other things...
...and I would like to again thank everyone who took time to respond to my post...it was greatly appreciated and got me going in the right direction. And if you are wondering why I would take so much time to post all of this up, it is in the hopes that some day, someone out there is able to use something in my post to help them out just like I have found so much help in so many posts here...so, your feedback is welcome (especially if something looks completely insane :-) above) and I hope this helps you one day...
Cheers,
Travis