Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jul 2005 15:48:52 +0100
From:      Chris Hodgins <christopher.hodgins@gmail.com>
To:        freebsd-stable@freebsd.org
Subject:   gmirror, sparc and SCSI problems
Message-ID:  <63c3899e05070807487e0891de@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi all,

Experiencing a few difficulties setting up raid mirroring across two
SCSI disks on a sparc based server.  Disk da0 contains a working and
recent install of FreeBSD 5-4 RELEASE and da1 is blank.  We have been
following the guidance given in the first part of
http://people.freebsd.org/~rse/mirror/ but have hit numerous problems.

The first problem is that the system is lacking fdisk.  From reading
around on various newsgroups, this appears to be due to the sparc
architecture.  It seems that we can probably miss this step out anyway
though although it may be related to our next problem.

The next step requires us to run bsdlabel (or in our case sunlabel) on
/dev/mirror/gm0s1.  In our /dev/mirror directory we only have a single
gm0 node so we can't run these steps either.  We managed to assemble
da1 with the partitions we wanted using sysinstall and had thought
that by creating the mirror on da1 it would generate the appropriate
gm0a, gm0b...etc.  Unfortunately this did not work.  Here is the
output of sunlabel:

# sunlabel -c mirror/gm0
# /dev/mirror/gm0:
text: FreeBSD34G cyl 4425 alt 2 hd 255 sec 63
bytes/sectors: 512
sectors/cylinder: 16065
sectors/unit: 71087625

8 partitions:
#
# Size is in cylinders.
# Offset is in cylinders.
#    size       offset
#    ---------- ----------
  b:        262        131
  c:       4425          0
  d:        131          0
  e:        653        393
  f:        262       1046

Straight after we ran sysinstall we ran sunlabel -e da1 and added the
offset of 16, as you can see from the above output our offset has now
gone again.

Now this also brings us onto another interesting problem.  Our two
scsi disks are identical.  Same size, manufacturer and part number.=20
However running sunlabel -c on both of them gives very different sizes
in regards to cyclinders and sectors:

# sunlabel -c da0
# /dev/da0:
text: FreeBSD34G cyl 24620 alt 2 hd 27 sec 107
bytes/sectors: 512
sectors/cylinder: 2889
sectors/unit: 71127180

8 partitions:
#
# Size is in cylinders.
# Offset is in cylinders.
#    size       offset
#    ---------- ----------
  a:        726          0
  b:       1452        726
  c:      24620          0
  d:       3630       2178
  e:       1452       5808


# sunlabel -c da1
# /dev/da1:
text: FreeBSD34G cyl 4425 alt 2 hd 255 sec 63
bytes/sectors: 512
sectors/cylinder: 16065
sectors/unit: 71087625

8 partitions:
#
# Size is in cylinders.
# Offset is in cylinders.
#    size       offset
#    ---------- ----------
  b:        262        131
  c:       4425          0
  d:        131          0
  e:        653        393
  f:        262       1046

dmesg shows our disks like this:

da0 at sym0 bus 0 target 0 lun 0
da0: <SEAGATE ST336607LSUN36G 0207> Fixed Direct Access SCSI-3 device
da0: 80.000MB/s transfers (40.000MHz, offset 31, 16bit), Tagged
Queueing Enabledda0: 34732MB (71132959 512 byte sectors: 255H 63S/T
4427C)
da1 at sym0 bus 0 target 1 lun 0
da1: <SEAGATE ST336607LSUN36G 0207> Fixed Direct Access SCSI-3 device
da1: 80.000MB/s transfers (40.000MHz, offset 31, 16bit), Tagged
Queueing Enabledda1: 34732MB (71132959 512 byte sectors: 255H 63S/T
4427C)

dmesg also shows the mirror being completed:
GEOM_MIRROR: Device gm0 created (id=3D2793795997).
GEOM_MIRROR: Device gm0: provider da1 detected.
GEOM_MIRROR: Device gm0: provider da1 activated.
GEOM_MIRROR: Device gm0: provider mirror/gm0 launched.

Does anyone have any information that may help us resolve any of these prob=
lems?

Many thanks
Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?63c3899e05070807487e0891de>