RE: Gmirror'd SWAP: no dump?

2006-01-19 Thread Larry Rosenman
Igor Robul wrote:
 On Wed, Jan 18, 2006 at 12:44:27PM -0600, Larry Rosenman wrote:
 Are there any plans to support dumping to a gmirror'd swapfile?
 Dumping occurs when kernel is in bad condition, so GEOM can not be
 safe used (for example panic in GEOM code). 
 
 Check archives for  last month of 2005 for longer explanation.

I was afraid of that. What's the recommendation for how to
Set up a 2-disk system with mirroring then?

All the HOWTO's I've seen have the entire disk mirrored, including
 all the pieces. 

My current setup is 3 BSD partitions in 1 FDISK slice.  With the entire
disk (da0/da1) mirrored.

How can I set it up to allow dumps?

(I wouldn't mind having double the swap :) )


LER

 
 My FreeBSD/amd64 6.0-STABLE as of today doesn't seem to want to do
 it. 
 ___
 freebsd-stable@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to
 [EMAIL PROTECTED] 



-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 512-248-2683 E-Mail: ler@lerctr.org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3683 US

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Gmirror'd SWAP: no dump?

2006-01-19 Thread Gavin Atkinson
On Thu, 2006-01-19 at 05:49 -0600, Larry Rosenman wrote:
 Igor Robul wrote:
  On Wed, Jan 18, 2006 at 12:44:27PM -0600, Larry Rosenman wrote:
  Are there any plans to support dumping to a gmirror'd swapfile?
  Dumping occurs when kernel is in bad condition, so GEOM can not be
  safe used (for example panic in GEOM code). 
  
  Check archives for  last month of 2005 for longer explanation.
 
 I was afraid of that. What's the recommendation for how to
 Set up a 2-disk system with mirroring then?
 
 All the HOWTO's I've seen have the entire disk mirrored, including
  all the pieces. 
 
 My current setup is 3 BSD partitions in 1 FDISK slice.  With the entire
 disk (da0/da1) mirrored.
 
 How can I set it up to allow dumps?

If you look at the mirror status, you'll see each disk is assigned a
priority.

In theory, The component with the biggest priority is used [...] as a
master component when resynchronization is needed, e.g. after a power
failure when the device was open for writing. (gmirror(8)).  Therefore,
if you set dumps to /dev/da0s1b (or whichever swap partition is on the
disk with the biggest priority), the machine can dump to the disk
directly, and will end up resyncing to the other disk on reboot (which
it would have had to do anyway due to the panic), and your dump will be
doubly safe.

I say in theory, because on the one machine I have that uses gmirror,
both disks have a priority of zero (which i get the feeling is invalid,
from the gmirror man page).

Gavin

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Gmirror'd SWAP: no dump?

2006-01-19 Thread Christoph Schug
On Thu, Jan 19, 2006, Larry Rosenman wrote:

 All the HOWTO's I've seen have the entire disk mirrored, including
  all the pieces.

See [1] how to setup a GEOM on a slice basis. You only have to skip swap
and mind the correct /etc/fstab entry. From my experience, it is best to
hardcode all providers using '-h' at all gmirror insert operations for
a slice based setup.

[1] http://people.freebsd.org/~rse/mirror/

Hope this helps
-cs
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Gmirror'd SWAP: no dump?

2006-01-19 Thread Larry Rosenman
Christoph Schug wrote:
 On Thu, Jan 19, 2006, Larry Rosenman wrote:
 
 All the HOWTO's I've seen have the entire disk mirrored, including
 all the pieces.
 
 See [1] how to setup a GEOM on a slice basis. You only have to skip
 swap and mind the correct /etc/fstab entry. From my experience, it is
 best to hardcode all providers using '-h' at all gmirror insert
 operations for a slice based setup.   
 
 [1] http://people.freebsd.org/~rse/mirror/
 
 Hope this helps
 -cs

Would the lack of -h cause gmirror to hang at startup?  I'd see the
Gmirror code come up, and then the machine would hang.

In this kind of setup, I still saw the 'b' partition mirrored. (since I
basically
Only have da0s1/da1s1).



-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 512-248-2683 E-Mail: ler@lerctr.org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3683 US

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Gmirror'd SWAP: no dump?

2006-01-19 Thread Larry Rosenman
Gavin Atkinson wrote:
 On Thu, 2006-01-19 at 05:49 -0600, Larry Rosenman wrote:
 Igor Robul wrote:
 On Wed, Jan 18, 2006 at 12:44:27PM -0600, Larry Rosenman wrote:
 Are there any plans to support dumping to a gmirror'd swapfile?
 Dumping occurs when kernel is in bad condition, so GEOM can not be
 safe used (for example panic in GEOM code).
 
 Check archives for  last month of 2005 for longer explanation.
 
 I was afraid of that. What's the recommendation for how to Set up a
 2-disk system with mirroring then?
 
 All the HOWTO's I've seen have the entire disk mirrored, including
 all the pieces. 
 
 My current setup is 3 BSD partitions in 1 FDISK slice.  With the
 entire disk (da0/da1) mirrored.
 
 How can I set it up to allow dumps?
 
 If you look at the mirror status, you'll see each disk is assigned a
 priority. 
 
 In theory, The component with the biggest priority is used [...] as
 a master component when resynchronization is needed, e.g. after a
 power failure when the device was open for writing. (gmirror(8)). 
 Therefore, if you set dumps to /dev/da0s1b (or whichever swap
 partition is on the disk with the biggest priority), the machine can
 dump to the disk directly, and will end up resyncing to the other
 disk on reboot (which it would have had to do anyway due to the
 panic), and your dump will be doubly safe.

The problem with this idea is the fact that the da0s1b device is NOT
available:

$ ls -l /dev/da?s1?
ls: /dev/da?s1?: No such file or directory
$

   
-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 512-248-2683 E-Mail: ler@lerctr.org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3683 US

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Gmirror'd SWAP: no dump?

2006-01-19 Thread Christoph Schug
On Thu, Jan 19, 2006, Larry Rosenman wrote:

 Would the lack of -h cause gmirror to hang at startup?  I'd see the
 Gmirror code come up, and then the machine would hang.

IIRC I had the problem that 'gmirror insert' without '-h' not always
inserted the slice specified by the entire block device (e.g. /dev/ad4s1
vs. /dev/ad4). Apparently there is some auto detection code and/or
gmirror cannot differ correctly, but that's just a guess. Specifing '-h'
fixed it in my case.

 In this kind of setup, I still saw the 'b' partition mirrored. (since I
 basically
 Only have da0s1/da1s1).

If I understand you correctly moving swap to a different slice should do
the job.

-cs
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Gmirror'd SWAP: no dump?

2006-01-19 Thread Thomas Hurst
* Christoph Schug ([EMAIL PROTECTED]) wrote:

 IIRC I had the problem that 'gmirror insert' without '-h' not always
 inserted the slice specified by the entire block device (e.g.
 /dev/ad4s1 vs. /dev/ad4). Apparently there is some auto detection
 code and/or gmirror cannot differ correctly, but that's just a
 guess. Specifing '-h' fixed it in my case.

As I understand it, gmirror writes its metadata on the last sector of
the provider; when tasting devices it will look at the last sector of
ad4, find the metadata and use that as the provider for your mirror; you
can either hardcode the provider name there to override it, or make the
slice 1 sector smaller so gmirror tastes ad4, finds nothing, then goes
on to taste ad4s1 correctly.

-- 
Thomas 'Freaky' Hurst
http://hur.st/
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Gmirror'd SWAP: no dump?

2006-01-19 Thread Craig Boston
On Thu, Jan 19, 2006 at 02:53:42PM +, Thomas Hurst wrote:
  IIRC I had the problem that 'gmirror insert' without '-h' not always
  inserted the slice specified by the entire block device (e.g.
  /dev/ad4s1 vs. /dev/ad4). Apparently there is some auto detection
  code and/or gmirror cannot differ correctly, but that's just a
  guess. Specifing '-h' fixed it in my case.
 
 As I understand it, gmirror writes its metadata on the last sector of
 the provider; when tasting devices it will look at the last sector of
 ad4, find the metadata and use that as the provider for your mirror; you
 can either hardcode the provider name there to override it, or make the
 slice 1 sector smaller so gmirror tastes ad4, finds nothing, then goes
 on to taste ad4s1 correctly.

This was fixed for most cases by adding the size of the provider to the
metadata.  ad4 should be a different size than ad4s1 as the partition
table has to go somewhere...

Looks like it was fixed in HEAD in Feb 2005, and MFC'd to 5.x in March.
Shouldn't have ever been a problem for 6.x release.

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/geom/mirror/g_mirror.c#rev1.19.2.8

Craig
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: Gmirror'd SWAP: no dump?

2006-01-19 Thread Larry Rosenman
Craig Boston wrote:
 On Thu, Jan 19, 2006 at 02:53:42PM +, Thomas Hurst wrote:
 IIRC I had the problem that 'gmirror insert' without '-h' not always
 inserted the slice specified by the entire block device (e.g.
 /dev/ad4s1 vs. /dev/ad4). Apparently there is some auto detection
 code and/or gmirror cannot differ correctly, but that's just a
 guess. Specifing '-h' fixed it in my case.
 
 As I understand it, gmirror writes its metadata on the last sector of
 the provider; when tasting devices it will look at the last sector of
 ad4, find the metadata and use that as the provider for your mirror;
 you can either hardcode the provider name there to override it, or
 make the slice 1 sector smaller so gmirror tastes ad4, finds
 nothing, then goes on to taste ad4s1 correctly.
 
 This was fixed for most cases by adding the size of the provider to
 the metadata.  ad4 should be a different size than ad4s1 as the
 partition table has to go somewhere...
 
 Looks like it was fixed in HEAD in Feb 2005, and MFC'd to 5.x in
 March. Shouldn't have ever been a problem for 6.x release.
 

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/geom/mirror/g_mirror.c#rev1.19
.2.8
 
Hrm.  With using the method for slices as specified on the ~rse page, I got
repeatable
lockups.

With specifying the entire disk, it works as normal, but no dump device.

Suggestions on how to enable dump, **AND** reliable boot would be
appreciated.

LER



-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 512-248-2683 E-Mail: ler@lerctr.org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3893

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Gmirror'd SWAP: no dump?

2006-01-18 Thread Larry Rosenman
Are there any plans to support dumping to a gmirror'd swapfile?

My FreeBSD/amd64 6.0-STABLE as of today doesn't seem to want to do it.

Thanks,
LER


-- 
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 512-248-2683 E-Mail: ler@lerctr.org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3893

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Gmirror'd SWAP: no dump?

2006-01-18 Thread Igor Robul
On Wed, Jan 18, 2006 at 12:44:27PM -0600, Larry Rosenman wrote:
 Are there any plans to support dumping to a gmirror'd swapfile?
Dumping occurs when kernel is in bad condition, so GEOM can not be
safe used (for example panic in GEOM code). 

Check archives for  last month of 2005 for longer explanation.
 
 My FreeBSD/amd64 6.0-STABLE as of today doesn't seem to want to do it.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]