Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

permission denied to dd disk?

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)

Posted on Dec 22, 2006 4:18 PM

Reply
Question marked as Best reply

Posted on Dec 22, 2006 4:27 PM

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>
33 replies

Dec 29, 2006 12:48 AM in response to waipeinan

I dont know if the copy has been done already, but if you need to know about the progress, you can send dd a signal to print out what it is doing currently:

open a new terminal window
type:
"sudo bash"
authenticate with your password (will not be echoed)
type:
"ps -alxww"
This will list all current processes. examine the output. somewhere there wil be a line like:
501 22624 22591 0 30 0 27252 352 - R p1 0:03.20 dd if=/dev/urandom of=/dev/null
of course the parameters of dd will be yours, not like in this example.
The second row, this is the process id of dd
now, send dd the INFO signal. kill needs to know which process it has to send the signal, so add the process id as the last parameter to the kill command:
"kill -INFO 22624"
The ouput wil be like:
58267+0 records in
58267+0 records out
29832704 bytes transferred in 5.264715 secs (5666537 bytes/sec)

if you repeat the kill command, you should see, that progress is beeing made.
---------------
About your last post:
I dont understand your question.
But if /dev/diskXsY is a vaild partition of your raid you want to backup to another disk partition like /dev/rdiskAsB the copy should be ok.

Dec 29, 2006 5:07 AM in response to nobody loopback

thanks again looback, thats clear.
The dd process completed and made a copy of the drive but unfortunatly not one that was recognised as the original half of the raid. I am led to believe that i need to make a complete copy of the disk and not just the slice for this to work and yet it is this operation that i repeatedly get permission denied! waaaaa!
the only other way for me to save this invaluable raid is to buy an identical disk and swap the control cards.
i do not understand why this kind of copy was successful but the complete disk clone was not?

thanks
s

Dec 29, 2006 6:17 AM in response to nobody loopback

i have a striped raid made up of two seagate barracuda 400gb sata drives which contains all of my photographic work, the first stage in gathering and then backing up this vital work.
The drives are mounted via a Sonnet Tempo-X eSATA 4+4.

for a short period the raid kept dissapearing, with one of the drives going off line. I rewired the power cables but found the problem was actually an intermittent fault on the controller card on one of the drives (the actual sata interface on the disk). eventually the drive stopped spinning up at all before i had a chance to work out how to back up so much information, and by swapping the controller from one card to the other i was able to get the drive spinning again and establish where the problem lay.
This has left me with two drives and one card! i actually ordered a replacement identical drive from a supplier in germany and unbelievably this (very expensive) drive has got lost in the post!

so right now i have one spare 400 gb non identical drive onto which i would like to try cloning the half raid in an attempt to revive the raid wihtout buying yet another drive.

when attempting a simple dd i get a permissions error (udo dd if=/dev/disk4 > /dev/disk3
-bash: /dev/disk3: Permission denied).
i am really flying blind here as i do not speak terminal, the commands i have initially used are in fact coming via a techi friend in texas who is stummped as to why the permissions are denied.

Hope this makes sense and thaks again for your help

Dec 29, 2006 9:06 AM in response to waipeinan

I have some experience with the built in osx raid, but there is one thing, i Dont remember: I dont know, if you still have access to the physical disks after the raid has been configured.

to check this, sudo to a root shell, an then:
"pdisk -l"

and paste the output here.

You should be able to copy the disk, if the device is still there by using dd:
dd if=/dev/rdiskN of=/dev/rdiskX

Are you from germany ? - I live there.

Dec 29, 2006 9:27 AM in response to nobody loopback

i actually live in london. Where are you in germany, i have been thinking of visiting berlin again soon, but haven't been there since the wall came down!


bell:~ bell$ pdisk -l
pdisk: can't open file '/dev/rdisk4' (Permission denied)
pdisk: can't open file '/dev/rdisk4' (Permission denied)
pdisk: can't open file '/dev/rdisk2' (Permission denied)
pdisk: can't open file '/dev/rdisk2' (Permission denied)
pdisk: can't open file '/dev/rdisk3' (Permission denied)
pdisk: can't open file '/dev/rdisk3' (Permission denied)
pdisk: can't open file '/dev/rdisk7' (Permission denied)
pdisk: can't open file '/dev/rdisk7' (Permission denied)
pdisk: can't open file '/dev/rdisk8' (Permission denied)
pdisk: can't open file '/dev/rdisk8' (Permission denied)

Partition map (with 512 byte blocks) on '/dev/rdisk6'
#: type name length base ( size )
1: Apple partitionmap partition map 62 @ 1
2: Apple_MDFW firmware 65536 @ 63 ( 32.0M)
3: Apple_HFS disk 78060448 @ 65599 ( 37.2G)

