Operating System - HP-UX
1833491 Members
2884 Online
110052 Solutions
New Discussion

Strange behaviour with cpio

 
MR VILLOT   MR MONTAGNE
Frequent Advisor

Strange behaviour with cpio

Hi,

I need to copy data from file system to another.
I did :
# cd /d1 (old dir)
# find . -depth | cpio -pdumv /d1new

Copy was stopped (not enough space).
#bfd
/dev/vg01/lvol1 9216000 8941578 265934 97% /d1
/dev/vg04/lvol1 9420800 9420800 0 100% /d1new

mkfs -F vxfs -o ninode=unlimited,bsize=2048,version=3,inosize=256,logsize=1024,nolargefiles /dev/vg01/lvol1 9216000
mkfs -F vxfs -o ninode=unlimited,bsize=8192,version=3,inosize=256,logsize=256,largefiles /dev/vg04/lvol1 9420800

#diff /d1 /d1new
Common subdirectories: /d1/lost+found and /d1new/lost+found
Common subdirectories: /d1/ora_appli and /d1new/ora_appli
Common subdirectories: /d1/oracle and /d1new/oracle
Common subdirectories: /d1/was and /d1new/was

I do not understand why I do not have enough space. PE sizes are not the same : 4 Mb (vg01) and 8 Mb (vg04)

Thanks
Laurent


5 REPLIES 5
Geoff Wild
Honored Contributor

Re: Strange behaviour with cpio

I would try it again like this:

cd /d1 ; find . -path ./d1 -prune -o -print | cpio -pdxm /d1new

Or maybe try it like so:

vxdump -0 -f - -s 1000000 -b 16 /d1| (cd /d1new ; vxrestore rf -)&

remove all files in /d1new first....

Rgds...Geoff



Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
John Poff
Honored Contributor

Re: Strange behaviour with cpio

Hi,

Maybe you have some sparse files in /d1 that are ballooning up to their expected full size when cpio writes them to the second filesystem?

JP
Jeroen Peereboom
Honored Contributor

Re: Strange behaviour with cpio

Laurent,

If you are NOT copying another filesystem too (mounted under /d1, just type mount to see all mounted filesystems), another reason could be the blocksize of d1new being 4 times the block size of d1. The blocksize is the smallest amount of diskspace allocated to the file. This means that you waste more space on small files, which may become a problem if there are many files.

I do not know if all files occupy filesystem space in blocks of blocksize, but of course on large file you loose (procentually) less space.

Your PE size is only relevant to the LVM manager and determines the minimum size increase of an LV.

JP.
Jeroen Peereboom
Honored Contributor

Re: Strange behaviour with cpio

Are Oracle datafiles sparse?

JP
MR VILLOT   MR MONTAGNE
Frequent Advisor

Re: Strange behaviour with cpio

Thanks for your replies.

I think also that problem is size of blocksize. I am going to change my file system to have the same blocksize of original file system.

For sparse files, there are not Oracle Datafiles (not dbf). I do not know how to find quickly sparse files in my file system.

Laurent