- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- copy data between lvs with dd command
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
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
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-19-2007 06:00 PM
09-19-2007 06:00 PM
1. create new VG with commands ( pvcreate , mkdir /dev/vg , mknod, vgcreate )
2. create new lv with commands ( lvcreate ) - I didn’t format new lv
3. copy data from old to new lv
dd if =/dev/vgold/lv of=/dev/vgnew/lv bs=1024 conv=sync
2000+0 records in
2000+0 records out
command get finished successfully though I am not able to mount the new file system .
# mount / dev/vgnew/lv /tmp_lv
vxfs mount: /dev/vgnew/lv corrupted. needs checking
I tried to copy between raw devices also. The result was same …
Please tell me what I was missing ……
thanks & Regards
Prasanth
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2007 06:47 PM
09-19-2007 06:47 PM
Re: copy data between lvs with dd command
use lvextend and lvsplit
http://docs.hp.com/en/B2355-90691/lvsplit.1M.html
all u need Mirror-UX installed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2007 06:48 PM
09-19-2007 06:48 PM
Re: copy data between lvs with dd command
fsck -F vxfs /dev/vgnew/lv
or
fsck -o full /dev/vgnew/lv
Another suggestion could be to use vxdump/vxrestore as an alternative to dd?
Good luck
Danny Petterson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2007 06:54 PM
09-19-2007 06:54 PM
Re: copy data between lvs with dd command
After a dd command it is normally necessary to fsck the filesystem. If you got the block size wrong that could also have you end up with usless output.
Do an lvdisplay -v on the source logical volume and modify your dd command to meet the structure of the source rpm as much as possible.
SEP
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
09-19-2007 08:46 PM
09-19-2007 08:46 PM
Solutionfsck -y /dev/vgname/rlvname will fix ur issue.
fyi,
# bdf /test1
/dev/vg00/lvol11 131072 131068 4 100% /test1
# lvcreate -L 200 /dev/vg00
Warning: rounding up logical volume size to extent boundary at size "224" MB.
Logical volume "/dev/vg00/lvol13" has been successfully created with
character device "/dev/vg00/rlvol13".
Logical volume "/dev/vg00/lvol13" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
# dd if=/dev/vg00/rlvol11 of=/dev/vg00/rlvol13 bs=1024k
160+0 records in
160+0 records out
# mount /dev/vg00/lvol13 /test2
vxfs mount: /dev/vg00/lvol13 is corrupted. needs checking
# fsck -y /dev/vg00/rlvol13
fsck: /etc/default/fs is used for determining the file system type
log replay in progress
replay complete - marking super-block as CLEAN
# bdf /test2
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol13 131072 131068 4 100% /test2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2007 09:32 PM
09-19-2007 09:32 PM
Re: copy data between lvs with dd command
can i use the dd command, if i want to copy raw data (used by oracle).
in such case which device file i have to take for copy (/dev/oldvg/lv or /dev/oldvg/rlv)
in such case , how will i chcek for oracle raw data once i have done the copy ?
thanks
Prasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2007 10:54 PM
09-19-2007 10:54 PM
Re: copy data between lvs with dd command
http://sl-workstations.web.cern.ch/sl-workstations/documentation/SAGpart-7.html
Awadhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2007 12:43 AM
09-20-2007 12:43 AM
Re: copy data between lvs with dd command
Always use the raw lvol when using dd. The cooked lvol runs data through the buffer cache, a waste of resources and time. Did you notice the bs setting? bs=1024 is EXTREMELY small, use bs=256k or even bs=1024k.
> can i use the dd command, if i want to copy raw data (used by oracle).
Yes.
> in such case which device file i have to take for copy (/dev/oldvg/lv or /dev/oldvg/rlv)
Always use the raw device for dd, whether the lvol is raw or has a filesystem. This improves the performance.
> in such case , how will i check for oracle raw data once i have done the copy ?
There is only one way: run Oracle and see if it recognizes and validates the results. You can look at a couple of sectors using dd piped to xd but it's all binary patterns.
dd if=/dev/oraraw/rlvol2 bs=1024 count=20 | xd -xc
Bill Hassell, sysadmin