Gmirror on a partition of a slice
n j
nino80 at gmail.com
Fri Sep 21 04:37:38 PDT 2007
Pawel wrote:
> > 6) fdisk -BI /dev/mirror/gm0 to create a slice in gm0
> Don't do this.
> > 7) bsdlabel -w -B /dev/mirror/gm0s1 to create root partition
> And this.
> newfs /dev/mirror/gm0. Copy the data from da0s1a to /dev/mirror/gm0.
> Modify /etc/fstab on da0s1a to mount root as /dev/mirror/gm0.
Just wanted to say thanks. I don't know if the solution should have
been obvious to me; perhaps it is to someone with more geom
experience. For me, the two "skip this" instructions were an
enlightenment. Anyway, here is what I learned, maybe the archives will
help someone in the future. Put simply:
a) if you are using whole disk as consumers, you can partition (fdisk)
and label (bsdlabel) the resulting gmirror provider,
b) if you are using slices as consumers, you should skip the
partitioning and only label the partitions of the resulting gmirror
provider,
c) finally, if you are using partitions as consumers, you must skip
both the partition and label steps and directly do a newfs on the
resulting gmirror provider.
The logic behind this is probably that if you already partition or
label the underlying consumers, you must not do the same with the
provided mirror, i.e. you can't really treat the provided mirror as an
entirely fresh new disk. As I said, this is maybe obvious to someone,
but for me it was new.
For the record, here's my current setup using two 17G disks. I hope
that mounting swap on a gstripe partition is not a Bad Thing.
# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/mirror/gm0 989M 36M 874M 4% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/stripe/st0s1a 29G 718M 26G 3% /big
# swapinfo -h
Device 1K-blocks Used Avail Capacity
/dev/stripe/st0s1b 2097152 0B 2.0G 0%
# gmirror status
Name Status Components
mirror/gm0 COMPLETE da0s1a
da1s1a
# gstripe status
Name Status Components
stripe/st0 UP da0s1d
da1s1d
Once again, Pawel, thanks for help (and for the geom system, of course).
Regards,
--
Nino
More information about the freebsd-geom
mailing list