Solved

GMIRROR - not loading the mirror

Posted on 2006-06-25
9
495 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

636 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