1 2 Previous Next 16 Replies Latest reply on Jul 13, 2010 4:29 AM by David Lipsham

    Migrating Depot NSH Scripts to new File Server.

      Hi guys,

      just after a bit of advice .....

      So I've been running a nre BladeLogic Env for a few months as a proof of concept / trial.

      It's been very sucessful, and I'm now building prod.

       

      The DBA's have imported all the data from the first BladeLogic Core DB into my new Production BladeLogic Core DB, as I had done quite alot of work over the last few months.  I know there may be other / better ways to achieve this, like export / import relavant jobs, but we went for this option initially.

       

      So it all seems to have worked quite well .... except that the NSH scripts in the depot still point to scripts on the olf File Server.

      I want to update the "File Location" property of the script, with the same script that I have copied to the new File Server in my Production Environment.

      Unfortunately it doesn't allow me to update the path.

      If I remove the NSH script from the Depot, it will also remove the dependant jobs and batch jobs I have created.... which = lots of work.

       

      I'm sure there must be people who have come accross this issue before.

      Any ideas would be gratefully considered .....

       

      Thanks

      Dave

        • 1. Re: Migrating Depot NSH Scripts to new File Server.
          Bill Robinson

          I'm assuming you moved file servers too?  There are db scripts to update the file server location in the 'external-files' zip and described in the install pdf under 'using the database to change file servers'

          • 2. Re: Migrating Depot NSH Scripts to new File Server.

            Thanks Bill.

            Is there anything you don't know ? ; - )

             

            Dave

            • 3. Re: Migrating Depot NSH Scripts to new File Server.
              Bill Robinson

              How to automate forum response replies

              • 4. Re: Migrating Depot NSH Scripts to new File Server.

                Hmmmmmm .... the scripts are a great idea ..... but unfortunatley they don't work properly.

                If anyone else has used them sucessfully I would be interested to know.

                In the mean time I have raised a ticket.  I'll feed back any info I get to this thread.

                 

                Dave

                • 5. Re: Migrating Depot NSH Scripts to new File Server.
                  Bill Robinson

                  how are you running them?

                   

                  and how did you change the file server setting, w/ blasadmin?

                  • 6. Re: Migrating Depot NSH Scripts to new File Server.

                    I'm running them using "toad" ........ but the tool doesn't really matter as it's just runing some sql.

                     

                    The scripts change the current File Server setting for you.

                    This part works ok.  What doesn't work is changing all records within the DB that have reference to the old File Server.

                     

                    Essentially I am changing from ....

                     

                    //londblfs01.cmc.local/d/bmc/storage//   

                    to

                    //londprodblfs01.cmc.local/d/bmc/storage/

                     

                    So as per the instructions I run .......

                     

                    @c:\file_server_change_oracle.sql londprodblfs01.cmc.local /d/bmc/storage

                    Which looks like it should change the Current FileServer setting, and also all records with the old setting to the new.

                     

                    So when running the file_server_check_oracle.sql script it shows me.

                     

                    @c:\file_server_check_oracle.sql


                    SHUT DOWN APPSERVER BEFORE RUNNING file_server_change!!!!!
                    1 row selected.

                    SHUT DOWN APPSERVER BEFORE RUNNING file_server_change!!!!!
                    1 row selected.

                    SHUT DOWN APPSERVER BEFORE RUNNING file_server_change!!!!!
                    1 row selected.

                    File Server and root path current setting
                    1 row selected.

                    //londprodblfs01.cmc.local/                                                    
                    1 row selected.

                    Counts of items at File Servers and root paths referenced in the database
                    1 row selected.

                             106
                    //londblfs01.cmc.local/d/bmc/storage//                                         
                                                                                                   
                             459
                    //londprodblfs01.cmc.local/d/bmc/storage/                                      
                                                                                                  

                    2 rows selected.

                     

                    So I still have 106 records with the old setting //londblfs01.cmc.local/d/bmc/storage//  in it.

                     

                    I also followed step 7 , page 35 of the install guide.  Which doesn't make a lot of sense to me, but i still got the same result .......

                    • 7. Re: Migrating Depot NSH Scripts to new File Server.
                      Bill Robinson

                      That looks right, yeah, I'd follow up w/ support.

                       

                      What should happen is that the scripts run to change the file server from the old path to the new, but there are some objects that have the file server path in their location but aren't 'in' the file server (probably the 106 items).  Those might be snapshots or some other objects.

                      • 8. Re: Migrating Depot NSH Scripts to new File Server.

                        I browsed the schema and had a look at the DEPOT_OBJECT table.

                        All the records in this table still have reference to the old FS.

                         

                        example ...

                         

                        //londblfs01.cmc.local/d/bmc/storage//blpackages/Sync-Password-2000006.1

                         

                        I did notice the double forward slash in the path (....storage//blpackages....), maybe this is causing some issues ?

                        • 9. Re: Migrating Depot NSH Scripts to new File Server.
                          Bill Robinson

                          The // might be messing that up, try including that in the path, also, make sure there's a commit run at the end of the script...

                          • 10. Re: Migrating Depot NSH Scripts to new File Server.

                            Yeah, I though the same with regard to the commit ... but it does have one, and the other scripts work ok.

                            I might have to pick the script apart to see exactly what it is doing.  It's possible the // is causing a prob ... but as it's after the FS name and directory it shouldn't really. I'll let u know what I find ... when support finally get back to me : - )

                            • 11. Re: Migrating Depot NSH Scripts to new File Server.

                              Hi David -

                               

                              File server change is confusing for sure. Here's my explanation of it:

                               

                              There are 3 scripts that make up the mechanism to change your file server:

                               

                              1. File server check

                              2. File server change

                              3. File server change system property

                               

                              Start by running "file server check". It tells you your CURRENT file server, plus any other OLD (not currently in use) file servers you have defined.

                               

                              Next, run "file server change" to change your CURRENT fileserver to the NEW file server you want to use. This script only acts on the CURRENT fileserver. It doesn't act on the OLD the fileservers.

                               

                              Next, run "file server change system property" to select one of the OLD fileservers returned by "file server check" to be the CURRENT fileserver. You can only change one of the OLD file servers by first changing it into the CURRENT file server.

                               

                              Next, run "file server check" again to make sure you selected one of the OLD fileserver to be the CURRENT fileserver.

                               

                              Next, run "file server change" to change this CURRENT fileserver (which was formerly one of the OLD fileservers) into the NEW fileserver.

                               

                              Next, run "file server check" again to confirm that one of the old fileservers is now "gone".

                               

                              Next, run "file server change system property" again to select yet another of the OLD fileservers to be the CURRENT fileserver...and repeat the change process as before.

                               

                              You'll get into the "rhythm" of it pretty quick: check, change, set current, check, change, set current, check, change, set current, and so forth until you've coalesced all your fileservers down into the one you want.

                               

                              This process will be much simpler in 8.1....

                               

                              Bryan Gunn

                              • 12. Re: Migrating Depot NSH Scripts to new File Server.

                                Hi Bryan,

                                thanks for the info.

                                OK so I think I get it now ..... finally.

                                 

                                To change a record in the DB that has an old File Server / Path combination in it, you have to first make that File Server / Path combination the current one, and then run step 2.

                                 

                                Thanks for making it simple for me ... I think it needs to be today.

                                 

                                I think I'm still having a problem though ... and the problem is after I run ....

                                 

                                @c:\file_server_change_oracle_system_property.sql londblfs01.cmc.local /d/bmc/storage/

                                 

                                and then show the details with .......

                                @c:\file_server_check_oracle.sql

                                 

                                File Server and root path current setting

                                1 row selected.

                                //londblfs01.cmc.local/

                                1 row selected.

                                Counts of items at File Servers and root paths referenced in the database

                                1 row selected.

                                106

                                //londblfs01.cmc.local/d/bmc/storage//

                                 

                                459

                                //londprodblfs01.cmc.local/d/bmc/storage/

                                 

                                2 rows selected.

                                 

                                 

                                I would expect "File Server and root path current setting" to include the path I specified "/d/bmc/storage/" ...........

                                where as it just shows ....

                                 

                                File Server and root path current setting

                                1 row selected.

                                //londblfs01.cmc.local/

                                • 13. Re: Migrating Depot NSH Scripts to new File Server.

                                  So after further testing I have located the bug ......

                                   

                                  When I run .......

                                   

                                  @c:\file_server_change_oracle_system_property.sql londprodblfs01.cmc.local /d/bmc/storage/

                                   

                                  and then

                                   

                                  @c:\file_server_check_oracle.sql

                                   

                                  I get ....

                                   

                                  File Server and root path current setting

                                  1 row selected.

                                  //londprodblfs01.cmc.local/

                                  1 row selected.

                                  Counts of items at File Servers and root paths referenced in the database

                                  1 row selected.

                                  106

                                  //londprodblfs01.cmc.local/

                                   

                                  459

                                  //londprodblfs01.cmc.local/d/bmc/storage/

                                   

                                  2 rows selected.

                                   

                                  file_server_change_oracle_system_property.sql  has a bug in it.  When I pass it the location "/d/bmc/storage/" it doesn't take that parameter and sets the lcoation to "/".

                                   

                                  Argghhhhhhhhh !

                                  • 14. Re: Migrating Depot NSH Scripts to new File Server.
                                    Bill Robinson

                                    I've had to open up the sql scripts and hard code the path before.

                                    1 2 Previous Next