1833019 Members
2152 Online
110049 Solutions
New Discussion

Re: swcopy

 
khilari
Regular Advisor

swcopy

Hi guys, i have to copy like 15 disks on a particular filesystem... I was just wondering after the first one i have to append the next one or it would overwrite right.... So, what would be the steps to copy them.. If lets say the software filesystem was /software and had 15 disks to copy, how do i get started....
Thanks
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: swcopy

Shalom,

1)pvcreate each of the disks.
2) Create a volume group for the disk or use vgextend to extend an existing volume group to this disk.
3) lvextend your logical volume to the new disks.
4) umount the filesystem and use extendfs to extend it. If you have online JFS you can extend it hot and without umount. fsadm command.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor

Re: swcopy

Sorry, I find your question confusing. The title says "swcopy", yet the question itself talks about copying "disks" to a filesystem. Could you expand on what these "disks" are and what you need to do with them?

Are you swcopying installation DVDs for example?


Pete

Pete
khilari
Regular Advisor

Re: swcopy

Guys, we are reinstalling SAP and we have like 15 disks to copy from..(15 sap disks to copy)... we on the unix side made a filesystem.. /sap_software and we have filesystems where we will be installing them...
My question is that i have to copy these installation files on the /sap_software filesystem one by one so that later on they could be installed from there....
Now, how do i copy them from the /cdrom to /sap_software that they dont get overwritten on top of each other.. sxcopy them in append so that i have all 15 copied to /sap_software..
Hope this clarifies.
Thanks
Michael Steele_2
Honored Contributor

Re: swcopy

You copy the file system not the disks. The disks are transparent to you at the O/S level via any file system.

a) bdf /filesystem
b) bdf /new_filesystem (* verify sizes of /filesystem and /new_filestems *)
cd /filesystem
cp -p -r /filesystem /new_filesystem

The above is all you need.

However, if you're really not confused and really want to copy 15 disks onto x'# of other disks.

a) verify sizes of disks with ioscan (* Note the size and path. If size not listed then use 'diskinfo' command.

b) dd if=/dev/dsk/c#t#d# of=/dev/dsk/c#t#d#
Support Fatherhood - Stop Family Law
Pete Randall
Outstanding Contributor

Re: swcopy

Does SAP software come in SD (Software Distributor) format? If not, then you certainly won't be using swcopy.

Mount the CDs and see what it contains. Most likely you will end up just doing a regular cp copy.


Pete

Pete
khilari
Regular Advisor

Re: swcopy

now, okay so when i do the first disk like this and copy its contents on the /sap_software, then i unmount it and put the second cd in and do the same. Will it append to the existing data or will it write from the beginning of the /sap_software...
while using this command....
1st disk copied like this..
cp -p -r /cdrom /sap_software
2nd disk if copied like this will it append or erase the previous copied contents, coped onto /sap_software
Pete Randall
Outstanding Contributor

Re: swcopy

It would depend on what is on the disks. Assuming they are just regular files, then the files will not overlay any previous ones unless the names happen to be the same. You could avoid that possibility by copying each CD into a different sub-directory (/sap_software/CD1, /sap_software/CD2, etc.).


Pete

Pete
Dennis Handly
Acclaimed Contributor

Re: swcopy

>1st disk copied like this: cp -p -r /cdrom /sap_software
>2nd disk if copied like this will it append or erase the previous copied contents, coped onto /sap_software

I have that same problem when I burst patches.
cp -r or mv will just put any existing directories under the old ones and your tree will be skewed.

One solution to the problem is to use tar. tar will just "merge" the new tree onto the old one.

Of course, if you want to spend a lot of time, you could use cp -r at various levels in your /cdrom tree and copy to the corresponding parts in your target tree.