Loader does not load after reinstall with previous mirrored disk attached

2009-11-18 Thread Glen Barber
Hello,

First off, this is not a real I need help post, though there are a
few questions that I'd like to get insight on, if possible - it is
more for informative purposes in the archives, should someone run into
this very random problem in the future. Additionally, I believe this
is far too unlikely this will happen to many others to consider it to
be a problem, thus submitting a PR.

The story, cut down from its original 3 hour length:

For some time, I was dual-booting OpenSolaris and FreeBSD, on 500GB
SATA and 250GB IDE disks, respectively.  When I lost the need to run
OpenSolaris (Flash), I purchased a second 500GB SATA disk.  I added
the original SATA disk to gmirror, and synced the 250GB FreeBSD
install to the 500GB SATA drive.  Once that finished, I removed the
250GB disk, and installed the second 500GB disk, adding it to the
mirror.

All was fine, except I was not using all of the drive space available.
 This past weekend, I decided to create a slice to cover the remaining
250GB, initially to try ZFS, which failed for the following reason.
Here is where question 1 comes into play.

1.)  What is the correct way to completely break a gmirror setup,
replacing /dev/mirror/gm0 with the original /dev/adN configuration?
Is the assumption that once you initialize gmirror, you will never
need/want to go back to a single disk setup?  Is there a clean way to
fix boot0 so it does not look for a mirror, short of
'vfs.root.mountfrom' in loader.conf?

After rendering my system unbootable since I use a USB keyboard, and
was not able to do anything at the 'mountroot' prompt, I decided it
may be a good time for me to finally upgrade to 64-bit, where I
purchased an additional 4GB RAM and burned a bootonly amd64 disc.  It
wasn't a big deal for me since I knew my data was mirrored and
available.  However, I did consider purchasing a PS/2 keyboard to fix
the system... But, let's be honest, who can resist an upgrade? :-)

Here is the real reason for my post (besides archival purposes).
Because I never disconnected the secondary disk (from the original
mirror), it caused the loader to hang upon boot - no errors, just a
blinking cursor on the top-left side.  One answer I received about
this, which makes perfect sense considering what I saw when I was
trying to figure out what was happening (until I disconnected the
second disk to avoid writing over it accidentally), is that the new
loader and the previous loader were in conflict at boot.  Once the
secondary disk was disconnected, the system booted fine.  Which brings
me to my second question:

2.)  loader problem?  In hindsight, I can expect the loader to hang
with two MBRs, but should this be expected?  If the loader did not get
confused, any insight to what may have actually happened, since I
could not see any output whatsoever?

Regards,

-- 
Glen Barber
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader does not load after reinstall with previous mirrored disk attached

2009-11-18 Thread Rolf Nielsen

Glen Barber wrote:

Hello,

First off, this is not a real I need help post, though there are a
few questions that I'd like to get insight on, if possible - it is
more for informative purposes in the archives, should someone run into
this very random problem in the future. Additionally, I believe this
is far too unlikely this will happen to many others to consider it to
be a problem, thus submitting a PR.

The story, cut down from its original 3 hour length:

For some time, I was dual-booting OpenSolaris and FreeBSD, on 500GB
SATA and 250GB IDE disks, respectively.  When I lost the need to run
OpenSolaris (Flash), I purchased a second 500GB SATA disk.  I added
the original SATA disk to gmirror, and synced the 250GB FreeBSD
install to the 500GB SATA drive.  Once that finished, I removed the
250GB disk, and installed the second 500GB disk, adding it to the
mirror.

All was fine, except I was not using all of the drive space available.
 This past weekend, I decided to create a slice to cover the remaining
250GB, initially to try ZFS, which failed for the following reason.
Here is where question 1 comes into play.

1.)  What is the correct way to completely break a gmirror setup,
replacing /dev/mirror/gm0 with the original /dev/adN configuration?
Is the assumption that once you initialize gmirror, you will never
need/want to go back to a single disk setup?  Is there a clean way to
fix boot0 so it does not look for a mirror, short of
'vfs.root.mountfrom' in loader.conf?

After rendering my system unbootable since I use a USB keyboard, and
was not able to do anything at the 'mountroot' prompt, I decided it
may be a good time for me to finally upgrade to 64-bit, where I
purchased an additional 4GB RAM and burned a bootonly amd64 disc.  It
wasn't a big deal for me since I knew my data was mirrored and
available.  However, I did consider purchasing a PS/2 keyboard to fix
the system... But, let's be honest, who can resist an upgrade? :-)