Device block size=512, Number of Blocks=78126048 (37.3G)
DeviceType=0x0, DeviceId=0x0

pdisk: can't open file '/dev/rdisk0' (Permission denied)
pdisk: can't open file '/dev/rdisk0' (Permission denied)
pdisk: can't open file '/dev/rdisk1' (Permission denied)
pdisk: can't open file '/dev/rdisk1' (Permission denied)
bell:~ bell$

Dec 29, 2006 9:33 AM in response to nobody loopback

Last login: Fri Dec 29 17:23:16 on ttyp1
Welcome to Darwin!
bell:~ bell$ sudo bash
Password:
bell:~ root# pdisk -l

Partition map (with 512 byte blocks) on '/dev/rdisk4'
#: type name length base ( size )
1: Apple partitionmap Apple 63 @ 1
2: Apple_Free 262144 @ 64 (128.0M)
3: Apple_HFS 489972534 @ 262208 (233.6G)
4: Apple_Free 10 @ 490234742

Device block size=512, Number of Blocks=490234752 (233.8G)
DeviceType=0x0, DeviceId=0x0


Partition map (with 512 byte blocks) on '/dev/rdisk2'
#: type name length base ( size )
1: Apple partitionmap Apple 63 @ 1
2: Apple_Free 262144 @ 64 (128.0M)
3: Apple_HFS Apple HFS_Untitled1 610192552 @ 262208 (291.0G)
4: Apple_HFS eDrive 14680064 @ 610454760 ( 7.0G)
5: Apple_Free 3 @ 625134824

Device block size=512, Number of Blocks=625134827 (298.1G)
DeviceType=0x0, DeviceId=0x0


Partition map (with 512 byte blocks) on '/dev/rdisk3'
#: type name length base ( size )
1: Apple partitionmap Apple 63 @ 1
2: Apple_Free 262144 @ 64 (128.0M)
3: Apple_HFS Apple HFS_Untitled1 781160544 @ 262208 (372.5G)
4: Apple_Free 16 @ 781422752

Device block size=512, Number of Blocks=781422768 (372.6G)
DeviceType=0x0, DeviceId=0x0


Partition map (with 512 byte blocks) on '/dev/rdisk7'
#: type name length base ( size )
1: Apple partitionmap Apple 63 @ 1
2: Apple_Free 17408 @ 64 ( 8.5M)
3: Apple_Boot eXternal booter 262144 @ 17472 (128.0M)
4: Apple_RAID Apple RAID_OfflineV2_Untitled2 781143136 @ 279616 (372.5G)
5: Apple_Free 16 @ 781422752

Device block size=512, Number of Blocks=781422768 (372.6G)
DeviceType=0x0, DeviceId=0x0

pdisk: can't open file '/dev/rdisk8' (Resource busy)
pdisk: can't open file '/dev/rdisk8' (Resource busy)

Partition map (with 512 byte blocks) on '/dev/rdisk6'
#: type name length base ( size )
1: Apple partitionmap partition map 62 @ 1
2: Apple_MDFW firmware 65536 @ 63 ( 32.0M)
3: Apple_HFS disk 78060448 @ 65599 ( 37.2G)

Device block size=512, Number of Blocks=78126048 (37.3G)
DeviceType=0x0, DeviceId=0x0


Partition map (with 512 byte blocks) on '/dev/rdisk0'
#: type name length base ( size )
1: Apple partitionmap Apple 63 @ 1
2: Apple_Free 262144 @ 64 (128.0M)
3: Apple_HFS Apple HFS_Untitled1 585852480 @ 262208 (279.4G)
4: Apple_Free 16 @ 586114688

Device block size=512, Number of Blocks=586114704 (279.5G)
DeviceType=0x0, DeviceId=0x0


Partition map (with 512 byte blocks) on '/dev/rdisk1'
#: type name length base ( size )
1: Apple partitionmap Apple 63 @ 1
2: Apple_Free 262144 @ 64 (128.0M)
3: Apple_HFS Apple HFS_Untitled1 976510944 @ 262208 (465.6G)
4: Apple_Free 16 @ 976773152

Device block size=512, Number of Blocks=976773168 (465.8G)
DeviceType=0x0, DeviceId=0x0

bell:~ root#

Dec 29, 2006 9:58 AM in response to waipeinan

Then just copy the source rdisk to the destination rdisk.

however,
I only see one disk of your raid (disk7) - where is the second ?

if disk7 is the source, and 3 the destination, then
"sudo dd if=/dev/rdisk7 of=/dev/rdisk3 bs=1048576"
(unmount disk3 before doing this)

CAUTION: your WHOLE destination disk will be overwritten by this procedure, not only a partition of it.
Also, it is possible, that even, if you make a sucessful copy, the raid-0 wont be go online again - but it is worth a try.

permission denied to dd disk?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.