Subject: Re: cd-rom / dvd-ram with ufs
To: Sean Doran <smd@ebone.net>
From: Chuck Silvers <chuq@chuq.com>
List: current-users
Date: 12/02/1999 09:18:50
this is no doubt due to our half-assed support for non-512-byte-sector
devices.  Bill Studenmund has done some work to fix this, but it's not
in the tree yet and I'm not sure when it will be.  I also started doing
some work on this in the UBC branch, and though the code should be complete,
I don't think I ever tested it with anything other than normal scsi disks,
so I would assume there are some problems remaining.

this stuff will all be integrated in january sometime, after the
1.5 release branch is created.  (tho Bill's version might get in before
1.5 yet?  not sure how it's going to work out.)

(also, I'd think that a DVD-RAM would be more of an "sd" than a "cd",
but what do I know?)

-Chuck


On Thu, Dec 02, 1999 at 02:02:25PM +0100, Sean Doran wrote:
> 
> Hi -
> 
>   I was pleasantly surprised to find that -current of a couple
> of days ago will let me use /dev/rcd?d and /dev/cd?d to do disk-like
> things: edit an in-core disklabel, newfs_ffs a partition, dd a partition
> made with mkisofs onto the DVD-RAM, and mount it.
> 
>   The drive in question configures as 
> 
> cd1 at scsibus0 targ 4 lun 0: <MATSHITA, PD-2 LF-D100, A113> SCSI2 5/cdrom removable
> 
>   There is a pair of nagging problems:
> 
> 1/ I cannot write a disklabel to cd1.   It chokes like this
>    	sean# disklabel -R -r cd1 /tmp/a
>         ioctl DIOCWLABEL: Bad file descriptor
> 2/ I can newfs an FFS partition, even with -S 2048.  I can run fsck_ffs
>    and all is happy, but when I try to mount the partition, things fail
>    like this:
> 
> sean# newfs -S 2048 -i 8192 /dev/rcd1d
> Warning: 38 sector(s) in last cylinder unallocated
> /dev/rcd1d:     25562 sectors in 256 cylinders of 1 tracks, 100 sectors
>         49.9MB in 16 cyl groups (16 c/g, 3.12MB/g, 448 i/g)
> super-block backups (for fsck -b #) at:
>      8,  1608,  3208,  4808,  6408,  8008,  9608, 11208, 12808, 14408,
>  16008, 17608, 19208, 20808, 22408, 24008,
> sean# fsck_ffs -f /dev/rcd1d
> ** /dev/rcd1d
> ** File system is already clean
> ** Last Mounted on 
> ** Phase 1 - Check Blocks and Sizes
> ** Phase 2 - Check Pathnames
> ** Phase 3 - Check Connectivity
> ** Phase 4 - Check Reference Counts
> ** Phase 5 - Check Cyl groups
> 1 files, 1 used, 24976 free (8 frags, 6242 blocks, 0.0% fragmentation)
> 
> (incidentally dumpfs at this point says all the right things)
> 
> sean# mount -r /dev/cd1d /mnt
> mount_ffs: /dev/cd1d on /mnt: incorrect super block
> 
> Is this in any way fixable?
> 
> 	Sean.