SUMMARY: I/O error with dd (Solaris 2.5.1)

From: DAUBIGNE Sebastien - BOR <>
Date: Wed Jun 02 2004 - 08:31:03 EDT
Thanks to everyone, and particularly :

- Casper Dik, who suggested to verify the disk label :

>prtvtoc /dev/rdsk/c3t2d0s2
prtvtoc: /dev/rdsk/c3t2d0s2: Unable to read Disk geometry

Casper also add that the creat() syscall will not  try to create the file if
it already exists, as stated in the creat(2) manpage :

"creat() creates a new ordinary file or prepares to rewrite an existing file
named by the path name pointed to by path. If the file exists, the length is
truncated  to  0  and  the mode and owner are unchanged."

-	Peter, who suggested to check /var/adm/messages :

Jun  2 13:53:08 FTMSFP unix: WARNING: /pci@6,4000/scsi@4,1/sd@0,0 (sd45):
Jun  2 13:53:08 FTMSFP unix:    corrupt label - wrong magic number

Well, the disk label was simply erased by a previous "dd".
After reinitializing the label with "format", it just worked.

Sebastien DAUBIGNE <>
AtosOrigin - ERP/Pessac

-----Message d'origine-----
De:	Casper Dik []
Date:	mercredi 2 juin 2004 12:52
@:	DAUBIGNE Sebastien  - BOR
Objet:	Re: I/O error with dd (Solaris 2.5.1)

>Trying to erase a disk content with Solaris 2.5.1 with "dd", I get the
>following error :
># dd if=/dev/zero of=/dev/rdsk/c3t2d0s2  bs=1024
>dd: /dev/rdsk/c3t2d0s2: open: I/O error
>Trussing the "dd" process, it seems it tries to create the output file,
>although it already exists :
>2693/1:         open("/dev/zero", O_RDONLY)                     = 3
>2693/1:         creat("/dev/rdsk/c3t2d0s2", 0666)               Err#5 EIO
>The command works well with Solaris 2.6+.
>I couldn't find any patch for "dd".
sunmanagers mailing list
Received on Wed Jun 2 08:30:58 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:32 EST