Operating System - HP-UX
1751693 Members
4818 Online
108781 Solutions
New Discussion

Re: copy a filesystem best solution (local host or remote host)

 
SOLVED
Go to solution
support_billa
Valued Contributor

Re: copy a filesystem best solution (local host or remote host)

@ JRF

@ What doesn't "work right"?  and what are the "certain circumstances".  What you are saying is that your
@ expectations differ from reality.  Please be specific!  If you can construct an actual test case that others can
@ replicate that is the most useful description.  That might be as simple as creating some directory
@(with n-subdirectories) and populating the structure with n-files with any content whatsoever. 
@ A simple script to create the files is all that would be necessary.

i wrote it in my last post, now i am restoring the files to a test server and you will get the results
today or tomorrow.

Regards!

 

Viktor Balogh
Honored Contributor

Re: copy a filesystem best solution (local host or remote host)

###

 

Ooops, I should used to this new forum engine, didn't notice that there are more pages to this topic. Anyway, I won't delete my response, here you are:

 

###

Hi,

 

I think this method wasn't mentioned:

 

If you want to move the data from old luns to new, you can do it by:

 

1. pvcreate the new luns

2. add the new luns to the vg

3. lvextend -m 1 # by this you create a mirror on the LVM level, the "copy" will be invisible to the users

4. lvreduce # specify the old luns as you want to remove those

 

and voila', your data is safe in the newly added storage. Note that the above works only if you have a MirrorDisk/UX license.

 

****
Unix operates with beer.
support_billa
Valued Contributor

Re: copy a filesystem best solution (local host or remote host)

hello,

 

thanks to all, i will answer my open tasks after my vacation

 

regards

support_billa
Valued Contributor

Re: copy a filesystem best solution (local host or remote host)

Hello Viktor ,

About :If you want to move the data from old luns to new, you can do it by:

1. pvcreate the new luns
2. add the new luns to the vg
3. lvextend -m 1 # by this you create a mirror on the LVM level, the "copy" will be invisible to the users
4. lvreduce # specify the old luns as you want to remove those
________________________________________________________________________________

we did this steps at many storage migrations ( we mirror Storage EVA mit LVM ).
but at this migration we upgrade the LVM version from 1 to 2.
how can you do this with your steps ?

I explain our storage move :

1. Existing VG for example vgtest                    with LVM 1.0 on the XP12000
2. Mr. Winkler create a new VG vgtest_neu    with LVM 2.0 on the  P9500
3. Copy Procedure :               1. create LVOL's and Filesystems at VG vgtest_neu
                                               2. mount all filesystems of VG vgtest_neu like /new/filesystem …
                                               3. copy with command "dd" , "umount" filesystem before copying
                                               4. after copy tasks we umount all filesystems of XP12000 and P9500
                                               5. vgexport of vgtest_neu and vgtest and replace with vgimport  vgtest_neu to vgtest    
4. After Copy Procedure : VG vgtest with LVM 2.0   is on the P9500

support_billa
Valued Contributor

Re: copy a filesystem best solution (local host or remote host)

Hello Dennis , hello James,

about the issue "find .... cksum " and  "cksum" :

our colleagues made a software call and we got the informations :
cksum can't process files when the string or shackle of files from find command is too long
hmm , i hope i explain it right ?

 

regards

support_billa
Valued Contributor

Re: copy a filesystem best solution (local host or remote host)

hello,

i have a new problem :

i changed my  "dd" copy job :

 

old:

1. dd

2. mount

3. fsadm -F vxfs  -e -d <filesystem>

4.if necessary : /usr/sbin/fsadm -F vxfs -o largefiles <filesystem>

5. information, when it necessary to do : /usr/sbin/fsadm -F vxfs -b newsize <filesystem>

 

new

1. dd

2. mount

3. if necessary : /usr/sbin/fsadm -F vxfs -b newsize <filesystem>

4. fsadm -F vxfs  -e -d <filesystem>

5. if necessary : /usr/sbin/fsadm -F vxfs -o largefiles <filesystem>

6. last step : when i try to umount , sometimes filesystem is busy.

 

i search with :

/opt/iexpress/lsof/bin/lsof -s +D <filesystem>
fuser <filesystem>

 

the filesystem have about 106947 files.


no process  i found and it is a test system , so i gurantee , that nobody use this fs.

i rebooted the servers and it work perfect for maybe for 5 tests it is ok, then i got "busy" ...

before i umount , i test command "sync" , it helps sometimes , then i got "busy" ...

when i use 3 times "sync" , then it is ok

 

is command "sync" a good solution or i say "dangerous" ? i didn't found a command, which "sync" only a

filesystem or inital a "write" or "flush" of all processes

 

regards

James R. Ferguson
Acclaimed Contributor

Re: copy a filesystem best solution (local host or remote host)


@support_billa wrote:

Hello Dennis , hello James,

about the issue "find .... cksum " and  "cksum" :

our colleagues made a software call and we got the informations :
cksum can't process files when the string or shackle of files from find command is too long
hmm , i hope i explain it right ?

 

regards


OK, if that's the case, you can use 'xargs' to collect n-number of arguments and execute 'cksum' for each bundle until done:

 

# find . -type f -print | xargs -n10 cksum

In this case, if there were 31 files found, four (4) 'cksum' processes would be run --- the first three (3) handling 10-arguments and the last, forth process doing the remaining argument of one file.

 

This would be more efficient then using :

 

# find . -type f -exec cksum {} \

...which spawns one 'cksum' process for every file found.

 

Using:

 

# find . -type f -exec cksum {} +

...mimics using 'xargs' but (based on your information and your data) gives 'cksum' too many arguments to handle at once.

 

Regards!

 

...JRF...

Dennis Handly
Acclaimed Contributor

Re: copy a filesystem best solution (local host or remote host)

>cksum can't process files when the string or shackle of files from find command is too long
hmm, I hope I explain it right?

 

That sounds like your problem but I'm not sure how that can happen?

support_billa
Valued Contributor

Re: copy a filesystem best solution (local host or remote host)

hello Dennis,

>cksum can't process files when the string or shackle of files from find command is too long
> hmm, I hope I explain it right?
@ That sounds like your problem but I'm not sure how that can happen?

here there statement, i hope i explain it

The command "find" reports a     appropriate number of files to command "cksum"
"cksum" has limits, which occur at a number of files,
therefore it is not a bug , but rather a result when limits where exceeded.

 

regards

Dennis Handly
Acclaimed Contributor

Re: copy a filesystem best solution (local host or remote host)

>there statement, I hope I explain it
>The command "find" reports a appropriate number of files to command "cksum" . "cksum" has limits, which occur at a number of files, therefore it is not a bug, but rather a result when limits were exceeded.

 

Who made that statement and where is it documented?

I see nothing in cksum(1), nor in the source that indicates any limits.

Other than the command line limit that find(1) uses.

 

On 11.23, I have no problems passing in 33,800+ files to cksum.