Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jun 2009 12:02:53 +0100
From:      Anton Shterenlikht <mexas@bristol.ac.uk>
To:        freebsd-ia64@freebsd.org, freebsd-questions@freebsd.org, freebsd-current@freebsd.org
Subject:   gmirror gm0 destroyed on shutdown; GPT corrupt
Message-ID:  <20090625110253.GA31443@mech-cluster238.men.bris.ac.uk>

next in thread | raw e-mail | index | archive | help
FreeBSD 8.0-CURRENT-200906 ia64, fresh installation

Following the handbook, section 19.1 RAID1 - mirroring, I'm trying to
use gmirror with 2 identical scsi disks:

da0 at mpt0 bus 0 target 0 lun 0
da0: <SEAGATE ST318452LC 2213> Fixed Direct Access SCSI-3 device
da0: 160.000MB/s transfers (80.000MHz, offset 63, 16bit)
da0: Command Queueing Enabled
da0: 17366MB (35566478 512 byte sectors: 255H 63S/T 2213C)
da1 at mpt0 bus 0 target 1 lun 0
da1: <SEAGATE ST318452LC 2213> Fixed Direct Access SCSI-3 device
da1: 160.000MB/s transfers (80.000MHz, offset 63, 16bit)
da1: Command Queueing Enabled
da1: 17366MB (35566478 512 byte sectors: 255H 63S/T 2213C)


# sysctl kern.geom.debugflags=17
kern.geom.debugflags: 0 -> 17

# gmirror label -vb round-robin gm0 /dev/da0
Metadata value stored on /dev/da0.
Done.

# gmirror load
#g_modevent(MIRROR, LOAD)
g_post_event_x(0xe000000004b8eb10, 0xe000000010686e40, 2, 262144)
g_load_class(MIRROR)
g_mirror_taste(MIRROR, acd0t01)
acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x02 ascq=0x00
g_detach(0xe0000000106eb580)
g_destroy_consumer(0xe0000000106eb580)
g_destroy_geom(0xe000000010724800(mirror:taste))
g_mirror_taste(MIRROR, acd0)
acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x02 ascq=0x00
g_detach(0xe0000000106eb700)
g_destroy_consumer(0xe0000000106eb700)
g_destroy_geom(0xe000000010724a00(mirror:taste))
g_mirror_taste(MIRROR, da2p6)
g_detach(0xe0000000106eb880)
g_destroy_consumer(0xe0000000106eb880)
g_destroy_geom(0xe000000010724c00(mirror:taste))
g_mirror_taste(MIRROR, da2p5)
g_detach(0xe0000000106eba80)
g_destroy_consumer(0xe0000000106eba80)
g_destroy_geom(0xe000000010724c00(mirror:taste))
g_mirror_taste(MIRROR, da2p4)
g_detach(0xe0000000106ebc00)
g_destroy_consumer(0xe0000000106ebc00)
g_destroy_geom(0xe000000010630700(mirror:taste))
g_mirror_taste(MIRROR, da2p3)
g_detach(0xe000000010738000)
g_destroy_consumer(0xe000000010738000)
g_destroy_geom(0xe000000010724e00(mirror:taste))
g_mirror_taste(MIRROR, da2p2)
g_detach(0xe000000010738180)
g_destroy_consumer(0xe000000010738180)
g_destroy_geom(0xe00000001075f400(mirror:taste))
g_mirror_taste(MIRROR, da2p1)
g_detach(0xe000000010620e80)
g_destroy_consumer(0xe000000010620e80)
g_destroy_geom(0xe000000010724a00(mirror:taste))
g_mirror_taste(MIRROR, da0p6)
g_detach(0xe0000000106e9580)
g_destroy_consumer(0xe0000000106e9580)
g_destroy_geom(0xe000000010724800(mirror:taste))
g_mirror_taste(MIRROR, da0p5)
g_detach(0xe000000010739700)
g_destroy_consumer(0xe000000010739700)
g_destroy_geom(0xe0000000108f8f00(mirror:taste))
g_mirror_taste(MIRROR, da0p4)
g_detach(0xe000000010739680)
g_destroy_consumer(0xe000000010739680)
g_destroy_geom(0xe0000000108f8d00(mirror:taste))
g_mirror_taste(MIRROR, da0p3)
g_detach(0xe000000010739800)
g_destroy_consumer(0xe000000010739800)
g_destroy_geom(0xe00000001072ce00(mirror:taste))
g_mirror_taste(MIRROR, da0p2)
g_detach(0xe000000010739780)
g_destroy_consumer(0xe000000010739780)
g_destroy_geom(0xe0000000108f8700(mirror:taste))
g_mirror_taste(MIRROR, da0p1)
g_detach(0xe0000000106e9680)
g_destroy_consumer(0xe0000000106e9680)
g_destroy_geom(0xe00000001072cb00(mirror:taste))
g_mirror_taste(MIRROR, da2)
g_detach(0xe0000000106a4900)
g_destroy_consumer(0xe0000000106a4900)
g_destroy_geom(0xe00000001075fa00(mirror:taste))
g_mirror_taste(MIRROR, da1)
g_detach(0xe0000000106ebc80)
g_destroy_consumer(0xe0000000106ebc80)
g_destroy_geom(0xe000000010630b00(mirror:taste))
g_mirror_taste(MIRROR, da0)
g_detach(0xe0000000106e8400)
g_destroy_consumer(0xe0000000106e8400)
g_destroy_geom(0xe00000001072c800(mirror:taste))
g_post_event_x(0xe000000004b861c0, 0xe0000000108f9000, 2, 0)
  ref 0xe0000000108f9000
  ref 0xe000000010760800
