Alastair Watts | 1 Jan 2007 07:38
Picon

Re: Recommended gmirror solution with swap?

Michael Knoll wrote:

> I am planning on converting my FreeBSD machine to use gmirror on two
> 40gig drives.  Reading the handbook and other sites with instructions
> on configuring gmirror, I notice they all disable swap.  Is this
> acceptable?  Is it expected swap be on another drive?  If so, is there
> a solution which I can keep the swap on the mirror. as I don't have
> another drive?

I'm running the following setup:

 > gmirror status
       Name    Status  Components
mirror/gm0  COMPLETE  ad0
                       ad2

 > swapinfo
Device          1K-blocks     Used    Avail Capacity
/dev/mirror/gm0s1b   1048576      784  1048576     0%

 > mount
/dev/mirror/gm0s1a on / (ufs, local)
devfs on /dev (devfs, local)
/dev/mirror/gm0s1d on /tmp (ufs, local, soft-updates)
/dev/mirror/gm0s1e on /usr (ufs, local, soft-updates)
devfs on /usr/var/named/dev (devfs, local)

Can someone confirm if this is not what should be done? It has appeared 
to work fine (having swap mirrored is a good thing from a keeping the 
system alive point of view), and I would be interested to hear why it 
(Continue reading)

FreeBSD bugmaster | 1 Jan 2007 12:08
Picon
Favicon

Current problem reports assigned to you

Current FreeBSD problem reports
Critical problems
Serious problems

S Tracker      Resp.      Description
--------------------------------------------------------------------------------
o kern/73177   geom       kldload geom_* causes panic due to memory exhaustion
o kern/76538   geom       [gbde] nfs-write on gbde partition stalls and continue
o kern/83464   geom       [geom] [patch] Unhandled malloc failures within libgeo
o kern/84556   geom       [geom] GBDE-encrypted swap causes panic at shutdown
o kern/87544   geom       [gbde] mmaping large files on a gbde filesystem deadlo
o kern/89102   geom       [geom_vfs] [panic] panic when forced unmount FS from u
o bin/90093    geom       fdisk(8) incapable of altering in-core geometry
o kern/90582   geom       [geom_mirror] [panic] Restore cause panic string (ffs_
o kern/98034   geom       [geom] dereference of NULL pointer in acd_geom_detach 
o kern/104389  geom       [geom] [patch] sys/geom/geom_dump.c doesn't encode XML

10 problems total.

Non-critical problems

S Tracker      Resp.      Description
--------------------------------------------------------------------------------
o bin/78131    geom       gbde "destroy" not working.
o kern/79251   geom       [2TB] newfs fails on 2.6TB gbde device
o kern/94632   geom       [geom] Kernel output resets input while GELI asks for 
o kern/105390  geom       [geli] filesystem on a md backed by sparse file with s

4 problems total.

(Continue reading)

Ivan Voras | 1 Jan 2007 19:07
Picon

Re: Recommended gmirror solution with swap?

Michael Knoll wrote:
> I am planning on converting my FreeBSD machine to use gmirror on two
> 40gig drives.  Reading the handbook and other sites with instructions
> on configuring gmirror, I notice they all disable swap.  Is this
> acceptable?  Is it expected swap be on another drive?  If so, is there
> a solution which I can keep the swap on the mirror. as I don't have
> another drive?

There's no technical problem with it, it's more a matter of organization
and convenience. For example: you don't really need the swap to survive
a crash, so there's no need to introduce the overhead of mirroring it -
better to leave 2x the space configured as swap area. If you have more
than one area, the system should take advantage of it and use both to
maximize speed (in theory this should work as an implicit RAID0 across
the swap areas).

Rene Ladan | 1 Jan 2007 21:17
Picon

xbox360 extension for review/debug

Hi,

I've written an extension to /sys/geom/geom_mbr.c to slice up xbox360
hard disks and memory units.  The patch for revision 1.68 (i.e. CURRENT)
is at http://home.tisali.nl/rladan/freebsd/geom_mbr.c.diff

Memory units are sliced up into two file systems, hard disks into three
(plus two non-filesystem slices).  This would normally be handled by the
 existing geom_mbr code, but Mircosoft didn't put a mbr / partition
table on the media :/

The code generates a new class XBOX360 which intends to detect and slice
up the media.  It is currently unusable, without an attached medium the
kernel panics during boot at xbox360_taste+0x82 in process g_up.  My
geom foo could use some help here :)  At least the 'geom' command in ddb
shows this new class (without consumers/producers).

(Microsoft also invented a new filesystem for the media, I'm currently
debugging a clone of msdosfs to parse this fileystem, see the -fs
archives of Nov/Dec 2006.)

Regards,
Rene
--

-- 
GPG fingerprint = E738 5471 D185 7013 0EE0  4FC8 3C1D 6F83 12E1 84F6
(subkeys.pgp.net)

"It won't fit on the line."
		-- me, 2001

(Continue reading)

Poul-Henning Kamp | 1 Jan 2007 22:24
Picon
Favicon

Re: xbox360 extension for review/debug

In message <45996C4F.8070700 <at> gmail.com>, Rene Ladan writes:
>Hi,
>
>I've written an extension to /sys/geom/geom_mbr.c to slice up xbox360
>hard disks and memory units.  The patch for revision 1.68 (i.e. CURRENT)
>is at http://home.tisali.nl/rladan/freebsd/geom_mbr.c.diff

This is wrong, you should make a geom_xbox360 class instead.

