- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Copying files from one FS to another
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2009 02:22 PM
тАО09-04-2009 02:22 PM
Copying files from one FS to another
I would like to copy files from one system to another. The file system is around 500GB and it has thousands of small files. I have tried the below below options. Could you kindly advice the fastest way to do this.
1) cpio, cp, fbackup from source FS to new FS ; This is very slow because of the huge number of small files.
2) dd if=/dev/vg01/rlvol1 of=/dev/vgtest/rlvol1 bs=1024k; The problem here is my destination LV is 750GB and hence I loose 250GB of space here.
3) The option I had was to create the new LV of 500GB size and copy the files using "dd" and then extend the filesystem. But I wanted to increase the PE size for the new VG and hence if I create a 500GB file system it will be few extends more than the source LV. I tried the "dd" command and fsck-ed the FS and mounted and it is fine. Is this option fine?
Thanks,
Javed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2009 02:55 PM
тАО09-04-2009 02:55 PM
Re: Copying files from one FS to another
a) I use find . -depth -exec tar -cvf /tmp/file.tar {} \;
Then verify the contents with
tar -tvf /tmp/file.tar
Then ftp the tarball over and extract.
cd /dir/dir
tar -xvf file.tar
b)Yes, and in LVM you can only extend the logical volume at this point, no harm on the dest or source systems.
lvextend -L 750m /dev/vg/lvol
fsadm -b 750m /filesystem mount point
c) Two problems.
1) You can only increase the PE at time of vg creatation. So forget this unless you make a new vg.
2) The few extends concern is not a big worry either. At worse the dest file system (* in the new vg and new lvol *) will need to be increased a little. This has to do with for example, a 4 MB extend and a 16 MB extend and the file system blocks. All the blocks may not conveniently fit into the new 16 MB extent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2009 05:20 PM
тАО09-04-2009 05:20 PM
Re: Copying files from one FS to another
This is an example:
tar cf - /source_fs | remsh server "tar xvf -"
(might need some tweaking, I can't reproduce it here)
Good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-04-2009 09:26 PM
тАО09-04-2009 09:26 PM
Re: Copying files from one FS to another
The easiest way is take a backup from 1st system and restore the same into second system.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2009 12:48 AM
тАО09-05-2009 12:48 AM
Re: Copying files from one FS to another
There are so many things wrong with trying to use find and tar. Instead use pax(1) or cpio(1).
Or if you want to copy everything, just tar at the top.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2009 12:50 AM
тАО09-05-2009 12:50 AM
Re: Copying files from one FS to another
If on another server, you would be best copying to tape using pax, then recover.I would NEVER use dd, as it is a bit by bit copy, and has no "intelligence" to skip "bad" bits
man pax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2009 07:46 AM
тАО09-05-2009 07:46 AM
Re: Copying files from one FS to another
tar pipeline
(or "pax", or whatever) should find many
examples of methods which don't involve steps
like "Then ftp the tarball [...]".
> tar cf - /source_fs | remsh server "tar xvf -"
I tend to avoid absolute paths (like, say,
"/source_fs") with "tar", but yes, something
like that. One can add "mkdir" and "cd",
too, as needed.
> [...] you would be best copying to tape
> using pax [...]
Because there's no network connection, or
why? This must be some new meaning of
"best".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2009 08:38 AM
тАО09-05-2009 08:38 AM
Re: Copying files from one FS to another
Can you explain?
Last I checked cpio couldn't handle files > 2 GB but that was a decade ago, nor does cpio pass through easily restore across file systems, forcing the backup procedure to not cross mount points.
'Pax', ok. Use it with ignite and from the cli once in awhile but aside from is being able to read tar and cpio file formats, what's the advantage?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2009 10:01 PM
тАО09-05-2009 10:01 PM
Re: Copying files from one FS to another
I wasn't recomending cpio but denigrating tar.
Both pax and cpio work with find. Your example would overwrite /tmp/file.tar with each file.
>nor does cpio pass through easily restore across file systems, forcing the backup procedure to not cross mount points.
I'm not sure I understand this? You mean a cpio pipeline doesn't allow you to copy multiple file systems?
>aside from is being able to read tar and cpio file formats, what's the advantage?
Because it has the best of tar and cpio's interfaces. It can take files from the command line or from stdin. It also allows files > 8 Gb. And allows you to rename paths/files when you restore.
What's broken about pax is that it doesn't have tar's -C directory nor does it restore SUID bits.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-08-2009 12:32 AM
тАО09-08-2009 12:32 AM
Re: Copying files from one FS to another
rsync utility is the ideal option
Pleaae download this utility and use it.
See man page examples for a better understanding of the usage
Sagar