GEOM_MIRROR: Device mirror/gm0 launched (1/1).
g_mirror_taste(MIRROR, ufsid/4a3fa1b76cb317b5)
g_detach(0xe0000000106a4780)
g_destroy_consumer(0xe0000000106a4780)
g_destroy_geom(0xe0000000108fa300(mirror:taste))
g_mirror_taste(MIRROR, ufsid/4a3fa1b69c522d30)
g_detach(0xe0000000106e9900)
g_destroy_consumer(0xe0000000106e9900)
g_destroy_geom(0xe0000000108fac00(mirror:taste))
g_mirror_taste(MIRROR, ufsid/4a3fa1b751514347)
g_detach(0xe0000000106ebb00)
g_destroy_consumer(0xe0000000106ebb00)
g_destroy_geom(0xe00000001075f300(mirror:taste))
g_mirror_taste(MIRROR, ufsid/4a3fa1b5e5003da2)
g_detach(0xe0000000106e9880)
g_destroy_consumer(0xe0000000106e9880)
g_destroy_geom(0xe000000010763600(mirror:taste))
g_mirror_taste(MIRROR, iso9660/FreeBSD_Install)
acd0: FAILURE - READ_BIG MEDIUM ERROR asc=0x02 ascq=0x00
g_detach(0xe000000010738080)
g_destroy_consumer(0xe000000010738080)
g_destroy_geom(0xe00000001081dd00(mirror:taste))
g_mirror_taste(MIRROR, mirror/gm0)
g_detach(0xe0000000106e9980)
g_destroy_consumer(0xe0000000106e9980)
g_destroy_geom(0xe000000010763600(mirror:taste))
dev_taste(DEV,mirror/gm0)
g_part_taste(PART,mirror/gm0)

GEOM: mirror/gm0: the secondary GPT table is corrupt or invalid.
GEOM: mirror/gm0: using the primary only -- recovery suggested.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

g_post_event_x(0xe000000004b861c0, 0xe0000000108fa400, 2, 0)
  ref 0xe0000000108fa400
  ref 0xe0000000108f8300
g_post_event_x(0xe000000004b861c0, 0xe00000001075fa00, 2, 0)
  ref 0xe00000001075fa00
  ref 0xe0000000108f8300
