Previous 1 2 3 Next 33 Replies Latest reply: Dec 29, 2006 5:01 PM by waipeinan
waipeinan Level 1 Level 1 (25 points)
i have been trying to dd a slice of a raid to a brand new drive and keep getting
bell:~ bell$ sudo dd if=/dev/disk4 > /dev/disk3
-bash: /dev/disk3: Permission denied
errors.
I have run some little test to this disk that have worked but any dd to this drive fails (haveing tried to clone an ipod as a test), when i paste the code it denies befor i even hit return.
I am really no terminal user and have been following instructions from a helpful techi friend online, but even he is stumpped!
any clues

the slice is half of an 800gb raid which is not mounted as one of the controler boards on one of the drives has failed, it is connected on a sonnet tempo 4x4 card as is the new drive, which is also on an ata-sata adapter. Its all a bit messy but im trying to save the raid in the first place and make tidy in the next.

g5 dual 2.3, Mac OS X (10.4.8)
  • Camelot Level 8 Level 8 (46,055 points)
    If you want to dd a slice of a RAID, you need to specify the slice. As written you're trying to dd an entire disk, not just a slice. In addition, you do not want to redirect the output of the dd command, rather you should use the of parameter

    You should be doing something more like:

    <pre class=command>sudo dd if=/dev/disk4s2 of=/dev/disk3s2</pre>
  • waipeinan Level 1 Level 1 (25 points)
    wow superfast response.
    i am really not a terminal user so please be patient.
    This drive is half of a raid, so i assumed i needed to copy the complete drive to be able to recreate the raid after?

    will the code you suggest work in this instance?

    this raid contains so much photographic work i am suitably cautious...
    thanks
  • waipeinan Level 1 Level 1 (25 points)
    also the destination disk is now identified as disk0s3 and the source is disk3s4
  • waipeinan Level 1 Level 1 (25 points)
    so i am now running tak
    sudo dd if=/dev/disk3s4 of=/dev/disk0s3
  • waipeinan Level 1 Level 1 (25 points)
    and i get the response
    bell:~ bell$ sudo dd if=/dev/disk3s4 of=/dev/disk0s3
    Password:
    dd: /dev/disk0s3: Resource busy
  • Camelot Level 8 Level 8 (46,055 points)
    Are you sure you want disk0?

    disk0 would typically be the internal/startup disk.

    What does diskutil list tell you?
  • waipeinan Level 1 Level 1 (25 points)
    disk0 is just where i have slotted the new ata drive, in place of the dvd, as i was having problems with the original code i thought it may have something to do wiht the ata/sata adapter
  • nobody loopback Level 4 Level 4 (2,570 points)
    If the disk, you want to copy the data to is not a raid volume, you have to use the rdisk instead of the disk device, so a:
    sudo dd if=/dev/disk3s4 of=/dev/rdisk0s3
    should be succesful, if rdisk0s3 really is the correct place you want to copy the data.
    Also, if you dont want the copy take an an endless time, use a larger block size then the default of 512, like bs=1048576
  • waipeinan Level 1 Level 1 (25 points)
    thankyou loopback, ill try that when i return from the break, but what is the full code including the block size specification. or will it ask for this to be specified?
  • nobody loopback Level 4 Level 4 (2,570 points)
    sudo dd if=/dev/disk3s4 of=/dev/rdisk0s3 bs=1048576

    see "man dd" in the terminal.

    The man page of dd lists other helpful options, "conv=noerror,sync" ist good, if your source is partially unreadable, but you like to copy it anyway.
  • maciscool Level 3 Level 3 (580 points)
    dd doesn't usually work for me on mac, I usually use ditto.
    ditto <source_disk> <destination_disk>
    For more on how to use ditto type man ditto, or ask here. There is also a nice front end to ditto called Carbon Copy Cloner

    iBook G4 14" 1.42 GHz 60GB 768MB - Blueberry Clamshell 300MHz 20GB 320MB- both->   Mac OS X (10.4.8)   Preforma 630CD, LCIII, Compaq laptop 266MHz 5GB 192MB (GNU/Linux, NOT windoze)
  • nobody loopback Level 4 Level 4 (2,570 points)
    depending on the problem, dd or ditto might be the better alternative.

    dd makes a 100% clone of a disk/partition
    ditto only copies the files (and fscks up big when dealing with special files and permissions)
    If someone just wants to rescue his data ditto or rsync is fine.
    dd cannot copy a filesystem to a location with different size but ditto will.
    If you need to backup a disk for the purpose of restore later to the original location and want an identical result (example: think of some music software copy protection) dd is the better alternative.
    Also dd will copy a damaged disk/filesystem ditto will fail here too
  • waipeinan Level 1 Level 1 (25 points)
    i believe in this instance it's dd i require as the volume im trying to duplicate is only half of an 800 gb raid, therefor it will not mount and cannot be copied by apps like carbon copy cloner.
    im looking forward to trying the last code supplied by loopback when i return to london this evening and if it works i hope to be able to access amost 800gbs of photographic work trapped by a failed drive in/out card.
  • waipeinan Level 1 Level 1 (25 points)
    well i tried and the same result

    localhost:~ bell$ dd if=/dev/disk4s4 of=/dev/rdisk0s3 bs=1048576
    dd: /dev/disk4s4: Permission denied
    localhost:~ bell$
Previous 1 2 3 Next