Operating System - HP-UX
1753546 Members
5624 Online
108795 Solutions
New Discussion юеВ

Re: Duplicating directory structure problems

 
SOLVED
Go to solution
Beannie
Advisor

Duplicating directory structure problems

Made a separate file system (with more space) named /DataProtector and did a cpio of /opt/omni over to this file system. I tested by trying to shutdown omni services and got below output:

Dec-13 sys: /opt/omni-old/sbin/omnisv.sh -stop

/usr/lib/hpux32/dld.so: Unable to find library 'libBrandChg.so'.
Killed

The cpio command I used was:
cd /opt/omni
find . print | cpio -pdml /DataProtector

When I list my directory from each location, there is a difference
ORIGINAL /opt/omni:
Dec-13 ngwiDB: ls -al
total 1104
drwxr-xr-x 12 root sys 8192 Sep 28 10:58 .
dr-xr-xr-x 79 bin bin 8192 Dec 13 12:51 ..
-rw-r--r-- 1 root sys 4289 Sep 15 2009 .CII_CC
-rw-r--r-- 1 root sys 1442 Sep 15 2009 .CII_CORE
-rw-r--r-- 1 root sys 3429 Sep 15 2009 .CII_CORE-IS
-rw-r--r-- 1 root sys 21439 Sep 15 2009 .CII_CS
-rw-r--r-- 1 root sys 286 Sep 15 2009 .CII_DA
-rw-r--r-- 1 root sys 218881 Sep 15 2009 .CII_DOCS
-rw-r--r-- 1 root sys 605 Aug 4 2006 .CII_DOCUMENTS
-rw-r--r-- 1 root sys 1616 Sep 15 2009 .CII_JAVAGUI
-rw-r--r-- 1 root sys 482 Sep 15 2009 .CII_MA
-rwxrwxr-x 1 root sys 3 Aug 25 2009 .Version
-r--r--r-- 1 root sys 93195 Aug 25 2009 .omnirc.TMPL
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_cc
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_core
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_cs
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_da
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_docs
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_javagui
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_ma
drwxr-xr-x 3 root sys 96 Nov 12 12:16 acs
drwxr-xr-x 2 root sys 8192 Sep 28 11:00 bin
drwxr-xr-x 4 root sys 96 Apr 2 2008 databases
drwxr-xr-x 3 root sys 96 Apr 2 2008 doc
drwxr-xr-x 3 root sys 96 Sep 28 10:58 help
drwxr-xr-x 5 root sys 96 Sep 28 10:58 java
drwxr-xr-x 4 root sys 8192 Sep 28 10:58 lbin
drwxr-xr-x 8 root sys 8192 Sep 28 10:58 lib
drwxr-xr-x 5 root sys 96 Apr 2 2008 newconfig
drwxr-xr-x 4 root sys 8192 Sep 28 10:58 sbin
-r--r--r-- 1 root sys 46650 Aug 25 2009 scsitab

NEW /DataProtector
Dec-13 ngwiDB: ls -al
total 832
drwxr-xr-x 12 root sys 6144 Dec 13 14:57 .
drwxr-xr-x 32 root root 8192 Dec 13 12:28 ..
-rw-r--r-- 1 root sys 4289 Sep 15 2009 .CII_CC
-rw-r--r-- 1 root sys 1442 Sep 15 2009 .CII_CORE
-rw-r--r-- 1 root sys 3429 Sep 15 2009 .CII_CORE-IS
-rw-r--r-- 1 root sys 21439 Sep 15 2009 .CII_CS
-rw-r--r-- 1 root sys 286 Sep 15 2009 .CII_DA
-rw-r--r-- 1 root sys 218881 Sep 15 2009 .CII_DOCS
-rw-r--r-- 1 root sys 605 Aug 4 2006 .CII_DOCUMENTS
-rw-r--r-- 1 root sys 1616 Sep 15 2009 .CII_JAVAGUI
-rw-r--r-- 1 root sys 482 Sep 15 2009 .CII_MA
-rwxrwxr-x 1 root sys 3 Aug 25 2009 .Version
-r--r--r-- 1 root sys 93195 Aug 25 2009 .omnirc.TMPL
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_cc
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_core
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_cs
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_da
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_docs
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_javagui
-rw-r--r-- 1 root sys 3 Sep 15 2009 .patch_ma
drwxr-xr-x 3 root sys 96 Dec 13 14:56 acs
drwxr-xr-x 2 root sys 1024 Dec 13 14:56 bin
drwxr-xr-x 4 root sys 96 Dec 13 14:56 databases
drwxr-xr-x 3 root sys 96 Dec 13 14:56 doc
drwxr-xr-x 3 root sys 96 Dec 13 14:57 help
drwxr-xr-x 5 root sys 96 Dec 13 14:56 java
drwxr-xr-x 4 root sys 1024 Dec 13 14:56 lbin
drwxr-xr-x 8 root sys 2048 Dec 13 14:56 lib
drwxr-xr-x 5 root sys 96 Dec 13 14:56 newconfig
drwxr-xr-x 4 root sys 1024 Dec 13 14:56 sbin
-r--r--r-- 1 root sys 46650 Aug 25 2009 scsitab

Can someone guide me on what I am missing?

Thanks much!
4 REPLIES 4
Terry.giblin
Frequent Advisor

Re: Duplicating directory structure problems

Dear Beannie,

first assumption, assume nothing.

I would recommend that you check what other file systems you have mounted under, /opt/omni,
/opt/omni/...... just in case.

Then copy the files

cd /opt/omni

find . -depth -print | cpio -padm /DataProtector

Or

cd /opt/omni

tar cvf - . | (cd /DataProtector; tar xvf -)

I hope this helps


Bill Hassell
Honored Contributor
Solution

Re: Duplicating directory structure problems

Based on the source and destination lists, they are the same (except for directory sizes). But ls tells you nothing useful about what you copied. There are hundreds of files that you have not checked. When you copy a series of directories, count the files and directories:

find /opt/omni -type d | wc -l
find /opt/omni -type f | wc -l
find /DataProtector -type d | wc -l
find /DataProtector -type f | wc -l

Note that the size of the copied directories will usually be smaller while a few files may actually be bigger. But if the counts are correct, then the copy succeeded. The step you are missing is to overlay the original directory /opt/omni with /DataProtector. DP, like many applications, is coded to run from it's installation directory. So unmount /DataProtector and remount it on top of /opt/omni:

umount /DataProtector
mount /dev/vg0ZZZ/lvolYYY /opt/omni

Now this is for testing only. The old /opt/omni still exists but is hidden under the new lvol. If everything is working, stop DP, umount the new lvol and cleanout /opt/omni. Now /opt/omni will be an empty directory, ready to be the mountpoint for the new lvol.

> /opt/omni-old...

What is that? Is that another copy of /opt/omni? Again, the problem is moving a complex installation to new directories.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: Duplicating directory structure problems

>dld.so: Unable to find library libBrandChg.so.

This fails because it likely expects the shlib to be still under opt/omni/ somewhere.

You should have shutdown omni before you copied and as Bill said, put it back under the original name. Or used a symlink.
Beannie
Advisor

Re: Duplicating directory structure problems

Thanks everyone. Points assigned. I did check my wc -l and got matching numbers from source and dest directories. What it came down to was the path (/opt/omni) and mounting that separately (as /opt/omni). Previous advice from this forum included that info and I didn't think it really mattered but apparently it does (still learning and always will be). Thanks again and Happy Holidays. :-)