g_post_event_x(0xe000000004b861c0, 0xe0000000108f8700, 2, 0)
  ref 0xe0000000108f8700
  ref 0xe0000000108f8300
g_post_event_x(0xe000000004b861c0, 0xe0000000108f8500, 2, 0)
  ref 0xe0000000108f8500
  ref 0xe0000000108f8300
g_post_event_x(0xe000000004b861c0, 0xe000000010725a00, 2, 0)
  ref 0xe0000000108f8500
  ref 0xe0000000108f8300
g_post_event_x(0xe000000004b861c0, 0xe000000010725a00, 2, 0)
  ref 0xe000000010725a00
  ref 0xe0000000108f8300
g_post_event_x(0xe000000004b861c0, 0xe000000010631500, 2, 0)
  ref 0xe000000010631500
  ref 0xe0000000108f8300
g_label_taste(LABEL, mirror/gm0)
g_detach(0xe000000010738080)
g_destroy_consumer(0xe000000010738080)
g_destroy_geom(0xe00000001075ef00(label:taste))
g_mirror_taste(MIRROR, mirror/gm0p1)
g_detach(0xe000000010739b00)
g_destroy_consumer(0xe000000010739b00)
g_destroy_geom(0xe000000010762f00(mirror:taste))
dev_taste(DEV,mirror/gm0p1)
g_part_taste(PART,mirror/gm0p1)
g_wither_geom(0xe000000010763a00(mirror/gm0p1))
g_label_taste(LABEL, mirror/gm0p1)
g_detach(0xe0000000108fc000)
g_destroy_consumer(0xe0000000108fc000)
g_destroy_geom(0xe00000001081d500(label:taste))
g_mirror_taste(MIRROR, mirror/gm0p2)
g_detach(0xe0000000108fc100)
g_destroy_consumer(0xe0000000108fc100)
g_destroy_geom(0xe0000000108f9d00(mirror:taste))
dev_taste(DEV,mirror/gm0p2)
g_part_taste(PART,mirror/gm0p2)
g_wither_geom(0xe00000001072c800(mirror/gm0p2))
g_label_taste(LABEL, mirror/gm0p2)
g_slice_config(mirror/gm0p2, 0, 1)
g_post_event_x(0xe000000004b861c0, 0xe0000000108fae00, 2, 0)
  ref 0xe0000000108fae00
  ref 0xe0000000108faa00
g_detach(0xe0000000108fc300)
g_destroy_consumer(0xe0000000108fc300)
g_destroy_geom(0xe00000001081d100(label:taste))
g_mirror_taste(MIRROR, mirror/gm0p3)
g_detach(0xe0000000108fc380)
g_destroy_consumer(0xe0000000108fc380)
g_destroy_geom(0xe000000010724600(mirror:taste))
dev_taste(DEV,mirror/gm0p3)
g_part_taste(PART,mirror/gm0p3)
g_wither_geom(0xe00000001075ed00(mirror/gm0p3))
g_label_taste(LABEL, mirror/gm0p3)
g_detach(0xe0000000106e9900)
g_destroy_consumer(0xe0000000106e9900)
g_destroy_geom(0xe000000010630700(label:taste))
g_mirror_taste(MIRROR, mirror/gm0p4)
g_detach(0xe0000000108fc600)
g_destroy_consumer(0xe0000000108fc600)
g_destroy_geom(0xe0000000108fad00(mirror:taste))
dev_taste(DEV,mirror/gm0p4)
g_part_taste(PART,mirror/gm0p4)
g_wither_geom(0xe000000010762a00(mirror/gm0p4))
g_label_taste(LABEL, mirror/gm0p4)
g_slice_config(mirror/gm0p4, 0, 1)
g_post_event_x(0xe000000004b861c0, 0xe000000010630c00, 2, 0)
  ref 0xe000000010630c00
  ref 0xe0000000108f8c00
