- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Moving files between logical Volumes
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
Forums
Discussions
Discussions
Discussions
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
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
01-28-2002 11:58 PM
01-28-2002 11:58 PM
yesterday i wanted to move the content of a "normal" Logical Volume to a volume with distributed extents.
I created a new directory and mounted the new logical volume on the new directory.
Then i went in to the original directory and used
find . | cpio -pdumv /new_directory to move the content.
Here I get an error concerning socket files.
Socket
I know that socket files are used for inter process communication. But i don't know if the
are created only temporary so the error isn't critical.
If the error is critical, which is command shall i use to move them.
Who can helps ?
Thanks in advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2002 01:07 AM
01-29-2002 01:07 AM
Re: Moving files between logical Volumes
Try using the x option ie.
cpio -pdumvx
Extracted from the man page of cpio for your convenience:
x Save or restore device special files. Since mknod() is used to recreate these files on a restore, -ix and -px can be used only by users with appropriate privileges (see mknod(2)). This option is intended for intrasystem (backup) use only. Restoring device files from previous versions of the OS, or from different systems can be very dangerous. cpio may prevent the restoration of certain device files from the archive.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2002 03:43 AM
01-29-2002 03:43 AM
Re: Moving files between logical Volumes
Try this:
find . | cpio -pudlmv /destination_dir
or this:
tar -cvf tarfile /opt
then
tar -xvf tarfile
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2002 06:19 AM
01-29-2002 06:19 AM
Re: Moving files between logical Volumes
I have to agree with Steven, try with the x option.
find . | cpio -pdmuxvl /newdir
...jcd...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2002 06:28 AM
01-29-2002 06:28 AM
SolutionNormally the socket files are created by calling socket() with a socket type of AF_UNIX. That means whenever an application creates those sockets a socket file will be created. There is no need, therefore, to backup these files.
Normally this command will copy all files from a file system to another:
# find . -depth | cpio -pdlmuva /dest_dir
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2002 06:46 AM
01-29-2002 06:46 AM
Re: Moving files between logical Volumes
Why are you using cpio to copy when the only true complete image copy method is to dd the raw logical volumes ?? Then you create an exact bit-for-bit copy from old to new.
dd if=/dev/vg
All you need to do is ensure the 2 lvols are the exact same size in extents. This is also the fastest way to copy one lvol to another.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2002 10:41 AM
01-29-2002 10:41 AM
Re: Moving files between logical Volumes
Now that you know why the cpio failed, let
me ask "why" you used cpio. First of all,
cpio does not deal with device files, sockets
(like you experienced), ACLs, largefiles, etc.,
very well.
If you have MirroDisk/UX, how about this
process:
1) create your new LV (complete with extent-
based stripes [NOT LVM stripes, because you
cannot mirror them]) making sure it is exactly the same size as the LV you want a copy of.
You will want to avoid using disks the existing
LV is on.
2) lvmerge the new and old LVs together (taking
great care that the old LV is copied into the
new LV).
3) once the LV is synced, use lvreduce to
de-allocate the old distribution mirror.
4) celebrate (because you completely avoided
going off-line to make sure your copy is clean
and worrying about your copy missing something).
-dlt-