Re: RAID1 with gmirror

From: Christian Hiris (4711_at_chello.at)
Date: 10/10/04

  • Next message: Søren Schmidt: "Re: ACPI suspend/ ATA reboots"
    To: freebsd-current@freebsd.org, axel.gruner@suedfactoring.de
    Date: Sun, 10 Oct 2004 15:22:28 +0200
    
    

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On Sunday 10 October 2004 13:01, Axel S. Gruner wrote:
    > Hi,
    >
    > i am looking for a way to set up a RAID1 with gmirror also on the /
    > partition.
    > Is there a known way to do so? Setting up without / is not a problem,
    > but my brain gets sick while thinking about to set up gmirror also for
    > /.

    I migrated from an existing mirror, which was created by the 'atacontrol
    create' command to the new gmirror. I migrated to gmirror, because I
    installed a second PDC20269 controller, which atacontrol couldn't handle.

    On 5.3- BETA7 with patched gmirror.c booting from the mirror works, but there
    is still the problem for me that the root-mirror starts degraded after a
    reboot and I need to run 'gmirror activate' to start synchronization. I'm
    just rebuilding my root-mirror and will try if the a shutdown command does a
    better job then an ordinary reboot when restarting my system.

    The migrating process (as far as I remember):

    The existing raid1 array resided on disks ad1 and ad3 where slice1 holds 3
    4.2-BSD partitions and a swap partition:
    ar0s1s /
    ar0s1b swap
    ar0s1d /usr
    ar0s1e /home

    1. Change /etc/fstab to be able to reboot / (read-only) from ad3:
    # ee /etc/fstab
    /dev/ar0s1a --> /dev/ad3s1a
    /dev/ar0s1b --> /dev/ad3s1b
    /dev/ar0s1d --> /dev/ad3s1d
    /dev/ar0s1e --> /dev/ad3s1e

    2. Boot from ad3s1a into single user mode and delete the existing raid1:
    # atacontrol delete 0

    3. Mount / and /usr to edit fstab and loader.conf on ad0:
    # mount /
    # mount /usr
    # mount /dev/ad0s1a /mnt
    # ee /mnt/etc/fstab

    Change devices to the new (ie. mirror0) gmirror devices:
     /dev/ad3s1a --> /dev/mirror/mirror0s1a
     /dev/ad3s1b --> /dev/mirror/mirror0s1b
     /dev/ad3s1d --> /dev/mirror/mirror0s1c
     /dev/ad3s1e --> /dev/mirror/mirror0s1d

    # echo "geom_mirror_load="YES"" >> /mnt/boot/loader.conf
    # gmirror load
    # gmirror configure -v -b load mirror0 ad0

    4. Boot from ad0s1a and add disk ad3 to the mirror:
    # gmirror insert -v -p 1 mirror0 ad3
     
    HTH
    ch

    - --
    Christian Hiris <4711@chello.at> | OpenPGP KeyID 0x3BCA53BE
    OpenPGP-Key at hkp://wwwkeys.eu.pgp.net and http://pgp.mit.edu
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.6 (FreeBSD)

    iD8DBQFBaTel09WjGjvKU74RAq8KAJ96Y8YluaID5MiV4dRbefDMDwhdIQCfb6BU
    /A+kilLmb2moeWwnu4lfsXM=
    =1pGh
    -----END PGP SIGNATURE-----
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: Søren Schmidt: "Re: ACPI suspend/ ATA reboots"

    Relevant Pages

    • Re: gjournal: journaled slices vs. journaled partitions
      ... I didn't want to only put gmirror and have full drives rebuild ... I went with this setup anyway and I made some reset tests to see what ... provider is directly on the mirror provider for all mirrored filesystems ... the ill-advised journaled small partition issue been successfully overcome ...
      (freebsd-questions)
    • Re: Crashed gmirror, single disk marked SYNC and wont boot...
      ... As soon as the box got up, I removed ad0 from the gmirror, so ad6 was ... Today I got a new disk that would replace ad0.. ... ad6 was the only disk in the mirror. ... your partition table seems to be gone. ...
      (freebsd-stable)
    • Re: [opensuse] Software RAID with existing drive
      ... Type: BIOS RAID sli_ahahafdeeibj ... Mount By: ... The /dev/hdb is the new hard drive I would like to use as a mirror. ... creating an equal partition for it to raid to later. ...
      (SuSE)
    • Re: Crashed gmirror, single disk marked SYNC and wont boot...
      ... Now I got same partition table on ad6s1 as on ad0s1... ... fdisk both with full partition on both, create a new gmirror between ad6s1/ad4s1, create slices, use dump | restore (of course with apps shutdown so no data is changed.. ... or at least nothing that I care about) to copy all files from ad2 to new mirror.. ... I checked md5 against boot0 and its not the same. ...
      (freebsd-stable)
    • Re: Re: bsdlabel blues again
      ... partition c extends past end of unit and doesn't start at 0. ... between raw disk slices and mirrored slices. ... As I've converted from one mirror to another, gmirror ...
      (freebsd-stable)