g_detach(0xe0000000108fc800)
g_destroy_consumer(0xe0000000108fc800)
g_destroy_geom(0xe000000010763900(label:taste))
g_mirror_taste(MIRROR, mirror/gm0p5)
g_detach(0xe0000000108fcb00)
g_destroy_consumer(0xe0000000108fcb00)
g_destroy_geom(0xe000000010724800(mirror:taste))
dev_taste(DEV,mirror/gm0p5)
g_part_taste(PART,mirror/gm0p5)
g_wither_geom(0xe000000010724e00(mirror/gm0p5))
g_label_taste(LABEL, mirror/gm0p5)
g_slice_config(mirror/gm0p5, 0, 1)
g_post_event_x(0xe000000004b861c0, 0xe0000000108f8e00, 2, 0)
  ref 0xe0000000108f8e00
  ref 0xe00000001075f400
g_detach(0xe000000010739780)
g_destroy_consumer(0xe000000010739780)
g_destroy_geom(0xe00000001072c400(label:taste))
g_mirror_taste(MIRROR, mirror/gm0p6)
g_detach(0xe0000000108fcb80)
g_destroy_consumer(0xe0000000108fcb80)
g_destroy_geom(0xe00000001081d500(mirror:taste))
dev_taste(DEV,mirror/gm0p6)
g_part_taste(PART,mirror/gm0p6)
g_wither_geom(0xe0000000108f8200(mirror/gm0p6))
g_label_taste(LABEL, mirror/gm0p6)
g_slice_config(mirror/gm0p6, 0, 1)
g_post_event_x(0xe000000004b861c0, 0xe00000001081d100, 2, 0)
  ref 0xe00000001081d100
  ref 0xe0000000108f9d00
g_detach(0xe0000000108fcc80)
g_destroy_consumer(0xe0000000108fcc80)
g_destroy_geom(0xe0000000108fb300(label:taste))
g_mirror_taste(MIRROR, ufsid/4a43468a267a63a6)
g_detach(0xe0000000108fcd80)
g_destroy_consumer(0xe0000000108fcd80)
g_destroy_geom(0xe000000010724600(mirror:taste))
dev_taste(DEV,ufsid/4a43468a267a63a6)
g_part_taste(PART,ufsid/4a43468a267a63a6)
g_wither_geom(0xe000000010724600(ufsid/4a43468a267a63a6))
g_label_taste(LABEL, ufsid/4a43468a267a63a6)
g_mirror_taste(MIRROR, ufsid/4a43468cf6208bf0)
g_detach(0xe000000010739480)
g_destroy_consumer(0xe000000010739480)
g_destroy_geom(0xe00000001081d500(mirror:taste))
dev_taste(DEV,ufsid/4a43468cf6208bf0)
g_part_taste(PART,ufsid/4a43468cf6208bf0)
g_wither_geom(0xe000000010724800(ufsid/4a43468cf6208bf0))
g_label_taste(LABEL, ufsid/4a43468cf6208bf0)
g_mirror_taste(MIRROR, ufsid/4a43468b228d030c)
g_detach(0xe0000000106eaf80)
g_destroy_consumer(0xe0000000106eaf80)
g_destroy_geom(0xe00000001081c200(mirror:taste))
dev_taste(DEV,ufsid/4a43468b228d030c)
g_part_taste(PART,ufsid/4a43468b228d030c)
g_wither_geom(0xe00000001081dc00(ufsid/4a43468b228d030c))
g_label_taste(LABEL, ufsid/4a43468b228d030c)
g_mirror_taste(MIRROR, ufsid/4a43468c8715f453)
g_detach(0xe0000000108fd100)
g_destroy_consumer(0xe0000000108fd100)
g_destroy_geom(0xe0000000108f8100(mirror:taste))
dev_taste(DEV,ufsid/4a43468c8715f453)
g_part_taste(PART,ufsid/4a43468c8715f453)
g_wither_geom(0xe000000010724a00(ufsid/4a43468c8715f453))
g_label_taste(LABEL, ufsid/4a43468c8715f453)
g_detach(0xe0000000106ea680)
g_destroy_consumer(0xe0000000106ea680)
g_destroy_geom(0xe000000010724a00(ufsid/4a43468c8715f453))
g_detach(0xe0000000108fd000)
g_destroy_consumer(0xe0000000108fd000)
g_destroy_geom(0xe00000001081dc00(ufsid/4a43468b228d030c))
g_detach(0xe000000010739280)
g_destroy_consumer(0xe000000010739280)
g_destroy_geom(0xe000000010724800(ufsid/4a43468cf6208bf0))
g_detach(0xe0000000106eb880)
g_destroy_consumer(0xe0000000106eb880)
g_destroy_geom(0xe000000010724600(ufsid/4a43468a267a63a6))
g_detach(0xe000000010738000)
g_destroy_consumer(0xe000000010738000)
g_destroy_geom(0xe0000000108f8200(mirror/gm0p6))
g_detach(0xe0000000106a4900)
g_destroy_consumer(0xe0000000106a4900)
g_destroy_geom(0xe000000010724e00(mirror/gm0p5))
g_detach(0xe0000000108fc700)
g_destroy_consumer(0xe0000000108fc700)
g_destroy_geom(0xe000000010762a00(mirror/gm0p4))
g_detach(0xe0000000108fc480)
g_destroy_consumer(0xe0000000108fc480)
g_destroy_geom(0xe00000001075ed00(mirror/gm0p3))
g_detach(0xe0000000108fc200)
g_destroy_consumer(0xe0000000108fc200)
g_destroy_geom(0xe00000001072c800(mirror/gm0p2))
g_detach(0xe000000010739c80)
g_destroy_consumer(0xe000000010739c80)
g_destroy_geom(0xe000000010763a00(mirror/gm0p1))

