Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jan 2012 05:57:18 GMT
From:      Morris Allen <mallen@vidnet.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   i386/164620: Raid 1 issues
Message-ID:  <201201300557.q0U5vIX2011417@red.freebsd.org>
Resent-Message-ID: <201201300600.q0U60JKD085203@freefall.freebsd.org>

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

>Number:         164620
>Category:       i386
>Synopsis:       Raid 1 issues
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 30 06:00:18 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Morris Allen
>Release:        V 9.0 x64
>Organization:
>Environment:
InDtel DQ 57Tm Motherboard  Intel Processor I5 650 8gb kingston mem 2- 1TB Sata 3 Hard Drives
>Description:
# sysctl kern.geom.debugflags=17

 Now create the mirror. Begin the process by storing meta-data information on the primary disk device, effectively creating the /dev/mirror/gm device using the following command:

 

Warning: Creating a mirror out of the boot drive may result in data loss if any data has been stored on the last sector of the disk. This risk is reduced if creating the mirror is done promptly after a fresh install of FreeBSD. The following procedure is also incompatible with the default installation settings of FreeBSD 9.X which use the new GPT partition scheme. GEOM will overwrite GPT metadata, causing data loss and possibly an unbootable system.
 # gmirror label -vb round-robin gm0 /dev/da0

 The system should respond with:
Metadata value stored on /dev/da0.
Done.

 Initialize GEOM, this will load the /boot/kernel/geom_mirror.ko kernel module:
# gmirror load

 

Note: When this command completes successfully, it creates the gm0 device node under the /dev/mirror directory.
 
Enable loading of the geom_mirror.ko kernel module during system initialization:
# echo 'geom_mirror_load="YES"' >> /boot/loader.conf

 Edit the /etc/fstab file, replacing references to the old da0 with the new device nodes of the gm0 mirror device.

 

Note: If vi(1) is your preferred editor, the following is an easy way to accomplish this task:
# vi /etc/fstab

 In vi(1) back up the current contents of fstab by typing :w /etc/fstab.bak. Then replace all old da0 references with gm0 by typing :%s/da/mirror\/gm/g.

 
The resulting fstab file should look similar to the following. It does not matter if the disk drives are SCSI or ATA, the RAID device will be gm regardless.
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/mirror/gm0s1b                       none            swap    sw              0       0
/dev/mirror/gm0s1a                      /               ufs     rw              1       1
/dev/mirror/gm0s1d              /usr        ufs rw      0   0
/dev/mirror/gm0s1f              /home       ufs rw      2   2
#/dev/mirror/gm0s2d                     /store          ufs     rw              2       2
/dev/mirror/gm0s1e                      /var            ufs     rw              2       2
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0

 Reboot the system:
# shutdown -r now
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



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