NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/41131: Something weird with dd(1)



On Apr 3,  9:20pm, dlagno%rambler.ru@localhost (dlagno%rambler.ru@localhost) 
wrote:
-- Subject: bin/41131: Something weird with dd(1)

| >Number:         41131
| >Category:       bin
| >Synopsis:       Something weird with dd(1)
| >Confidential:   no
| >Severity:       non-critical
| >Priority:       medium
| >Responsible:    bin-bug-people
| >State:          open
| >Class:          sw-bug
| >Submitter-Id:   net
| >Arrival-Date:   Fri Apr 03 21:20:00 +0000 2009
| >Originator:     Denis Lagno
| >Release:        5.0_RC3
| >Organization:
| >Environment:
| NetBSD flam.gado 5.0_RC3 NetBSD 5.0_RC3 (FLAM) #0: Sun Mar 29 08:57:26 MSD 
2009  
dina%flam.gado@localhost:/volatile/worksrc/netbsd-current/obj/sys/arch/i386/compile/FLAM
 i386
| >Description:
| Trying to zeroize disk volume:
| 
| # dd if=/dev/null of=/dev/rcgd8e         
| 0+0 records in
| 0+0 records out
| 0 bytes transferred in 0.001 secs (0 bytes/sec)
| 
| 
| # disklabel cgd8                                                              
                
| # /dev/rcgd8d:
| type: cgd
| disk: cgd
| label: fictitious
| flags:
| bytes/sector: 512
| sectors/track: 2048
| tracks/cylinder: 1
| sectors/cylinder: 2048
| cylinders: 472057
| total sectors: 966773104
| rpm: 3600
| interleave: 1
| trackskew: 0
| cylinderskew: 0
| headswitch: 0           # microseconds
| track-to-track seek: 0  # microseconds
| drivedata: 0 
| 
| 7 partitions:
| #        size    offset     fstype [fsize bsize cpg/sgs]
|  d: 966773104         0     unused      0     0        # (Cyl.      0 - 
472057*)
|  e: 300000000         0     4.2BSD      0     0     0  # (Cyl.      0 - 
146484*)
|  f: 666773104 300000000     4.2BSD      0     0     0  # (Cyl. 146484*- 
472057*)
| 
| 
| 
| # ll /dev/rcgd8e                                                              
                
| crw-r-----  1 root  operator        93, 68 Apr  4 00:59 /dev/rcgd8e
| 
| 
| 
| 
| # ktruss  dd if=/dev/null of=/dev/rcgd8e 2>&1 | tail -n20
|   2318      1 dd       open("/dev/null", 0x602, 0x1b6) = 5
|   2318      1 dd       __fstat30(0x5, 0xbfbfea94)  = 0
|   2318      1 dd       ioctl(0x5, MTIOCGET, 0xbfbfeaf8) Err#25 ENOTTY
|   2318      1 dd       __sysctl(0xbfbfe6d4, 0x2, 0xbbbca674, 0xbfbfe6e0, 0, 
0) = 0
|   2318      1 dd       __sysctl(0xbfbfe5e8, 0x2, 0xbbbd14c0, 0xbfbfe5f0, 0, 
0) = 0
|   2318      1 dd       readlink("/dev/rcgd8e", 0xbfbfe6e5, 0x400) Err#2 ENOENT
|   2318      1 dd       break(0x8100000)            = 0
|   2318      1 dd       mmap(0, 0x100000, 0x3, 0x14001002, 0xffffffff, 0, 0, 
0) = 0xbb900000
|   2318      1 dd       gettimeofday(0x804d340, 0)  = 0
|   2318      1 dd       __sigaction_sigtramp(0x1d, 0xbfbfeb18, 0xbfbfeb00, 
0xbbb2fa50, 0x2) = 0
|   2318      1 dd       __sigaction_sigtramp(0x2, 0xbfbfeb18, 0xbfbfeb00, 
0xbbb2fa50, 0x2) = 0
|   2318      1 dd       read(0x3, 0xbb901400, 0x200) = 0
|        ""
|   2318      1 dd       close(0x5)                  = 0
|   2318      1 dd       gettimeofday(0xbfbfea78, 0) = 0
|   2318      1 dd       write(0x2, 0xbfbfea80, 0x1f) = 31
|        "0+0 records in\n0+0 records out\n"
|   2318      1 dd       write(0x2, 0xbfbfea80, 0x30) = 48
|        "0 bytes transferred in 0.001 secs (0 bytes/sec)\n"
|   2318      1 dd       exit(0)
| 
| 
| 
| 
| 
| # file /dev/rcgd8e                                                            
                
| /dev/rcgd8e: character special
| 
| # file -s /dev/rcgd8e
| /dev/rcgd8e: Unix Fast File system [v1] (little-endian), last mounted on 
/mnt2, last written at Tue Mar 31 12:09:15 2009, clean flag 1, number of blocks 
25000000, number of data blocks 24609909, number of cylinder groups 265, block 
size 16384, fragment size 2048, minimum percentage of free blocks 5, rotational 
delay 0ms, disk rotational speed 60rps, TIME optimization
| 
| >How-To-Repeat:

The 0 bytes written should have given you a clue. Perhaps you want /dev/zero
instead of /dev/null?

christos


Home | Main Index | Thread Index | Old Index