# ls -al /dev/mirror/
total 1
dr-xr-xr-x  2 root  wheel          512 Jun 25 11:16 .
dr-xr-xr-x  9 root  wheel          512 Jun 25 11:22 ..
crw-r-----  1 root  operator    0, 105 Jun 25 11:16 gm0
crw-r-----  1 root  operator    0, 116 Jun 25 11:16 gm0p1
crw-r-----  1 root  operator    0, 117 Jun 25 11:16 gm0p2
crw-r-----  1 root  operator    0, 118 Jun 25 11:16 gm0p3
crw-r-----  1 root  operator    0, 119 Jun 25 11:16 gm0p4
crw-r-----  1 root  operator    0, 120 Jun 25 11:16 gm0p5
crw-r-----  1 root  operator    0, 121 Jun 25 11:16 gm0p6
#

#echo 'geom_mirror_load="YES"' >> /boot/loader.conf

# cat /boot/loader.conf
vfs.root.mountfrom="ufs:/dev/da0p2"
geom_mirror_load="YES"
#


On shutdown I see on console:

[skip]
g_detach(0xe0000000106c7000)
g_destroy_consumer(0xe0000000106c7000)
g_destroy_geom(0xe0000000106c3200(mirror/gm0p2))
g_destroy_geom(0xe000000010828200(mirror/gm0))
g_post_event_x(0xe000000004c33e70, 0xe0000000106c6d80, 2, 0)
g_wither_geom(0xe0000000106efa00(gm0.sync))

GEOM_MIRROR: Device gm0 destroyed.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
g_wither_geom(0xe000000010826900(gm0))
g_detach(0xe0000000106c6d80)
g_destroy_consumer(0xe0000000106c6d80)
g_destroy_geom(0xe0000000106efa00(gm0.sync))
g_destroy_geom(0xe000000010826900(gm0))

And when the system is rebooted, there is no /dev/mirror anymore.

Please advise

many thanks

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 928 8233 
Fax: +44 (0)117 929 4423



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