FreeBSD mountroot issue

My intranet webserver is down now for 2 days. I have being trying to get it up but I am unable. I have 2 RAID 5 drives and I am not sure if all has gone bad or just one. The system is trying to bot up but end up with the following message:

Code:
Trying to mount root from ufs:/dev/mirror/gm0s1a

manual root filesystem specification:
<fstype>:<device> Mount <device> using filesystem <fstype>
                         eg. ufs:da0s1a
?                  List valid disk boot devices
 <empty line>       Abort manual input

mountroot>


Can someone help me resolve this problem....
 
albsallu said:
I have being trying to get it up but I am unable.
These days they've got those blue pills to help with that :e


I have 2 RAID 5 drives and I am not sure if all has gone bad or just one.
RAID 5 needs a minimum of 3 disks.

Trying to mount root from ufs:/dev/mirror/gm0s1a
Mirror = RAID1 not RAID5


What does listing the available drives tell you?
 
SirDice....This should tell you that I am clueless of how the system is setup. I have little knowledge of how my predecessor setup the system. Looking at the messages on the screen now, I can see that there is a master and a slave drive. But I was under the impression that it is a RAiD5 setup. Honestly, you are right about it being RAID1....a mirrored drive basically.

If you will like to provide me those blue pills :), I will very much appreciate it. I need to know what to do after the mountroot> prompt.
 
albsallu said:
If you will like to provide me those blue pills :), I will very much appreciate it.
I'm sure your spambox is filled with good offers :e

I need to know what to do after the mountroot> prompt.
Type a questionmark (?) and post the output.
 
This is what I get after the ?

Code:
List of GEOM managed disk devices:
ad1s1f ad1s1e ad1s1d ad1s1c ad1s1b ad1s1a acd0 ad1s1 ad1 ad0s1f ad0s1e ad0s1d ad0s1c ad0s1b ad0s1a ad0s1 ad0
 
Ok. This means your drives are recognized. You could try booting from one of the mirrored drives. Just enter this at the mountboot prompt:
Code:
ufs:ad0s1a
Or try the other drive:
Code:
ufs:ad1s1a

Hopefully the system will boot and we can investigate further.
 
I entered the first one and the following message came up:

Code:
THE FOLLOWING FILE SYSTEMS HAD AN UNEXPECTED INCONSISTENCY:
ufs: /dev/mirror/gm0s1d (/temp), ufs: /dev/mirror/gm0s1f (/usr), ufs: /dev/mirror/gm0s1e (/var)

Automatic file system check failed; help!

.....init: /bin/sh on /etc/rc terminated abnormally, going to single  user mode
Enter full pathname of shell or RETURN for /bin/sh:
 
Ok.. Looks like it has a few problems because of stale filesystems. Was this server shutdown hard? Or did it crash?

This should fix the last bit (after accepting /bin/sh):
Code:
fsck -y
mount -u /
mount -a -t ufs
swapon -a

At this point you can exit the shell and the system should boot up. If it boots normally, try doing a clean reboot(8).
 
After the first command fsck -y, I get the following messages:
Code:
******REBOOT NOW****
can't stat /dev/mirror/gm0s1d: No such file or directory
 
albsallu, did you ever put geom_mirror_load="YES" into your /boot/loader.conf? Do you see this module loaded during boot time? In the FreeBSD boot menu hit 6 for "Escape to loader prompt" and type [CMD=">"]ls[/CMD]. If you don't see the module loaded, just try to type [CMD=">"]load /boot/kernel/geom_mirror.ko[/CMD] and then [CMD=">"]boot[/CMD].

And regarding the RAID1 vs. RAID5 discussion: Maybe he has mirrored two hardware RAID5 "drives" (ad0 and ad1).
 
I am seeing 2 hard drives ad0 and ad1, but why is it trying to mount root from ufs:/dev/mirror/gm0s1a and could not mount it?

I have followed the procedure:
Code:
fsck -y
mount -u /
mount -a -t ufs
swapon -a

But still can't get it to boot normally.
Thanks for your continued help
 
It looks like it doesn't want to recognize your mirror. What does # gvinum list show?
 
Hmmm.. Besides the messages the fsck completed?

Then I'm going to do some guess work to see if we can get it up and running. At least without the mirror bit. You can always recreate the mirror once the system is up and running.

