From nobody@FreeBSD.org  Sun Jan  6 15:37:44 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 16F6816A417
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  6 Jan 2008 15:37:44 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 0E6FA13C448
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  6 Jan 2008 15:37:44 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m06FajhZ089767
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 6 Jan 2008 15:36:45 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m06Fajca089766;
	Sun, 6 Jan 2008 15:36:45 GMT
	(envelope-from nobody)
Message-Id: <200801061536.m06Fajca089766@www.freebsd.org>
Date: Sun, 6 Jan 2008 15:36:45 GMT
From: Martin Laabs <martin.laabs@mailbox.tu-dresden.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bsdlabel and newfs on DVD-RAM (handbook ch. 18.7.9)
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         119386
>Category:       docs
>Synopsis:       bsdlabel and newfs on DVD-RAM (handbook ch. 18.7.9)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    blackend
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 06 15:40:01 UTC 2008
>Closed-Date:    Thu Aug 12 07:47:29 UTC 2010
>Last-Modified:  Thu Aug 12 07:47:29 UTC 2010
>Originator:     Martin Laabs
>Release:        6.2
>Organization:
-
>Environment:
FreeBSD martin.laabs 6.2-RELEASE-p4 FreeBSD 6.2-RELEASE-p4 #0: Thu Apr 26 17:40:53 UTC 2007     root@i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
In chapter 18.7.9 of the handbook (Using a DVD-RAM) is a description how to use/prepare a DVD-RAM so that it can be used with freebsd. Therefore you have to use bsdlabel and newfs.
Since the blocksize of an DVD-RAM ist 2048 byte and bsdlabel and newfs (also with the -s 2048 option) do at least one write with blocksize smaller than 2048 byte both commands fails.

>How-To-Repeat:
For example the first command, which is "dd if=/dev/zero of=/dev/acd0 count=2", produces the following output on my system (Optiarc DVD RW AD-7170A/1.02 device)

su:~$ dd if=/dev/zero of=/dev/acd0 count=2
dd: /dev/acd0: Invalid argument
1+0 records in
0+0 records out
0 bytes transferred in 0.000138 secs (0 bytes/sec)

If I add the bs=2k option it works fine:

su:~$ dd if=/dev/zero of=/dev/acd0 count=1 bs=2k
1+0 records in
1+0 records out
2048 bytes transferred in 0.001740 secs (1177026 bytes/sec)
>Fix:


>Release-Note:
>Audit-Trail:

From: Marc Fonvieille <blackend@FreeBSD.org>
To: Martin Laabs <martin.laabs@mailbox.tu-dresden.de>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: docs/119386: bsdlabel and newfs on DVD-RAM (handbook ch.
	18.7.9)
Date: Sun, 6 Jan 2008 20:17:55 +0100

 On Sun, Jan 06, 2008 at 03:36:45PM +0000, Martin Laabs wrote:
 > 
 > >Description:
 > In chapter 18.7.9 of the handbook (Using a DVD-RAM) is a description how to use/prepare a DVD-RAM so that it can be used with freebsd. Therefore you have to use bsdlabel and newfs.
 > Since the blocksize of an DVD-RAM ist 2048 byte and bsdlabel and newfs (also with the -s 2048 option) do at least one write with blocksize smaller than 2048 byte both commands fails.
 > 
 > >How-To-Repeat:
 > For example the first command, which is "dd if=/dev/zero of=/dev/acd0 count=2", produces the following output on my system (Optiarc DVD RW AD-7170A/1.02 device)
 > 
 > su:~$ dd if=/dev/zero of=/dev/acd0 count=2
 > dd: /dev/acd0: Invalid argument
 > 1+0 records in
 > 0+0 records out
 > 0 bytes transferred in 0.000138 secs (0 bytes/sec)
 > 
 > If I add the bs=2k option it works fine:
 > 
 > su:~$ dd if=/dev/zero of=/dev/acd0 count=1 bs=2k
 > 1+0 records in
 > 1+0 records out
 > 2048 bytes transferred in 0.001740 secs (1177026 bytes/sec)
 
 So:
 
 # dd if=/dev/zero of=/dev/acd0 bs=2k count=1
 # bsdlabel -Bw acd0
 # newfs /dev/acd0
 
 is enough? (I can't test, I don't have any DVD-RAM writer under the
 hand)
 
 -- 
 Marc
Responsible-Changed-From-To: freebsd-doc->blackend 
Responsible-Changed-By: blackend 
Responsible-Changed-When: Sun Jan 6 19:55:12 UTC 2008 
Responsible-Changed-Why:  
I'll handle it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119386 

From: Marc Fonvieille <blackend@FreeBSD.org>
To: Martin Laabs <martin.laabs@mailbox.tu-dresden.de>
Cc:  
Subject: Re: docs/119386: bsdlabel and newfs on DVD-RAM (handbook ch.
	18.7.9)
Date: Sun, 6 Jan 2008 21:36:09 +0100

 On Sun, Jan 06, 2008 at 09:01:10PM +0100, Martin Laabs wrote:
 > Hi,
 > 
 >> So:
 >> 
 >> # dd if=/dev/zero of=/dev/acd0 bs=2k count=1
 >> # bsdlabel -Bw acd0
 >> # newfs /dev/acd0
 >> 
 >> is enough? (I can't test, I don't have any DVD-RAM writer under the
 >> hand)
 > 
 > No. Unfortunately all the instruction work with blocksizes of 512 byte.
 > But access with that blocksize create an input/output error of the DVD
 > devices. (In general this isn't  conspicuous because you use burncd or
 > cdrecord to write to all dvd recorable disks expect the DVD-RAM ...)
 > 
 > I found a way to create disklabels with a protofile the following way:
 > 
 > # bsdlabel -R /dev/acd0 disklabels
 > 
 > while the file "disklabels" contains:
 > 
 > ----------:<----------
 > 3 partitions:
 > #        size   offset  fstype  [fsize bsize bps/cpg]
 > a:      4360M   16      4.2BSD  2048 16384 8
 > b:      16      *       unused  0    0
 > c:      *       *       unused  0    0         # "raw" part, don't edit
 > ----------:<----------
 > 
 > The newfs util seems to have a bug because it does not pay
 > attention to the -S parameter in respect to the minimum blocksize
 > while writing the superblocks:
 > 
 > # newfs -S2048 /dev/acd0a
 > /dev/acd0a: 4.0MB (8192 sectors) block size 16384, fragment size 2048
 >         using 4 cylinder groups of 1.02MB, 65 blks, 192 inodes.
 > super-block backups (for fsck -b #) at:
 > newfs: wtfs: 65536 bytes at sector 160: Input/output error
 > 
 > 
 > I don't know who to bother with that problem. I don't have
 > the time to search and repair the bug (although I think I
 > found the line in mkfs.c). But because I'm not
 > absolute sure that this is a bug I don't want to write another
 > bug report now.
 >
 
 Well, I have no clue regarding this issue.  The current instruction set
 has been submitted by a DVD-RAM user, so it works at least for him,
 could you try, if possible, with another DVD-RAM writer?
 
 -- 
 Marc
State-Changed-From-To: open->feedback 
State-Changed-By: blackend 
State-Changed-When: Tue Aug 10 07:57:15 UTC 2010 
State-Changed-Why:  
Any news about this problem? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119386 
State-Changed-From-To: feedback->closed 
State-Changed-By: blackend 
State-Changed-When: Thu Aug 12 07:46:16 UTC 2010 
State-Changed-Why:  
The author reported that under 8.X the Handbook instructions work as 
expected, so let's close the PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=119386 
>Unformatted:
