Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Duplicating disks with the Unix dd command - help

  • 05-02-2008 6:45pm
    #1
    Registered Users Posts: 256 ✭✭


    I bought an old IBM Risc6000 box running AIX recently to practice my poor unix skills.
    Before I wreak havoc on it I thought I would backup the boot disk onto an extra disk I added.
    After research I decided to use the dd command.
    dd if=/dev/hdisk0 of=/dev/hdisk2

    I have heard that this can take a long time to run but mine has been running for 24hrs+ now and still not finished.
    The disks are similar sizes: 9GB SCSI.

    Does anyone have experience to relate of using dd in unix/Linux/AIX??
    Thanks in advance..


Comments

  • Registered Users, Registered Users 2 Posts: 354 ✭✭AndrewMc


    That should be all you need, and 9GB isn't much, but you do say it's a slow box. You might consider the "bs", or blocksize option. dd reads a block from "if" and then writes it to "of" before going back to "if" again, but when the blocks are small (and by default it's only 512 bytes, I think) all this switching from one to the other is not very efficient. If you add an option like bs=32768 it'll read 32kB at a time, which is more efficient for the drives and the OS.

    If you hunt, you'll find some documents on the performance of dd, and increasing the blocksize gave a significant boost, but going beyond 32k or 64k wasn't of much benefit (or may have been worse).


  • Registered Users Posts: 256 ✭✭patto_chan


    Thanks for the suggestion.
    But my dd command actually completed a little while ago - almost 2 days after I started it!
    It didn't give any errors - just said 17,7xx,xxx records copied.
    How can there be 17 million records if it's only a 9GB disk? (remember I'm a Unix noob.)

    Tomorrow I will swap out hdisk0 and replace it with its new clone, hdisk2 (setting the SCSI ID to 0) and see if the machine boots from the clone.


  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    patto_chan wrote: »
    How can there be 17 million records if it's only a 9GB disk? (remember I'm a Unix noob.)

    It's not unix specific really. 17,000,000 x (512 bytes) = roughly 9GB.

    I've used dd for exactly what you're doing. Should work perfectly tbh.


Advertisement