Here is the real reason for my post (besides archival purposes).
Because I never disconnected the secondary disk (from the original
mirror), it caused the loader to hang upon boot - no errors, just a
blinking cursor on the top-left side.  One answer I received about
this, which makes perfect sense considering what I saw when I was
trying to figure out what was happening (until I disconnected the
second disk to avoid writing over it accidentally), is that the new
loader and the previous loader were in conflict at boot.  Once the
secondary disk was disconnected, the system booted fine.  Which brings
me to my second question:

2.)  loader problem?  In hindsight, I can expect the loader to hang
with two MBRs, but should this be expected?  If the loader did not get
confused, any insight to what may have actually happened, since I
could not see any output whatsoever?

Regards,



Hi Glen,

I recently, successfully, broke a gmirror by simply issuing gmirror 
clear on all the disks, three in my case. Since gmirror stores metadata 
in the last sector of the disks (according to the gmirror man page) and 
everything else is untouched, issuing a gmirror clear reverts the disks 
to single disk usage, and since the data isn't striped, the system will 
be able to read the data and mount the filesystem(s).


This is my experience. However, I have found no documentation about 
breaking a gmirror, and I may just have been lucky. The data I had was 
properly backed up, so if it hadn't worked, I could have restored it, 
and since I needed the extra space, I gave it a try.


So, like I said, this worked for me, but I can't back my clam, neither 
by documentation nor reports from others, so I would still recommend 
backing your data up before issuing gmirror clear.


Cheers,

Rolf Nielsen
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader does not load after reinstall with previous mirrored disk attached

2009-11-18 Thread Adam Vande More
On Wed, Nov 18, 2009 at 8:35 PM, Glen Barber glen.j.bar...@gmail.comwrote:

 Hello,

 First off, this is not a real I need help post, though there are a
 few questions that I'd like to get insight on, if possible - it is
 more for informative purposes in the archives, should someone run into
 this very random problem in the future. Additionally, I believe this
 is far too unlikely this will happen to many others to consider it to
 be a problem, thus submitting a PR.

 The story, cut down from its original 3 hour length:

 For some time, I was dual-booting OpenSolaris and FreeBSD, on 500GB
 SATA and 250GB IDE disks, respectively.  When I lost the need to run
 OpenSolaris (Flash), I purchased a second 500GB SATA disk.  I added
 the original SATA disk to gmirror, and synced the 250GB FreeBSD
 install to the 500GB SATA drive.  Once that finished, I removed the
 250GB disk, and installed the second 500GB disk, adding it to the
 mirror.

 All was fine, except I was not using all of the drive space available.
  This past weekend, I decided to create a slice to cover the remaining
 250GB, initially to try ZFS, which failed for the following reason.
 Here is where question 1 comes into play.

 1.)  What is the correct way to completely break a gmirror setup,
 replacing /dev/mirror/gm0 with the original /dev/adN configuration?
 Is the assumption that once you initialize gmirror, you will never
 need/want to go back to a single disk setup?  Is there a clean way to
 fix boot0 so it does not look for a mirror, short of
 'vfs.root.mountfrom' in loader.conf?


I usually find this easier to run from fixit cd.  I don't remember exact
order but something like deactivate stop clear.  clear is last for sure
because that will remove metadata.  Remember to change fstab.



-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Loader does not load after reinstall with previous mirrored disk attached

2009-11-18 Thread Glen Barber
Hi Rolf and Adam,

Since you both seemingly responded with the same solution, I'll
respond including the more verbose response:

On Wed, Nov 18, 2009 at 10:01 PM, Rolf Nielsen
listrea...@lazlarlyricon.com wrote:

 I recently, successfully, broke a gmirror by simply issuing gmirror clear on
 all the disks, three in my case. Since gmirror stores metadata in the last
 sector of the disks (according to the gmirror man page) and everything else
 is untouched, issuing a gmirror clear reverts the disks to single disk
 usage, and since the data isn't striped, the system will be able to read the
 data and mount the filesystem(s).


This makes sense, and hopefully I will not have to try it for some
time, next time I need to break a mirror, I will try 'clear'-ing it
first.

Thanks,

-- 
Glen Barber
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org