Re: howto software raid under FreeBSD?

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

  • Next message: Martin Paredes: "Re: How to print to hp JetDirect/LaserJet 1300 Network printer?"
    To: freebsd-questions@freebsd.org
    Date: Mon, 1 Nov 2004 04:15:47 +0100
    
    

    On Sunday 31 October 2004 23:33, Matthias F. Brandstetter wrote:
    > Any docs for gmirror except man page out there anywhere? Something like how
    > to use it for root file system, how to convert a non-gmirror system,
    > kernel configuration etc.

    Short time ago there was a thread on the current list:
    http://lists.freebsd.org/pipermail/freebsd-current/2004-October/thread.html#39904

    If you use the whole disk as provider and your disk has left free 512 bytes
    after the end of the last slice, gmirror setup works very easy and fast (no
    need to use dump/restore or dd):

    - Boot into the live-filesystem.
    - Do a 'gmirror load' and label your "old" disk with 'gmirror label -v ...'.
    - Mount the (now mirrored) / partition on /mnt.
    - echo 'geom_mirror_load="YES"' >> /mnt/boot/loader.conf
    - echo 'swapoff="YES"' >> /mnt/etc/rc.conf
    - Edit /mnt/etc/fstab to reflect the newly created mirror devices.
    - Reboot.
    - Add a second disk to the mirror: 'gmirror insert -v ...'.
    - If you use gdm replace 'reboot' by 'shutdown -r now'.

    This also works for an already existing ataraid raid1 array, you just need to
    delete the mirror before you start with the gmirror setup.

    That's how gmirror converted my devices when I a command like:
    'gmirror label -v -b split -s 4096 mirror0 ad4':

       slice /dev/ad4s1 --> /dev/mirror/mirror0s1
       / /dev/ad4s1a --> /dev/mirror/mirror0s1a
       swap /dev/ad4s1b --> /dev/mirror/mirror0s1b
       raw --> /dev/mirror/mirror0s1c
       /usr /dev/ad4s1d --> /dev/mirror/mirror0s1d
       /home /dev/ad4s1e --> /dev/mirror/mirror0s1e

    If you have a more complex slice/partition setup, it's a good idea to do at
    least a fine backup of your disklabels before you start conversion.

    HTH,
    ch

    -- 
    Christian Hiris <4711@chello.at> | OpenPGP KeyID 0x3BCA53BE 
    OpenPGP-Key at hkp://wwwkeys.eu.pgp.net and http://pgp.mit.edu
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Martin Paredes: "Re: How to print to hp JetDirect/LaserJet 1300 Network printer?"

    Relevant Pages

    • 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.. ... So it tries to load, find no partition table, and ignores and unloads gm0? ...
      (freebsd-stable)
    • Re: Setting up RAID-1 on 2 unequal disks
      ... I think I will try to go with John's approach (ie via gmirror), as I've used it previously for a raiding on equally-sized disks. ... I plan to mirror /shared onto the 80GB. ... The only hard part is going to be labeling the 120GB disk correctly. ... You will most likely want to do it manually using bsdlabel. ...
      (freebsd-questions)
    • 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 the only provider. ... Today I got a new disk that would replace ad0.. ...
      (freebsd-stable)
    • 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: gmirror problem on 5.3-R i386
      ... > I'm having a problem with gmirror. ... > first disk to the mirror after booting off the second drive. ... > status is a degraded mirror and I cannot see any of the partitions on ...
      (freebsd-questions)