- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: What is the technical reason you shouldn't/can...
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
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
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
тАО04-25-2002 08:42 AM
тАО04-25-2002 08:42 AM
Assumption is that both source/target filesystems are unmounted for the dd command.
Any gurus care to enlighten this neophyte ???
Thanks :-)
PS: I did use dd on LVs and it appears to work successfully (at least on AIX LVs)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 08:45 AM
тАО04-25-2002 08:45 AM
Re: What is the technical reason you shouldn't/can't use dd to copy one LV to another LV ?
You could use dd to copy one disk to an other exact same size disk.
I guess it will be different with lv's.
They use the LVM structure which is on the disk.
Also how would you point to the correct lv to copy.
This as dd will use blocks to copy over.
It will also be difficult to assign to blocks to the correct lv.
So seems to me almost impossible to do.
Regards,
C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 08:49 AM
тАО04-25-2002 08:49 AM
Re: What is the technical reason you shouldn't/can't use dd to copy one LV to another LV ?
One implication, noting that dd is a bit-by-bit copy, would be doing a dd of a root disk LV that contains HW paths config info.
This info would now be incorrect on the destination if the destination LV is a different disk.
*Generally* speaking performing a dd on application *data* is usually safe - but not necessarily so when you dd OS *data*.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 08:57 AM
тАО04-25-2002 08:57 AM
SolutionThe bad block relocation information is stored on the LVM disk headers. You don't dd that when you dd an lv... so potentially you could get data corruption.
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 09:08 AM
тАО04-25-2002 09:08 AM
Re: What is the technical reason you shouldn't/can't use dd to copy one LV to another LV ?
lvcreate -L 10 -n test1 /dev/vg00
lvcreate -L 10 -n test2 /dev/vg01
newfs -F vxfs /dev/vg00/rtest1
newfs -F vxfs /dev/vg01/rtest2
mkdir /test1 /test2
mount /dev/vg00/test1 test1
cp -pR /etc /test1
dd if=/dev/vg00/rtest1 of=/dev/vg01/rtest2 bs=1024k
fsck /dev/vg01/rtest2
mount /dev/vg01/test2 /test2
ll -R | wc -l /test1
1438
ll -R | wc -l /test2
1438
Everything looks ok.
To be safe back up the filesystem and restore it to the new lv.
HTH
Dave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 09:16 AM
тАО04-25-2002 09:16 AM
Re: What is the technical reason you shouldn't/can't use dd to copy one LV to another LV ?
dd if=/dev/vg01/lvol1 of=/dev/vg02/lvol2 bs=64b
We have a situation with an AIX server that has 750+ GBs worth of user filesystems that contain 250,000+ files and are over 32GBs each. Using find/cpio on these deep directory structures is too much overhead on the FS buffer & O/S.
I have used dd on those types of filesystem (LVs) with apparently success but other technical folks have told me I couldn't do it unless the filesystems were NOT made through an LVM.
No one up to this point could give me a true technical reason why ... except for Bill McNamara ... read it ... it seems reasonable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 09:21 AM
тАО04-25-2002 09:21 AM
Re: What is the technical reason you shouldn't/can't use dd to copy one LV to another LV ?
It is very simple thing to understand that dd copies the data in hardware fashion means it will not look for the actual data written on the disk and format of data.
While LVM is spreaded over many disks and it manages data in a logical way. Hence it is not possible at all.
-pap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 09:21 AM
тАО04-25-2002 09:21 AM
Re: What is the technical reason you shouldn't/can't use dd to copy one LV to another LV ?
Dave .... thank you for confirming that you could do what I had done ... might not be the safest utility but we can migrate a 32GB filesystem with 250K files in 110 minutes ... cpio took over 4 hours.
If anyone else can offer reasons why not to use dd ... I welcome them ....
thanks folks for great responses to a great forum ... answers in 10 minutes or less compared to a couple of days with AIX technical support .....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 09:24 AM
тАО04-25-2002 09:24 AM
Re: What is the technical reason you shouldn't/can't use dd to copy one LV to another LV ?
I have successfully dd'd logical volumes spread over multiple disks serveral times on AIX .... it is possible at least on a RS/6000.
If someone could try it on an HP9000 over a couple of disks and see if it works or not ... that would be great.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 09:27 AM
тАО04-25-2002 09:27 AM
Re: What is the technical reason you shouldn't/can't use dd to copy one LV to another LV ?
Learned something again.
I would not have come to this idea at all.
I would have copied the file over with ftp or something like that.
At least if the AIX server is still running.
Thanks,
C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 09:30 AM
тАО04-25-2002 09:30 AM
Re: What is the technical reason you shouldn't/can't use dd to copy one LV to another LV ?
Thanks for the explanation . Actually I misunderstood your question. What I understood that you want to copy a disk image of a logical volume.
Sorry about that. Ofcourse you can do the same thing on HP too. Its completely possible.
Thanks,
-pap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 09:37 AM
тАО04-25-2002 09:37 AM
Re: What is the technical reason you shouldn't/can't use dd to copy one LV to another LV ?
Just an addition - If you have already copied the "bad block directory area" from the source to destination file system, you can clear it with a utility called - 'bbdir'. You need to contact HP for getting this tool.
HTH,
Shiju
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 10:00 AM
тАО04-25-2002 10:00 AM
Re: What is the technical reason you shouldn't/can't use dd to copy one LV to another LV ?
once again thanks to all.