Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

GMIRROR - not loading the mirror

Posted on 2006-06-25
9
491 Views
Last Modified: 2013-11-22
here is what I have ...

A FreeBSD 5.4 stable build.

It is booted from a stand alone drive
there are 2 drives that are mirrored with gmirror

I cannot mount the mirror in any way (that i can think of)

here is the info...

From dmesg:

ad0: 38166MB <WDC WD400BB-00FJA0/13.03G13> [77545/16/63] at ata0-master PIO4
acd0: CDROM <SAMSUNG SC-140B/d005> at ata1-master PIO4
ad4: 76319MB <WDC WD800JB-00JJC0/05.01C05> [155061/16/63] at ata2-master PIO4
ad6: 76319MB <WDC WD800JB-00JJC0/05.01C05> [155061/16/63] at ata3-master PIO4
GEOM_MIRROR: Device data0 created (id=1427972083).
GEOM_MIRROR: Device data0: provider ad4 detected.
GEOM_MIRROR: Device data0: provider ad6 detected.
GEOM_MIRROR: Device data0: provider ad6 activated.
GEOM_MIRROR: Device data0: provider ad4 activated.
GEOM_MIRROR: Device data0: provider mirror/data0 launched.
Mounting root from ufs:/dev/ad0s1a


The /dev/fstab

root@scrapper:~# more /etc/fstab
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad0s1b             none            swap    sw              0       0
/dev/ad0s1a             /               ufs     rw              1       1
/dev/ad0s1g             /home           ufs     rw              2       2
/dev/ad0s1d             /tmp            ufs     rw              2       2
/dev/ad0s1f             /usr            ufs     rw              2       2
/dev/ad0s1e             /var            ufs     rw              2       2
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
192.168.100.116:/home/ncvs /nfs         nfs     ro,noauto,tcp   0       0
proc                    /proc           procfs  rw              0       0


The Mountlist

root@machine:~# mount
/dev/ad0s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/ad0s1g on /home (ufs, NFS exported, local, soft-updates)
/dev/ad0s1d on /tmp (ufs, local, soft-updates)
/dev/ad0s1f on /usr (ufs, NFS exported, local, soft-updates)
/dev/ad0s1e on /var (ufs, local, soft-updates)
procfs on /proc (procfs, local)
devfs on /var/named/dev (devfs, local)

the /dev/mirror directory

crw-r-----  1 root  operator    4,  24 Jun 25 14:16 data0
crw-r-----  1 root  operator    4,  31 Jun 25 14:16 data0s1
crw-r-----  1 root  operator    4,  36 Jun 25 14:16 data0s1a
crw-r-----  1 root  operator    4,  37 Jun 25 14:16 data0s1c
(so ah what is the 'c' in the 1st position)


Any help would be greatly appriciated.









0
Comment
Question by:Nomad469
  • 4
  • 2
9 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 16996863
Alter fstab to use mirror devices.
Make sure to remove 2nd disk from mirror beforehand and add after reboot.
0
 
LVL 62

Expert Comment

by:gheist
ID: 16996869
Trust me -CD2 lets you undo damage when any is done.
0
 
LVL 1

Author Comment

by:Nomad469
ID: 17002748
the mirror is populated with data and it seems to have been in use at one point I believe

if iIbroke the mirror and addressed only one of the drives will that still work ?


0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 62

Accepted Solution

by:
gheist earned 250 total points
ID: 17002865
You can have gmirror consisting of just one drive.
Then you fix the device paths having gmirror device names instead of disk names.
After that you reboot using gmirror names.
Now you add extra disk.
0
 

Assisted Solution

by:digitaly
digitaly earned 250 total points
ID: 17030796
Hmmm...
 
First, there's no mention of the mirrored drives in the fstab.  Gmirror is finding the two drives just fine, but if you don't tell FreeBSD how to mount it, it'll do what any other drive that isn't mounted would do... basically, nothing.  What partition name did you want your mirrored drives to have?

So, GEO_MIRROR detects ad4 and ad6 as the mirrored drives.  /dev/mirror lists

crw-r-----  1 root  operator    4,  36 Jun 25 14:16 data0s1a
crw-r-----  1 root  operator    4,  37 Jun 25 14:16 data0s1c

(ignore the other two lines, these are the actual data partitions)

To add these to your fstab, try the following:

# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad0s1b             none            swap    sw              0       0
/dev/ad0s1a             /               ufs     rw              1       1
/dev/ad0s1g             /home           ufs     rw              2       2
/dev/ad0s1d             /tmp            ufs     rw              2       2
/dev/ad0s1f             /usr            ufs     rw              2       2
/dev/ad0s1e             /var            ufs     rw              2       2
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
192.168.100.116:/home/ncvs /nfs         nfs     ro,noauto,tcp   0       0
proc                    /proc           procfs  rw              0       0
/dev/mirror/data0s1a             /mirror1               ufs     rw              2       2
/dev/mirror/data0s1c             /mirror2               ufs     rw              2       2

Now, make sure you have the two directories in your / partition:

mkdir /mirror1
mkdir /mirror2

Then try typing the following:

mount /mirror1
mount /mirror2

What's it say?

0
 

Expert Comment

by:digitaly
ID: 17030816
Oh, and there's an excellent article on setting up gmirror:

http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html

This is what convinced me to switch from vinum.

Hope this helps...
0
 
LVL 62

Expert Comment

by:gheist
ID: 17037723
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
unix scripting question 1 104
aix tls version 6 417
Unix/bash: scripted arithmetic 13 101
replace column/record content in a *csv file based on a regular expression 6 71
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question