Code:
mount -u /dev/ad0s1a /
mount /dev/ad0s1d /var
mount /dev/ad0s1e /tmp
mount /dev/ad0s1f /usr
swapon /dev/ad0s1b
I theory this should be enough, if a relatively standard layout was used. After this you should be able to edit /etc/fstab. Replace any /dev/mirror/gm0* with /dev/ad0* keeping the slice (s1) and partition (a,b,d,e,f) the same.
 
This is the message showing on my screen continuously
Code:
logger not found:
Apr 19 20:16:30 init: can't exec getty '/usr/libexec/getty' for port /dev/ttyv5:
No Such File or Directory

Hmmm.. Besides the messages the fsck completed?

The fsck -y command gave the following message:
Code:
can't stat /dev/mirror/gm0s1d: No such file or directory
 
Ok. Seems we need to do those by hand too.
Code:
fsck -y /dev/ad0s1a
fsck -y /dev/ad0s1d
fsck -y /dev/ad0s1e
fsck -y /dev/ad0s1f
 
SirDice said:
Hmmm.. Besides the messages the fsck completed?

Then I'm going to do some guess work to see if we can get it up and running. At least without the mirror bit. You can always recreate the mirror once the system is up and running.

Code:
mount -u /dev/ad0s1a /
mount /dev/ad0s1d /var
mount /dev/ad0s1e /tmp
mount /dev/ad0s1f /usr
swapon /dev/ad0s1b
I theory this should be enough, if a relatively standard layout was used. After this you should be able to edit /etc/fstab. Replace any /dev/mirror/gm0* with /dev/ad0* keeping the slice (s1) and partition (a,b,d,e,f) the same.

When I enter [cmd=]mount /dev/ad0s1e /tmp[/cmd], I get the following error message:
Code:
WARNING: /tmp was not properly dismounted

I also follow the instruction from your last post and still no success. My motive now is to get the data out of the hard drive if there is no way the hard drive can boot up successfully.
 
Yes I did and still no luck the same error about
Code:
logger not found:
Apr 19 20:16:30 init: can't exec getty '/usr/libexec/getty' for port /dev/ttyv5:
No Such File or Directory
came up. I also can't use the vi and ee command to edit anything. I am not sure what has gone wrong.
 
It looks like your system is set up to use gmirror. What do these commands output for you (once you are in the single user root shell)?

[cmd=]cat /etc/fstab[/cmd]
[cmd=]gmirror list[/cmd]

if the later says:
Code:
gmirror: Command 'list' not available.

try

[cmd=]gmirror load[/cmd]
before that

If you have gmirror configuration, /etc/fstab should list partitions beginning with /dev/mirror/gm

On your original question, you are supposed to type [cmd=]ufs:/dev/mirror/gm0s1a[/cmd] in the mountroot> prompt.
But this will work only if you have put

Code:
geom_mirror_load="YES"

in your /boot/loader.conf
or escaped at the boot loader (option 6) and used

load geom_mirror

before continuing with the boot process.

both advices were already given in the thread.


....

if you have no other option, you might try to reconstruct the gmirror, by following the advices already given here:

1. identify what partitions you have listed in the /etc/fstab file and where these are mounted (first two columns). Look at rows that contain /dev/mirror/gm0
2. For each of these, repeat

fsck -y fist_column
mount fist_column second_column

while replacing gm0 with ad0

3. type 'exit'

This should bring up your system. If it does not, chances are, your first disk (or array) is broken and you should repeat the boot/fsck/mount by replacing gm0 with ad1 instead of ad0.

Then, you will have to reconstruct the gmirror. Don't worry, that part is easy. :)
 
DutchDaemon said:

Thanks for the help. I did all that you stated and no luck. When I enter the follwoing command
Code:
cat /etc/fstab
i get the following:

Code:
  #Device           MountPoint      Fstype      Options      Dump       Pass#
     /dev/mirror/gm0s1b    none           swap         SW           0          0
     /dev/mirror/gm0s1a      /             UFS         RW           1          1
     /dev/mirror/gm0s1d      /tmp          UFS         RW           2          2
     /dev/mirror/gm0s1f      /usr          UFS         RW           2          2
     /dev/mirror/gm0s1e      /var          UFS         RW           2          2
     /dev/acd0               /cdrom        cd9660      ro,noauto    0          0

I am not sure what is wrong, but I have been down for a while now.
 
Back
Top