--

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk <at> FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
Thomas Hurst | 1 Jan 2007 22:50

Re: Recommended gmirror solution with swap?

* Michael Knoll (michael.knoll <at> gmail.com) wrote:

> I am planning on converting my FreeBSD machine to use gmirror on two
> 40gig drives.  Reading the handbook and other sites with instructions
> on configuring gmirror, I notice they all disable swap.  Is this
> acceptable?  Is it expected swap be on another drive?  If so, is there
> a solution which I can keep the swap on the mirror. as I don't have
> another drive?

On every gmirrorred system I've set up I've always included swap in the
mirror; you don't have to, but it's a good idea if you want the system
to stay up after a disk failure, which is surely part of if not the
entire point.

You can't put kernel crash dumps on gmirrored devices, but you can
put them on one of the underlying providers fairly easily if that's
important.

Are you sure you're not confusing the swapoff="YES" line many guides
suggest adding to rc.conf with disabling swap completely?  This just
makes the system issue swapoff -a at shutdown to make sure any mirrored
swap devices are closed, which used to result in the mirror being
rebuilt at startup because it was "dirty".

--

-- 
Thomas 'Freaky' Hurst
    http://hur.st/
Gary Palmer | 2 Jan 2007 06:01
Picon
Favicon

Re: Recommended gmirror solution with swap?

On Mon, Jan 01, 2007 at 07:07:59PM +0100, Ivan Voras wrote:
> Michael Knoll wrote:
> > I am planning on converting my FreeBSD machine to use gmirror on two
> > 40gig drives.  Reading the handbook and other sites with instructions
> > on configuring gmirror, I notice they all disable swap.  Is this
> > acceptable?  Is it expected swap be on another drive?  If so, is there
> > a solution which I can keep the swap on the mirror. as I don't have
> > another drive?
> 
> There's no technical problem with it, it's more a matter of organization
> and convenience. For example: you don't really need the swap to survive
> a crash, so there's no need to introduce the overhead of mirroring it -
> better to leave 2x the space configured as swap area. If you have more
> than one area, the system should take advantage of it and use both to
> maximize speed (in theory this should work as an implicit RAID0 across
> the swap areas).

Except in the case where a drive holding some swapped out memory goes bad
and the system panics or crashes as a result.  It might not make as
much sense for desktops, but if I were (still) building servers I'd
mirror everything that the system depended on to run.
Ivan Voras | 2 Jan 2007 10:26
Picon

Re: Recommended gmirror solution with swap?

Gary Palmer wrote:

> Except in the case where a drive holding some swapped out memory goes bad
> and the system panics or crashes as a result.  It might not make as
> much sense for desktops, but if I were (still) building servers I'd
> mirror everything that the system depended on to run.

Well, yes... though the "only" things lost in this case are the
processes using the swap :) But you're right in the general case.

R. B. Riddick | 2 Jan 2007 11:01
Picon
Favicon

Re: Recommended gmirror solution with swap?

--- Ivan Voras <ivoras <at> fer.hr> wrote:
> Gary Palmer wrote:
> 
> > Except in the case where a drive holding some swapped out memory goes bad
> > and the system panics or crashes as a result.  It might not make as
> > much sense for desktops, but if I were (still) building servers I'd
> > mirror everything that the system depended on to run.
> 
> Well, yes... though the "only" things lost in this case are the
> processes using the swap :) But you're right in the general case.
> 
Hmm... I wonder what gmirror is good for, when one of its consumers fails...

I just setup this test setting:
1. gnop on ad0s1gd
2. gmirror on ad0s1gd.nop (hardcoded (-h)) and ad0s1ge
3. dd (writes from /dev/urandom to the mirror)
4. gnop configure -v -f 100 ad0s1gd.nop
5. dd becomes unresponsive; CTRL+t says:
load: 0.78  cmd: dd 11034 [physwr] 0.01u 0.68s 0% 612k

I think an infinite page/swap-out transaction is quite bad for a FreeBSD, so
that we will need a reboot anyway...

I think, graid5 (http://home.tiscali.de/cmdr_faako/geom_raid5.tbz) would handle
that better... But I did not test that for some weeks...

Now I will reboot, in order to get rid of the "dd"... :-)

-Arne
(Continue reading)

Rick C. Petty | 2 Jan 2007 20:38

Re: Recommended gmirror solution with swap?

On Sun, Dec 31, 2006 at 12:13:28PM -0500, Michael Knoll wrote:
> I am planning on converting my FreeBSD machine to use gmirror on two
> 40gig drives.  Reading the handbook and other sites with instructions
> on configuring gmirror, I notice they all disable swap.  Is this
> acceptable?  Is it expected swap be on another drive?  If so, is there
> a solution which I can keep the swap on the mirror. as I don't have
> another drive?

I've not had much luck using any of those instructions.  Instead, I opted
to mirror the entire drive, the equivalent of:

gmirror label -vb round-robin gm0 ad0
gmirror insert -v gm0 ad1

followed by an "fdisk", a "bsdlabel", and a number of "newfs"es.

This was relatively easy to do without using the boot CD, even if you
don't have a third drive to install from:

(assuming you've booted from ad0)

gmirror label -vb round-robin gm0 ad1
fdisk -B mirror/gm0
bsdlabel -Bw mirror/gm0s1
bsdlabel -e mirror/gm0s1

* modify label accordingly, then: *

newfs /dev/mirror/gm0s1a
newfs -U /dev/mirror/gm0s1d
(Continue reading)


Gmane