- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- mirror data from one lvol 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
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-22-2003 11:30 AM
01-22-2003 11:30 AM
I want to make a replica/replacement of one lvol to another.
lvol mirroring is not an option as my VG will not support the required amount of new physical volumes needed based on PV & PE limits in the VG.
So, I've created a new VG and lvol with room to grow.
As far as copying the data, what is the best tool for the job? There's probably many ways to do it, and since this new lvol will assume the place of the old, I'd like to do as close to a byte for byte copy such that the replacing lvol should be transparent to the system (but don't we always..)
Thanks for your assistance,
Mark
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 11:36 AM
01-22-2003 11:36 AM
Re: mirror data from one lvol to another
What does the lvol contain? A file system? A raw database lvol?
Assuming it's a file system, I would probably lean toward the backup/restore method, though you could try find piped through cpio or even cp -r.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 11:39 AM
01-22-2003 11:39 AM
Re: mirror data from one lvol to another
followed by vgimport.
I don't have a procedure here, but one of the big guys like Ferugeson or Stevenson probably has one handy.
There are reasonable proceures available with a keyword search on itrc.
Or maybe I'll do the search for you.
Take a look at this post. Procedure and everything.
http://search.hp.com/redirect.html?url=http%3A//forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd8d7a135f587d5118ff00090279cd0f9,00.html&qt=vgexport+%2Bvgimport+%2Blvol&hit=3
STeve
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 11:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 11:40 AM
01-22-2003 11:40 AM
Re: mirror data from one lvol to another
Use 'cpio' like this:
# cd /olddir || exit 1
# find . -depth ???print | cpio -pudlmv /newdir
..where /olddir is your old mountpoint and /newdir is your new mountpoint (logical volume). When done, edit '/etc/fstab' to change the device file associated with the /olddir mountpoint and eliminate the /newdir mountpoint. In that way you will have exchanged the logical volumes while retaining your original mountpoint directory name.
BTW, it is very normal/expected for the size of the /newdir to be somewhat smaller than the old source /olddir. A filesystem's inode requirements grow as files are added but the space allocatated never shrinks if files are deleted. Rebuilding the filesystem's contents from scratch allocates only that needed.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 11:50 AM
01-22-2003 11:50 AM
Re: mirror data from one lvol to another
Thanks for the replies.
Steven, I'm not reusing the same lvol/disk, I'm moving the data to a completely new one so not only is the VG data different, but it contains PV's on a seperate raid altogether.. if I understood your reply.
Thanks for the other options - I guess I'll pick one and pray - seems like cpio is a common choice.
What about dd? Wouldn't this be lower-level - could cpio leave stuff out?
Thx,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 11:55 AM
01-22-2003 11:55 AM
Re: mirror data from one lvol to another
10.20 it definitely will, 11.00 as well i am pretty sure
if thats the case your kinda stuck using the backup to tape option
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 11:55 AM
01-22-2003 11:55 AM
Re: mirror data from one lvol to another
Mount the new lvols in tmp:
ie:
mount /dev/vgnew/lvolnew /tmp/newmountpoint
Then I copy shutdown everything that would be accessing the old file system and copy it over:
cp -Rp /oldmountpoint/* /tmp/newmountpoint
Once done I verify data is correct using whatever method you like.
I then unmount the old filesystem and new filesystem and edit /etc/fstab to point the new filesystem to the old mount point and remount it.
You will then have the new filesystem mounted in place of the old filesystem and can bring up your apps for testing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 01:39 PM
01-22-2003 01:39 PM
Re: mirror data from one lvol to another
HTH
Marty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 01:49 PM
01-22-2003 01:49 PM
Re: mirror data from one lvol to another
It is also necessary that the destination lvol be at least as big as the source - if smaller diaster; if bigger space will be wasted as the filesystem will know nothing about it. If you are going to use dd, then choose a fairly large blocksize and specify only the bs paramter rather than an ibs= and obs= to avoid dd's internal copy from the input buffer to the output buffer.
Now, having said all this, my weapon of choice would tend to be cpio.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 01:58 PM
01-22-2003 01:58 PM
Re: mirror data from one lvol to another
Critical point!
You say the space would be wasted on the destination fs if it's bigger than the source? Why so (technically)? The fs creation is independent of the copy operation right? (I've already made the fs - which can be blown away if necessary)
So, if the destination fs ultimately needs to be bigger, initially create the same size as the source and lvextend etc. later on?
-M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 02:03 PM
01-22-2003 02:03 PM
Re: mirror data from one lvol to another
If the destination were smaller then some of the filesystem blocks would be missing BUT the filesystem wouldn't know it; if the destination were larger the filesystem would know nothing about it because it's internal data still hold the original size. After dd is finished and if the destination LVOL were bigger, you could run extendfs or fsadm to grow the destination filesystem to fill the LVOL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 02:07 PM
01-22-2003 02:07 PM
Re: mirror data from one lvol to another
That's really interesting. Off topic, but are there other super-low-level cmds like dd out there that need special consideration also?
Great, well looks like cpio is a consensus then.
Thanks to all!
Cheers,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 06:19 PM
01-22-2003 06:19 PM
Re: mirror data from one lvol to another
does cpio preserve owner group info?
thx,
M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 06:36 PM
01-22-2003 06:36 PM
Re: mirror data from one lvol to another
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2003 08:03 PM
01-22-2003 08:03 PM
Re: mirror data from one lvol to another
Sparse files (very common in databases) will always be expanded, even with frecover unless the -s option is specified.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2003 11:58 AM
01-24-2003 11:58 AM
Re: mirror data from one lvol to another
James, I'm curious though, you said to use the 'l' flag which apears to use links instead of copying the file.
This is not desirable in my case so I left it out.. or do I not understand..
Thanks,
Mark
p.s. would cpio preserver setuid & sticky bit modes?