Bug 146685

Summary: The dd and raw man pages need to be fixed ...
Product: Red Hat Enterprise Linux 3 Reporter: James Hatt <jhatt>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED DUPLICATE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-10 12:02:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Hatt 2005-01-31 18:58:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3)
Gecko/20050104 Red Hat/1.4.3-3.0.7

Description of problem:
The raw man page says:
 The Linux dd (1) command does not  currently  align  its  buffers 
correctly, and so cannot be used on raw devices.

Yet the info on dd section gives the following example:
     disk=/dev/rdsk/c0t1d0s2
     tape=/dev/rmt/0
                                                                     
          
     # Copy all but the label from disk to tape.
     (dd bs=4k skip=1 count=0 && dd bs=512k) <$disk >$tape
                                                                     
          
     # Copy from tape back to disk, but leave the disk label alone.
     (dd bs=4k seek=1 count=0 && dd bs=512k) <$tape >$disk
     disk=/dev/rdsk/c0t1d0s2
     tape=/dev/rmt/0
                                                                     
          
     # Copy all but the label from disk to tape.
     (dd bs=4k skip=1 count=0 && dd bs=512k) <$disk >$tape
                                                                     
          
     # Copy from tape back to disk, but leave the disk label alone.
     (dd bs=4k seek=1 count=0 && dd bs=512k) <$tape >$disk

I see two problems here. First, dd seems to run just fine when talking
to raw devices, but the man page for raw says not to do this. Either
fix the dd program or update your documentation.
Second, the dd info page has an example from a System V type Unix (I'm
judging by the device path names. It is certainly not the goofy device
names used for raw devices i                                         
                                                                     
                                               n linux.) environment.
But this example is using both a raw disk and a raw tape drive! Is
this a good example for linux people to follow, knowing that dd does
not work with raw devices? I would redo these documents to reflect a
linux device file naming convention for a disk and a tape drive bound
to raw device names.
---jjh

Version-Release number of selected component (if applicable):
coreutils-4.5.3-26

How reproducible:
Always

Steps to Reproduce:
1. info dd
2. man raw
3.
    

Additional info:

Comment 1 Tim Waugh 2006-08-10 11:33:09 UTC
The dd(1) command in Red Hat Enterprise Linux 3 does in fact align buffers
correctly for raw devices, and so the error is in the raw(8) man page.

Comment 2 Karel Zak 2006-08-10 12:02:00 UTC

*** This bug has been marked as a duplicate of 176290 ***