Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Dec 1998 16:53:49 +0100
From:      "José Mª Alcaide" <jose@we.lc.ehu.es>
To:        freebsd-stable@FreeBSD.ORG
Subject:   disklabel(8) problems with 640MB MO cartridge (2048-byte sectors)
Message-ID:  <366AA88D.8FB094E6@we.lc.ehu.es>

next in thread | raw e-mail | index | archive | help
I have just installed a Fujitsu magneto-optical drive in my system,
which runs FreeBSD 2.2.8-RELEASE. I'm trying to use 640MB MO cartridges;
these have a sector size of 2048 bytes. I read the od(4) man page
and it says that this driver can handle such disks. However, I'm having
serious problems with disklabel(8) that prevent me from using 640MB
cartridges (the 230MB ones, which have sectors of 512 bytes, work fine).

I have added an entry to /etc/disktab describing the 640MB cartridge:

mo640|Cartucho magneto-óptico de 640MB (3,5"):\
        :dt=SCSI:ty=removable:rm#4300:\
        :se#2048:nt#64:ns#32:nc#151:su#310352:\
        :pa#310352:oa#0:ba#8192:fa#2048:ta=4.2BSD:\
        :pc#310352:oc#0:ba#8192:fa#2048:

I have copied the geometry figures and the total number of sectors from
those reported by "od" at boot while a 640MB cartridge is inserted into
the drive.

When I try to disklabel a newly formatted 640MB cartridge, it seems
to work fine, and reading the disklabel directly also works:

  $ disklabel -w -r od0 mo640
  $ disklabel -r od0
  # /dev/rod0c:
  type: SCSI
  disk: mo640
  label: 
  flags: removeable
  bytes/sector: 2048
  sectors/track: 32
  tracks/cylinder: 64
  sectors/cylinder: 2048
  cylinders: 151
  sectors/unit: 310352
  rpm: 4300
  interleave: 1
  trackskew: 0
  cylinderskew: 0
  headswitch: 0           # milliseconds
  track-to-track seek: 0  # milliseconds
  drivedata: 0 
  
  3 partitions:
  #        size   offset    fstype   [fsize bsize bps/cpg]
    a:   310352        0    4.2BSD     2048  8192     0   # (Cyl.    0 - 151*)
    c:   310352        0    unused        0     0         # (Cyl.    0 - 151*)

But, when I try to read the kernel in-core label for od0, it fails:

  $ disklabel od0
  disklabel: ioctl DIOCGDINFO: Invalid argument

And I cannot do a newfs on od0a or od0c:

  $ newfs od0a
  newfs: /dev/rod0a: Invalid argument
  $ newfs od0c
  newfs: ioctl (GDINFO): Invalid argument
  newfs: /dev/rod0c: can't read disk label; disk type must be specified
  $ newfs -T mo640 od0c
  write error: 310351
  wtfs: Invalid argument

Sincerely, I'm totally lost. I have absolutely no idea of what's
happenning. I would be very thankful for any help.

-- JMA
-----------------------------------------------------------------------
José Mª Alcaide                         | mailto:jose@we.lc.ehu.es
Universidad del País Vasco              | http://www.we.lc.ehu.es/~jose
Dpto. de Electricidad y Electrónica     |
Facultad de Ciencias - Campus de Lejona | Tel.:  +34-946012479
48940 Lejona (Vizcaya) - SPAIN          | Fax:   +34-944858139
-----------------------------------------------------------------------
               "Go ahead... make my day." - H. Callahan

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?366AA88D.8FB094E6>