Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

GMIRROR - not loading the mirror

Posted on 2006-06-25
9
Medium Priority
?
496 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
[X]
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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 62

Accepted Solution

by:
gheist earned 1000 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 1000 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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

715 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