- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Moving files to different logical volume with same...
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
02-27-2001 10:13 PM
02-27-2001 10:13 PM
Moving files to different logical volume with same directory structure
This may just be a stab in the dark but is there anyway you can move files from one logical volume to another when they have the same directory structure?
I have filesystem /danaadl/baan/patches which lives on /dev/vg01/lvol7 and I want to move it back to /danaadl on /dev/vg03/lvol1 keeping the same directory structure.
TIA
Leigh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2001 10:53 PM
02-27-2001 10:53 PM
Re: Moving files to different logical volume with same directory structure
You don't have to worry by yourself which logical volume the data would reside on. After the "mv" command the data will be seating on /dev/vg03/lvol1.
~Philip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2001 10:54 PM
02-27-2001 10:54 PM
Re: Moving files to different logical volume with same directory structure
mv /danaadl/baan/patches/* /danaadl
many will recomend using a copy and delete so that if there is a space problem, you do not loose the files. I recomend a backup.
One other trick I have used is to make a tape from the direcotry and restore it to the directory; ei
cd /danaadl/baan/patches
tar cvf /dev/rmt/0m .
cd /danaadl
tar xvf /dev/rmt/0m
and then delete the files. This will take more time. Another way to skin a job.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2001 07:07 AM
02-28-2001 07:07 AM
Re: Moving files to different logical volume with same directory structure
cd
tar cf - . | (cd
This will do a disk to disk copy. Note if you are using ACLs they will not be copied. See man frecover for how to use fbackup/frecover to do the same thing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2001 07:15 AM
02-28-2001 07:15 AM
Re: Moving files to different logical volume with same directory structure
If you want to keep the exact same directory structure on both LVs then I would do something like the following:
# umount /dev/vg03/lvol1 --> unmount the lvol you are moving the info. to
#mkdir /danaadl.new --> make a new directory to mount to
# mount /dev/vg03/lvol1 /danaadl.new --> remount the new lvol to a different directory name
# cd /danaadl
#cp -Rp ./* /danaadl.new --> copy the stuff from your current directory to the new one
#cd /
# umount /danaadl --> unmount current directory
# umount /danaadl.new --> unmount new directory
# mount /dev/vg03/lvol1 /danaadl --> mount new directory with correct directory name
You could now 'mount /dev/vg01/lvol1 /danaadl.old' if you still need access or if you want to clean out the lvol. Or you could just remove the lvol if you don't need it anymore.
This is the only way I know of to move data between logical volumes and still keep the same directory name and structure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2001 07:59 AM
02-28-2001 07:59 AM
Re: Moving files to different logical volume with same directory structure
Lets assume we have "/olddir/data" and you need it moved to "/newdir/data"
make sure that "/newdir/data" exists and has the space needed. Just do
>cd /olddir/data
>/bin/find . -depth -print | /bin/cpio -padlmuxv /newdir/data
You can verify the contents of /newdir/data before removing the old stuff.
man cpio for more information...
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2001 10:19 AM
02-28-2001 10:19 AM
Re: Moving files to different logical volume with same directory structure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2001 01:39 PM
02-28-2001 01:39 PM
Re: Moving files to different logical volume with same directory structure
I think you can use pvmove command also.Check the man pages for pvmove command.It will give you better idea.
Also,instead of 'tar' I would suggest use 'fbackup' since it will do everything for you.Check out 'fbackup' also.
Regards,
Jaimin