Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jan 2007 19:45:06 -0300
From:      "Fernan Aguero" <fernan.aguero@gmail.com>
To:        geom@freebsd.org
Subject:   clear metadata using dd?
Message-ID:  <520894aa0701081445i43d76098m418ce695d2133e53@mail.gmail.com>

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

I'm trying to set up two disks to contain both gmirrored and gstriped slices.

This is what I'm trying to achieve:
adxs1, swap
adxs2, gmirror
adxs3, gstripe

I already got the first and second slices set up (swap and gmirror containing
the active, root partition), but I cannot seem to be able to set up s3 into a
gstripped device.

gama# gstripe label -v gs0 /dev/ad4s3 /dev/ad6s3
Can't store metadata on /dev/ad4s3: Operation not permitted.

This might be because ad4s3 had been part of a gmirror device before I
reorganized my disks and moved the mirror to the s2 slice.

Gayn Winters suggested that:
"The geom metadata is stored in the last block of the slice.  Zero it as
well and you can have a clean start."
http://lists.freebsd.org/pipermail/freebsd-questions/2006-May/120950.html

But now I wonder what is the magic incantation to run dd for targeting the last
(sector?) of ad4s3?

I imagine I have to use something like
dd if=/dev/zero of=/dev/ad4s3? bs=512 count=1

but adding either skip=? or seek=? to taste.

gama# fdisk -s /dev/ad4
/dev/ad4: 310101 cyl 16 hd 63 sec
Part        Start        Size Type Flags
   1:          63    16771041 0xa5 0x00
   2:    16771923   146795229 0xa5 0x80
   3:   146795292   188742708 0xa5 0x00

maybe I should skip (146795292 + 188742708 - 1) sectors?

Fernan



-- 
Fernan Aguero



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