Re: gmirror degraded

2012-10-11 Thread Warren Block

On Thu, 11 Oct 2012, Robert Fitzpatrick wrote:


Just looking for some advice, I had a server lock up that uses gmirror
for two RAID-1 arrays of the primary drive and a data drive. The data
drive was reported as degraded after a reset of the server, but is
rebuilding. It is comprised of two TB drives with one reporting ACTIVE
with no flags. The other synchronizing and taking days...


You mean it does this repeatedly?


I ran the smartctl command below on the synchronizing drive and it seems
there are no errors? Should I trust this drive?


1,003 reallocated sectors is a bad sign.  I would replace that drive.
___
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: gmirror and normal users?

2011-04-08 Thread Ivan Voras

On 08/04/2011 16:43, Christopher Hilton wrote:

Should a normal user be able to successfully:

  $ gmirror remove /dev/mirror/gm0 /dev/ad6

Or is this something that's just unlocked because I haven't mounted the drive 
yet?

$ uname -a
FreeBSD deathstar.example.com 8.2-STABLE FreeBSD 8.2-STABLE #1: Wed Apr  6 
13:09:37 EDT 2011 root@dagobah:/usr/obj/usr/src/sys/GENERIC  i386
$ id
uid=1001(chris) gid=1001(chris) 
groups=1001(chris),0(wheel),5(operator),1000(users)


It is because of the operator group. Normal users which are not in 
this groups would not be able to do it.


If a user can communicate with the device (i.e. has at least reads 
rights to it), he can send GEOM commands to it. The operator group has 
read permissions by default:


lara:~ ll /dev/mirror/
total 0
crw-r-  1 root  operator0, 150  8 Apr 16:55 bla

___
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: gmirror load broken in 8.1 memstick

2010-09-06 Thread perryh
Matthew Seaman m.sea...@infracaninophile.co.uk wrote:

 If you've been able to run 'gmirror label' then geom_mirror.ko is
 almost certainly already loaded into your kernel, making 'gmirror
 load' superfluous.  Check using kldstat(8).

Fixit# kldstat
Id Refs AddressSize Name
 11 0xc040 bb5504   kernel

It looks as if writing the metadata doesn't require geom_mirror.ko
to be loaded -- which makes a certain amount of sense since the
module, even if loaded, presumably shouldn't do anything to a
partition that doesn't already have metadata in its last sector.

The good news is that, now having an idea what to look for, I checked
for geom_mirror.ko in /boot/kernel and found -- surprise! -- the
/boot/kernel directory doesn't even exist in the Fixit FS (when
booted from the USB stick, dunno about the CD or DVD) and this is
apparently the cause of gmirror load reporting Command 'load' not
available.  The fix is:

Fixit# ln -s /dist/boot/kernel /boot

after which gmirror load works, creating /dev/mirror/gm0{,a,b}.
___
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


More gmirror problems (Re: gmirror load broken in 8.1 memstick)

2010-09-06 Thread perryh
I wrote:

 The good news is ...

 Fixit# ln -s /dist/boot/kernel /boot

 after which gmirror load works, creating /dev/mirror/gm0{,a,b}.

and the bad news is that it still doesn't work:

* gmirror load did create /dev/mirror/gm0{,a,b}, and it produced
  no output on stdout or stderr, but it appended a couple of lines
  to dmesg and the second does not look at all promising:

  GEOM_MIRROR: Device mirror/gm0 launched (1/1).
  GEOM_MIRROR: Cannot add disk ad0s2a to gm0 (error=17).

  17 is defined in sys/errno.h as EEXIST /* File exists */

  What can this mean?  Of course ad0s2a and gm0 exist:  ad0s2a is
  the (so far only) provider for gm0, which was just instantiated.

  By a different test, that error message may be bogus (long lines
  reformatted):

  Fixit# ls -la /dev/mirror
  total 1
  dr-xr-xr-x  2 root  0  512 Sep  6 08:18 ./
  dr-xr-xr-x  8 root  0  512 Sep  6 08:08 ../
  crw-r-  1 root  operator0,  78 Sep  6 08:15 gm0
  crw-r-  1 root  operator0,  79 Sep  6 08:15 gm0a
  crw-r-  1 root  operator0,  80 Sep  6 08:15 gm0b

  Fixit# file -s /dev/mirror/* /dev/ad0s2a

  /dev/mirror/gm0:  Unix Fast File system [v2] (little-endian) last
  mounted on /mnt/z, last written at Sun Sep  5 03:24:40 2010, clean
  flag 1, readonly flag 0, number of blocks 154976879, number of
  data blocks 150098746, number of cylinder groups 1648, block size
  16384, fragment size 2048, average file size 16384, average number
  of files in dir 64, pending blocks to free 0, pending inodes to
  free 0, system-wide uuid 0, minimum percentage of free blocks 8,
  TIME optimization

  /dev/mirror/gm0a: Unix Fast File system [v2] (little-endian) last
  mounted on /mnt/z, last written at Sun Sep  5 03:24:40 2010, clean
  flag 1, readonly flag 0, number of blocks 154976879, number of
  data blocks 150098746, number of cylinder groups 1648, block size
  16384, fragment size 2048, average file size 16384, average number
  of files in dir 64, pending blocks to free 0, pending inodes to
  free 0, system-wide uuid 0, minimum percentage of free blocks 8,
  TIME optimization

  /dev/mirror/gm0b: ERROR: cannot read `/dev/mirror/gm0b'
  (Input/Output error)

  /dev/ad0s2a:  Unix Fast File system [v2] (little-endian) last
  mounted on /mnt/z, last written at Sun Sep  5 03:24:40 2010, clean
  flag 1, readonly flag 0, number of blocks 154976879, number of
  data blocks 150098746, number of cylinder groups 1648, block size
  16384, fragment size 2048, average file size 16384, average number
  of files in dir 64, pending blocks to free 0, pending inodes to
  free 0, system-wide uuid 0, minimum percentage of free blocks 8,
  TIME optimization

  This sure _looks_ as if mirror/gm0 and mirror/gm0a are seeing the
  data on ad0s2a, so maybe it's working after all.  But:

* After exiting from Fixit, and having sysinstall rescan devices so
  as to become aware of /dev/mirror/gm0*, gm0 is not in the disk
  list for either Partition (slice) or Label.  I even tried:

  Fixit# ( cd /dev  ln -s mirror/* .  ll gm* )
  lrwxr-xr-x  1 root  0  10 Sep  6 10:48 gm0@ - mirror/gm0
  lrwxr-xr-x  1 root  0  10 Sep  6 10:48 gm0a@ - mirror/gm0a
  lrwxr-xr-x  1 root  0  10 Sep  6 10:48 gm0b@ - mirror/gm0b

  in case sysinstall looks only in /dev itself and not in any
  subdirectories, and gm0 is *still* not in either list.  How
  do I get sysinstall to see it?
___
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: gmirror load broken in 8.1 memstick

2010-09-05 Thread Matthew Seaman
On 05/09/2010 05:14:02, per...@pluto.rain.com wrote:
 Fixit# gmirror label -vb round-robin gm0 /dev/ad0s2a
 
 appeared to work properly.  (I didn't write down the exact
 message, but it said something about the metadata having
 been written successfully.)  However:
 
 Fixit# gmirror load
 gmirror: Command 'load' not available.
 
 and it did not create /dev/mirror/gm0 or even the /dev/mirror
 directory.
 
 How do I fix this?

If you've been able to run 'gmirror label' then geom_mirror.ko is almost
certainly already loaded into your kernel, making 'gmirror load'
superfluous.  Check using kldstat(8).

The actual problem is getting /dev to update itself and show gmirror
related filesystems.  First of all, is /dev a mounted devfs filesystem?
  If it is, does playing with devfs(8) yield any enlightenment?

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: gmirror gm0

2010-08-10 Thread ill...@gmail.com
On 10 August 2010 17:33, Dick Hoogendijk d...@nagual.nl wrote:
  How can I totally remove a created gmirror (gm0)
 I know of the option gmirror forget gm0 but does that make the mirror
 disappear?

# gmirror clear gm0
perhaps?

http://www.freebsd.org/cgi/man.cgi?query=gmirrorsektion=8apropos=0manpath=FreeBSD+8.1-RELEASE
or
http://5z8.info/racist_xzg

-- 
--
___
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: gmirror+gjournal: spontaneous reboots on excessive disk access

2010-01-18 Thread Ivan Voras

Michael Grimm wrote:

Hi --

I'm running a gmirror raid1 plus gjournal for a year now. This is a
7.2-RELEASE-p6 right now. Both disks are regular ATA and healthy
according smartctl.

Sometimes, not always though, I do experience spontaneous reboots
without leaving any hints in logfiles whenver I beat my disks
excessively. This might be something like:

dd if=/dev/null of=/some/file bs=1M count=4k
plus
parallel disk accesses by mail and news server.

If I omit all parallel disk access those dd's will run to completion
without reboots, always.


What you have is a common symptom of hardware problems - either a weak 
power supply or a broken disk controller. In the first case because two 
drives try to suck power where only one was doing it before and in the 
second reason because the disk controller is too broken to correctly 
handle simultaneous access to two drives. Unfortunately, if you don't 
get any console error messages it is hard to tell which. The power 
supply is usually easier to replace.



___
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: gmirror, gjournal and glabel - which order?

2009-10-13 Thread krad
2009/10/13 Daniel Bye freebsd-questi...@slightlystrange.org

 On Tue, Oct 13, 2009 at 01:08:46AM +0300, Manolis Kiagias wrote:
  Daniel Bye wrote:
   Hi all,
  
   I'm having a hard time trying to work out which order I should set up
   gmirror, glabel and gjournal on a new system. I want to journal my
   /home partition, label all the partitions for ease of reference, and
   use gmirror to save me in the event a disk goes bad. I am struggling
   to fit the pieces together conceptually in my mind. I understand the
   processes involved in setting each part separately - my problem is in
   trying to build this up in the right order so that it all makes sense.
  
   So far, I have labelled the primary drive and set up the journal. I
 have
   edited fstab to reflect the labels and journalled file system on /home.
   If I now build a mirror, don't I need to alter fstab to mount that and
   not the stuff in /dev/label? In which case, I guess I need to build the
   mirror first, and then set up labels and journals?
  
   I'm going round and round in circles here and none of the stuff I've
   read on the web enlightens me... :-/
  
   Any insights or suggestions would be taken as a great kindness!
  
   Dan
  
  
  When not mirroring,  I first create the journals and then label the
  resulting ad.journal devices
  In case you are doing a gmirror device, you would not really need the
  separate label step - the gm device name won't change and gmirror is not
  affected if the device names of the individual disks change (the disks
  are marked as part of a mirror and scanned at startup).
  When you are creating the composite gmirror device you are effectively
  labeling it anyway i.e. gmirror label gm0...
  Now if you follow the usual tutorials found in the web you would be
  using gm0 / gm1 but you actually name it any way you wish.
  If you really need to label the separate gmirrored partitions, do it
  after setting up the mirror.
 
  Concerning the order of journals and mirroring, I  create the journals
  first, then mirror the result. This has always worked fine for me.

 Thanks much, Manoli. After posting, I came to more or less the same
 conclusion, but it's good to get confirmation from someone who clearly
 knows more about this stuff than I do!

 I'd still be interested to hear what others think/do.

 As ever, thanks for your time.

 Dan

 --
 Daniel Bye
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \



I've always gmirrored 1st, then created the gjournal then newfs the journal
device with the -L and -J flags to label it. I'm not sure if this is correct
but ufs2 has hooks into gjournal, and if the journal class inst directly
below the ufs layer these hooks might not work correctly.
___
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: gmirror, gjournal and glabel - which order?

2009-10-13 Thread Vincent Hoffman
krad wrote:
 2009/10/13 Daniel Bye freebsd-questi...@slightlystrange.org

   
 On Tue, Oct 13, 2009 at 01:08:46AM +0300, Manolis Kiagias wrote:
 
 Daniel Bye wrote:
   
 Hi all,

 I'm having a hard time trying to work out which order I should set up
 gmirror, glabel and gjournal on a new system. I want to journal my
 /home partition, label all the partitions for ease of reference, and
 use gmirror to save me in the event a disk goes bad. I am struggling
 to fit the pieces together conceptually in my mind. I understand the
 processes involved in setting each part separately - my problem is in
 trying to build this up in the right order so that it all makes sense.

 So far, I have labelled the primary drive and set up the journal. I
 
 have
 
 edited fstab to reflect the labels and journalled file system on /home.
 If I now build a mirror, don't I need to alter fstab to mount that and
 not the stuff in /dev/label? In which case, I guess I need to build the
 mirror first, and then set up labels and journals?

 I'm going round and round in circles here and none of the stuff I've
 read on the web enlightens me... :-/

 Any insights or suggestions would be taken as a great kindness!

 Dan


 
 When not mirroring,  I first create the journals and then label the
 resulting ad.journal devices
 In case you are doing a gmirror device, you would not really need the
 separate label step - the gm device name won't change and gmirror is not
 affected if the device names of the individual disks change (the disks
 are marked as part of a mirror and scanned at startup).
 When you are creating the composite gmirror device you are effectively
 labeling it anyway i.e. gmirror label gm0...
 Now if you follow the usual tutorials found in the web you would be
 using gm0 / gm1 but you actually name it any way you wish.
 If you really need to label the separate gmirrored partitions, do it
 after setting up the mirror.

 Concerning the order of journals and mirroring, I  create the journals
 first, then mirror the result. This has always worked fine for me.
   
 Thanks much, Manoli. After posting, I came to more or less the same
 conclusion, but it's good to get confirmation from someone who clearly
 knows more about this stuff than I do!

 I'd still be interested to hear what others think/do.

 As ever, thanks for your time.

 Dan

 --
 Daniel Bye
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \

 


 I've always gmirrored 1st, then created the gjournal then newfs the journal
 device with the -L and -J flags to label it. I'm not sure if this is correct
 but ufs2 has hooks into gjournal, and if the journal class inst directly
 below the ufs layer these hooks might not work correctly.
   

I've always done it this way too (mirror then journal,) both for the
reason given and because of the following from the gjournal(8) manpage:

 When gjournal is configured on top of gmirror(8) or graid3(8)
providers,
 it also keeps them in a consistent state, thus automatic
synchronization
 on power failure or system crash may be disabled on those providers.


Vince
 ___
 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
   

___
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: gmirror, gjournal and glabel - which order?

2009-10-12 Thread Manolis Kiagias
Daniel Bye wrote:
 Hi all,

 I'm having a hard time trying to work out which order I should set up
 gmirror, glabel and gjournal on a new system. I want to journal my
 /home partition, label all the partitions for ease of reference, and
 use gmirror to save me in the event a disk goes bad. I am struggling
 to fit the pieces together conceptually in my mind. I understand the
 processes involved in setting each part separately - my problem is in
 trying to build this up in the right order so that it all makes sense.

 So far, I have labelled the primary drive and set up the journal. I have
 edited fstab to reflect the labels and journalled file system on /home.
 If I now build a mirror, don't I need to alter fstab to mount that and
 not the stuff in /dev/label? In which case, I guess I need to build the
 mirror first, and then set up labels and journals?

 I'm going round and round in circles here and none of the stuff I've
 read on the web enlightens me... :-/

 Any insights or suggestions would be taken as a great kindness!

 Dan

   
When not mirroring,  I first create the journals and then label the
resulting ad.journal devices
In case you are doing a gmirror device, you would not really need the
separate label step - the gm device name won't change and gmirror is not
affected if the device names of the individual disks change (the disks
are marked as part of a mirror and scanned at startup).
When you are creating the composite gmirror device you are effectively
labeling it anyway i.e. gmirror label gm0...
Now if you follow the usual tutorials found in the web you would be
using gm0 / gm1 but you actually name it any way you wish.
If you really need to label the separate gmirrored partitions, do it
after setting up the mirror.

Concerning the order of journals and mirroring, I  create the journals
first, then mirror the result. This has always worked fine for me.
___
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: gmirror, gjournal and glabel - which order?

2009-10-12 Thread Daniel Bye
On Tue, Oct 13, 2009 at 01:08:46AM +0300, Manolis Kiagias wrote:
 Daniel Bye wrote:
  Hi all,
 
  I'm having a hard time trying to work out which order I should set up
  gmirror, glabel and gjournal on a new system. I want to journal my
  /home partition, label all the partitions for ease of reference, and
  use gmirror to save me in the event a disk goes bad. I am struggling
  to fit the pieces together conceptually in my mind. I understand the
  processes involved in setting each part separately - my problem is in
  trying to build this up in the right order so that it all makes sense.
 
  So far, I have labelled the primary drive and set up the journal. I have
  edited fstab to reflect the labels and journalled file system on /home.
  If I now build a mirror, don't I need to alter fstab to mount that and
  not the stuff in /dev/label? In which case, I guess I need to build the
  mirror first, and then set up labels and journals?
 
  I'm going round and round in circles here and none of the stuff I've
  read on the web enlightens me... :-/
 
  Any insights or suggestions would be taken as a great kindness!
 
  Dan
 

 When not mirroring,  I first create the journals and then label the
 resulting ad.journal devices
 In case you are doing a gmirror device, you would not really need the
 separate label step - the gm device name won't change and gmirror is not
 affected if the device names of the individual disks change (the disks
 are marked as part of a mirror and scanned at startup).
 When you are creating the composite gmirror device you are effectively
 labeling it anyway i.e. gmirror label gm0...
 Now if you follow the usual tutorials found in the web you would be
 using gm0 / gm1 but you actually name it any way you wish.
 If you really need to label the separate gmirrored partitions, do it
 after setting up the mirror.
 
 Concerning the order of journals and mirroring, I  create the journals
 first, then mirror the result. This has always worked fine for me.

Thanks much, Manoli. After posting, I came to more or less the same
conclusion, but it's good to get confirmation from someone who clearly
knows more about this stuff than I do!

I'd still be interested to hear what others think/do.

As ever, thanks for your time.

Dan

-- 
Daniel Bye
 _
  ASCII ribbon campaign ( )
 - against HTML, vCards and  X
- proprietary attachments in e-mail / \


pgpH9gEpBAJ2C.pgp
Description: PGP signature


Re: Gmirror

2009-08-09 Thread Michael Christie
Hi there all,

I need your help. I have a supermicro server which was running Freebsd 7.1
with 2 SATA drives. I have had G mirror running on the server. I needed to
do a full reinstall of freebsd but was unable to disengage the mirror at the
time. When installing Freebsd, on to the drives i see i have AD4 AD6 and AR0
on the disk label, i have installed the new free bsd in AD4, and the system
would not boot.



I have come across this before where i have to remove AR0 to default the
drive, i can remember reading a thread on how to use “fix it” and using the
live cd. I have google but cannot find it

Please is there any one here that can refresh my memory and tell me how to
remove gmirror from my drives so i can do a fresh install,.



Thanmks

Mick
___
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: Gmirror

2009-08-09 Thread Roland Smith
On Sun, Aug 09, 2009 at 10:41:05PM +1000, Michael Christie wrote:
 Hi there all,
 
 I need your help. I have a supermicro server which was running Freebsd 7.1
 with 2 SATA drives. I have had G mirror running on the server. I needed to
 do a full reinstall of freebsd but was unable to disengage the mirror at the
 time. When installing Freebsd, on to the drives i see i have AD4 AD6 and AR0
 on the disk label, i have installed the new free bsd in AD4, and the system
 would not boot.
 
 I have come across this before where i have to remove AR0 to default the
 drive, i can remember reading a thread on how to use “fix it” and using the
 live cd. I have google but cannot find it

 Please is there any one here that can refresh my memory and tell me how to
 remove gmirror from my drives so i can do a fresh install,.

I don't think you have to do a new install. Just use 'boot0cfg -s 1 ad4' to
make the next boot start from da4. Then rebuild ad6: 'gmirror rebuild ar0 ad6'.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgp1HJIPzCCEQ.pgp
Description: PGP signature


Re: Gmirror

2009-08-09 Thread Tim Judd
On 8/9/09, Michael Christie vk3...@gmail.com wrote:
 Hi there all,

 I need your help. I have a supermicro server which was running Freebsd 7.1
 with 2 SATA drives. I have had G mirror running on the server. I needed to
 do a full reinstall of freebsd but was unable to disengage the mirror at the
 time. When installing Freebsd, on to the drives i see i have AD4 AD6 and AR0
 on the disk label, i have installed the new free bsd in AD4, and the system
 would not boot.


ar0 is often a cheap onboard RAID device.  So cheap as it doesn't even
hide ad4 and ad6 which is also hooked up to the motherboard.

Installing to ad4 installed it allright.  But now the hardware raid
will screw things up a bit.

Either use gmirror with ad4 and ad6, or use hardware raid on ar0 only.







 I have come across this before where i have to remove AR0 to default the
 drive, i can remember reading a thread on how to use “fix it” and using the
 live cd. I have google but cannot find it

 Please is there any one here that can refresh my memory and tell me how to
 remove gmirror from my drives so i can do a fresh install,.



 Thanmks

 Mick
 ___
 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

___
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: Gmirror

2009-08-09 Thread Michael Christie
Yes you are right , I would like to clean off the drives, defalt and clean,
then reformat. and reinstall, i did see a post some where on how to do it
with the fixit cd, but can not find it now. any idears ?

Thanks
Mick

On Mon, Aug 10, 2009 at 5:07 AM, Tim Judd taj...@gmail.com wrote:

 On 8/9/09, Michael Christie vk3...@gmail.com wrote:
  Hi there all,
 
  I need your help. I have a supermicro server which was running Freebsd
 7.1
  with 2 SATA drives. I have had G mirror running on the server. I needed
 to
  do a full reinstall of freebsd but was unable to disengage the mirror at
 the
  time. When installing Freebsd, on to the drives i see i have AD4 AD6 and
 AR0
  on the disk label, i have installed the new free bsd in AD4, and the
 system
  would not boot.


 ar0 is often a cheap onboard RAID device.  So cheap as it doesn't even
 hide ad4 and ad6 which is also hooked up to the motherboard.

 Installing to ad4 installed it allright.  But now the hardware raid
 will screw things up a bit.

 Either use gmirror with ad4 and ad6, or use hardware raid on ar0 only.




 
 
 
  I have come across this before where i have to remove AR0 to default the
  drive, i can remember reading a thread on how to use “fix it” and using
 the
  live cd. I have google but cannot find it
 
  Please is there any one here that can refresh my memory and tell me how
 to
  remove gmirror from my drives so i can do a fresh install,.
 
 
 
  Thanmks
 
  Mick
  ___
  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
 

___
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: gmirror on different disks

2009-08-03 Thread Mel Flynn
On Friday 31 July 2009 02:24:31 Grzegorz Danecki wrote:
 Hello everybody!

 I'm just wondering, I had gmirror with two disks:

 Master:  ad0 ST3160815AS/4.AAB Serial ATA II
 Master:  ad2 ST3160815AS/4.AAB Serial ATA II

 unfortunately ad0 failed today, leaving me with degraded array and ad0
 offline.

 I did

 # gmirror forget gm0, then shutdown, ad0 was replaced with:

 ad0: 152626MB Seagate ST3160815AS 3.AAD at ata0-master SATA300

 with different firmware I think.

 Then gmirror insert gm0 /dev/ad0

 (...)
 Jul 31 09:55:46 julia kernel: GEOM_MIRROR: Device gm0: rebuilding provider
 ad0 finished.
 Jul 31 09:55:46 julia kernel: GEOM_MIRROR: Device gm0: provider ad0
 activated.

 But the disk is a little bit smaller:

 1. Name: mirror/gm0
Mediasize: 160040803328 (149G)
^^
Sectorsize: 512
Mode: r5w5e6
 Consumers:
 1. Name: ad2
Mediasize: 160041885696 (149G)
^^
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: DIRTY
GenID: 1
SyncID: 1
ID: 3791030614
 2. Name: ad0
Mediasize: 160040803840 (149G)
^^

Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: DIRTY
GenID: 1
SyncID: 1
ID: 2477089776

 # gmirror status
   NameStatus  Components
 mirror/gm0  COMPLETE  ad2
   ad0

 I mean - should I make the RAID once again with exactly the same drives, or
 can I leave it as it is right now?

The mirror rescaled to the size of the smallest provider and didn't report any 
problems during sync, so you should be fine.
-- 
Mel
___
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: gmirror / crash dumps

2009-08-01 Thread Kamigishi Rei

Anton Shterenlikht wrote:

4) I have the following in my 7-stable kernel
The long and the short of it is I don't get any dumps.
I read somewhere that you can't dump onto a gmirror device.
  

That is incorrect, but I don't know the cause of your problem.  I run
nothing but gmirror and dumps happen here.

I was also told that 
	you won't get a valid dump if your dumpdev

 is on a GEOM_MIRROR device
  
On 7.x, you have a 'legal' way to run gmirror -v prefer before savecore 
is run.

In -current, the corresponding rc file (alas, I forgot its name) is removed.
I tried adding gmirror -v prefer /dev/mirror0 to savecore rc.d file, 
but to no such luck.
The problem here is the order of startup for the drives inside the 
mirror; the first drive in the array that started during the boot when 
the panic occurred has to be the preferred device during savecore - and 
when this condition is met, you will get a valid dump.


i.e. let's assume that the system boots like

GEOM_MIRROR: Device gm0: provider ada0 detected.
GEOM_MIRROR: Device gm0: provider ada0 activated.
GEOM_MIRROR: Device gm0: provider ada1 detected.
GEOM_MIRROR: Device gm0: provider ada1 activated.
GEOM_MIRROR: Device gm0: provider mirror/mirror0 launched.
This makes us think that ada0 is the first drive to launch. Therefore, 
it's the drive where the dump will be saved during a panic.

So we add
gmirror configure -v prefer /dev/mirror/mirror0 /dev/ada0 (correct my 
syntax if I'm wrong here; tried it a month ago)

to /etc/rc.d/savecore right before the savecore call.

We do stuff, configure, build kernels, rebuild 'em, etc, reboot, and the 
system comes up


GEOM_MIRROR: Device gm0: provider ada1 detected.
GEOM_MIRROR: Device gm0: provider ada1 activated.
GEOM_MIRROR: Device gm0: provider ada0 detected.
GEOM_MIRROR: Device gm0: provider ada0 activated.
GEOM_MIRROR: Device gm0: provider mirror/mirror0 launched.

without us noticing.

And that's it; if it panics now, savecore won't save the crash dump 
because ada0 doesn't have it.


--
Kamigishi Rei
KREI-RIPE
___
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: gmirror / crash dumps

2009-07-31 Thread Adam Vande More
On Thu, Jul 30, 2009 at 11:23 PM, Philip M. Gollucci
pgollu...@p6m7g8.comwrote:

 Hi,

 Say I've got the following:
 /dev/mirror/gm0s1bnoneswapsw

 /dev/mirror/gm0s1a989M390M520M43%/
 /dev/mirror/gm0s1g 15G1.7G 12G13%/usr
 /dev/mirror/gm0s1h544G1.8M501G 0%/usr/home
 /dev/mirror/gm0s1d1.9G500M1.3G27%/usr/src
 /dev/mirror/gm0s1e1.9G1.1G733M60%/usr/obj
 /dev/mirror/gm0s1f 97G2.0K 89G 0%/var

 Well I'm trying to get my kernel panics to cause dumps
 1) /etc/rc.conf
 dumpdev=AUTO
 crashinfo_enable=YES

 2) sudo chmod 700 /var/crash

 3) 8GB RAM, 16GB of swap, /var/crash is 16GB  97GB

 4) I have the following in my 7-stable kernel
 makeoptions DEBUG=-g
 options AUDIT
 options KTRACE
 options KDB
 options KDB_TRACE
 options DDB
 options GDB
 options BREAK_TO_DEBUGGER
 options INVARIANTS
 options INVARIANT_SUPPORT
 options WITNESS
 options DEBUG_LOCKS
 options DEBUG_VFS_LOCKS
 options LOCK_PROFILING
 options DIAGNOSTIC

 The long and the short of it is I don't get any dumps.

 I read somewhere that you can't dump onto a gmirror device.


That is incorrect, but I don't know the cause of your problem.  I run
nothing but gmirror and dumps happen here.


 So I've moved /var off of
 /dev/mirror/gm0s1f 97G2.0K 89G 0%/var
 and I can now do what I want with this.

 How do I go about re-jiggering this (2-disk gmirror) so I can use 1
 slice from one of them as my dumpon(8) device?

 TIA

 ___
 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




-- 
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: gmirror / crash dumps

2009-07-31 Thread Anton Shterenlikht
On Fri, Jul 31, 2009 at 12:46:32AM -0500, Adam Vande More wrote:
 On Thu, Jul 30, 2009 at 11:23 PM, Philip M. Gollucci
 pgollu...@p6m7g8.comwrote:
 
  Hi,
 
  Say I've got the following:
  /dev/mirror/gm0s1bnoneswapsw
 
  /dev/mirror/gm0s1a989M390M520M43%/
  /dev/mirror/gm0s1g 15G1.7G 12G13%/usr
  /dev/mirror/gm0s1h544G1.8M501G 0%/usr/home
  /dev/mirror/gm0s1d1.9G500M1.3G27%/usr/src
  /dev/mirror/gm0s1e1.9G1.1G733M60%/usr/obj
  /dev/mirror/gm0s1f 97G2.0K 89G 0%/var
 
  Well I'm trying to get my kernel panics to cause dumps
  1) /etc/rc.conf
  dumpdev=AUTO
  crashinfo_enable=YES
 
  2) sudo chmod 700 /var/crash
 
  3) 8GB RAM, 16GB of swap, /var/crash is 16GB  97GB
 
  4) I have the following in my 7-stable kernel
  makeoptions DEBUG=-g
  options AUDIT
  options KTRACE
  options KDB
  options KDB_TRACE
  options DDB
  options GDB
  options BREAK_TO_DEBUGGER
  options INVARIANTS
  options INVARIANT_SUPPORT
  options WITNESS
  options DEBUG_LOCKS
  options DEBUG_VFS_LOCKS
  options LOCK_PROFILING
  options DIAGNOSTIC
 
  The long and the short of it is I don't get any dumps.
 
  I read somewhere that you can't dump onto a gmirror device.
 
 
 That is incorrect, but I don't know the cause of your problem.  I run
 nothing but gmirror and dumps happen here.

I was also told that 

you won't get a valid dump if your dumpdev
 is on a GEOM_MIRROR device

http://lists.freebsd.org/pipermail/freebsd-ia64/2009-July/002205.html

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 928 8233 
Fax: +44 (0)117 929 4423
___
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: gmirror on different disks

2009-07-31 Thread Adam Vande More
On Fri, Jul 31, 2009 at 5:24 AM, Grzegorz Danecki g.dane...@gmail.comwrote:

 Hello everybody!

 I'm just wondering, I had gmirror with two disks:

 Master:  ad0 ST3160815AS/4.AAB Serial ATA II
 Master:  ad2 ST3160815AS/4.AAB Serial ATA II

 unfortunately ad0 failed today, leaving me with degraded array and ad0
 offline.

 I did

 # gmirror forget gm0, then shutdown, ad0 was replaced with:

 ad0: 152626MB Seagate ST3160815AS 3.AAD at ata0-master SATA300

 with different firmware I think.

 Then gmirror insert gm0 /dev/ad0

 (...)
 Jul 31 09:55:46 julia kernel: GEOM_MIRROR: Device gm0: rebuilding provider
 ad0 finished.
 Jul 31 09:55:46 julia kernel: GEOM_MIRROR: Device gm0: provider ad0
 activated.

 But the disk is a little bit smaller:

 1. Name: mirror/gm0
   Mediasize: 160040803328 (149G)
   Sectorsize: 512
   Mode: r5w5e6
 Consumers:
 1. Name: ad2
   Mediasize: 160041885696 (149G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: DIRTY
   GenID: 1
   SyncID: 1
   ID: 3791030614
 2. Name: ad0
   Mediasize: 160040803840 (149G)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: DIRTY
   GenID: 1
   SyncID: 1
   ID: 2477089776

 # gmirror status
  NameStatus  Components
 mirror/gm0  COMPLETE  ad2
  ad0

 so, it looks fine.

 Can I expect any problems now because of different sizes? Any problems when
 RAID will be almost full?
 I mean - should I make the RAID once again with exactly the same drives, or
 can I leave it as it is right now?

 Thanks in advance!
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions


Drives don't matter to gmirror as long as they are at least big enough.  You
may get better performance with identical drives however.


-- 
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: gmirror per partition

2009-07-03 Thread Anton Shterenlikht
On Thu, Jul 02, 2009 at 03:48:41PM +0200, Wojciech Puchar wrote:
 
  # gmirror label -vb round-robin root /dev/da0p2
  gmirror: Can't store metadata on /dev/da0p2: Operation not permitted.
  isn't that partition accessed by other process or mounted?
 
  should it not be mounted?
 yes it should not, no matter what architecture.

ok, thank you

So how can I gmirror root partition? I can't unmount it, I think.
Perhaps I need to use a single-user mode?


Following is a gpart/gmirror report - some success and problems.

I did a fresh FBSD current install on ia64 on directly attached scsi, da0.

# gpart show
=  34  35566411  da0  GPT  (17G)
348192001  efi  (400M)
819234   10485762  freebsd-ufs  (512M)
   1867810   41943043  freebsd-swap  (2.0G)
   6062114   20971524  freebsd-ufs  (1.0G)
   8159266   20971525  freebsd-ufs  (1.0G)
  10256418  253100276  freebsd-ufs  (12G)

#

What I want is to mirror the whole of the boot disk to da1, which
is identical to da0, but following Marcel's advice, will apply
gmirror per partition.

So starting with efi partition:

First I create GPT scheme on da1

# gpart create -s gpt da1
da1 created
# gpart show da1
=  34  35566411  da1  GPT  (17G)
34  35566411   - free -  (17G)

#

then I create EFI partition of the same size as on the boot disk, da0.

# gpart add -b 34 -s 819200 -t efi da1
da1p1 added
# gpart show da1
=  34  35566411  da1  GPT  (17G)
348192001  efi  (400M)
819234  34747211   - free -  (17G)

#

then I umount /efi so that I can create gmirror label on da0p1.

# umount /efi
# gmirror label -vb round-robin efi /dev/da0p1
Metadata value stored on /dev/da0p1.
Done.
#

Checking gmirror

# gmirror status
  NameStatus  Components
mirror/efi  COMPLETE  da0p1
#

and another check

# gmirror list
Geom name: efi
State: COMPLETE
Components: 1
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 3904698645
Providers:
1. Name: mirror/efi
   Mediasize: 419429888 (400M)
   Sectorsize: 512
   Mode: r0w0e0
Consumers:
1. Name: da0p1
   Mediasize: 419430400 (400M)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: NONE
   GenID: 0
   SyncID: 1
   ID: 1288665799

#

now insert a spare partition, da1p1, into the mirror

# gmirror insert efi /dev/da1p1

status looks fine

# gmirror status
  NameStatus  Components
mirror/efi  DEGRADED  da0p1
  da1p1 (44%)
# gmirror status
  NameStatus  Components
mirror/efi  DEGRADED  da0p1
  da1p1 (87%)
# gmirror status
  NameStatus  Components
mirror/efi  COMPLETE  da0p1
  da1p1
#

and another check

# gmirror list
Geom name: efi
State: COMPLETE
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 3904698645
Providers:
1. Name: mirror/efi
   Mediasize: 419429888 (400M)
   Sectorsize: 512
   Mode: r0w0e0
Consumers:
1. Name: da0p1
   Mediasize: 419430400 (400M)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: NONE
   GenID: 0
   SyncID: 1
   ID: 1288665799
2. Name: da1p1
   Mediasize: 419430400 (400M)
   Sectorsize: 512
   Mode: r1w1e1
   State: ACTIVE
   Priority: 0
   Flags: NONE
   GenID: 0
   SyncID: 1
   ID: 1724596009

#

So far, so good.

Now, I don't need to create the filesystem on the mirror, because EFI
was copied from da0p1 to da1p1.

So, I try to mount /dev/mirror/efi

# mount -t msdosfs /dev/mirror/efi /mnt
# df
Filesystem  1K-blocks   UsedAvail Capacity  Mounted on
/dev/da0p2 507630  35904   431116 8%/
devfs   1  10   100%/dev
/dev/da0p51012974 12   931926 0%/tmp
/dev/da0p6   12252370 252608 11019574 2%/usr
/dev/da0p41012974242   931696 0%/var
/dev/mirror/efi409504 163264   24624040%/mnt
#

again seems ok

so I proceed to modify /etc/fstab and change da0p1 into mirror/efi

# cat /etc/fstab
# DeviceMountpoint  FStype  Options DumpPass#
/dev/da0p3  noneswapsw  0   0
/dev/da0p2  /   ufs rw  1   1
/dev/mirror/efi /efimsdosfs rw  0   0
^^^
/dev/da0p5  /tmpufs rw  2   2
/dev/da0p6  /usrufs rw  2   2
/dev/da0p4  /varufs rw  2   2
/dev/acd0   /cdrom  cd9660  ro,noauto   0   0
#

now I can try to just mount /efi

# umount /mnt
# mount /efi
# df
Filesystem  1K-blocks   UsedAvail Capacity  Mounted on
/dev/da0p2 507630  35904   431116 8%/
devfs   1  10   100%/dev
/dev/da0p51012974 12   931926 0%/tmp
/dev/da0p6   12252370 252608 11019574 2%/usr
/dev/da0p41012974242   931696 0%/var
/dev/mirror/efi

Re: gmirror per partition

2009-07-03 Thread Alban Hertroys

On Jul 3, 2009, at 12:12 PM, Anton Shterenlikht wrote:


now to mirror root partition.

My problem is that root is mounted and cannot (?) be unmounted,  
unlike /efi,

on the live system.

# gpart add -b 819234 -s 1048576 -t freebsd-ufs da1
da1p2 added
#

# gmirror label -vb round-robin root /dev/da0p2
gmirror: Can't store metadata on /dev/da0p2: Operation not permitted.
#

If I create gmirror on da1, the spare disk:

# gmirror label -vb round-robin root /dev/da1p2
Metadata value stored on /dev/da0p1.
Done.
#

so that

# gmirror status
  NameStatus  Components
mirror/efi  COMPLETE  da0p1
  da1p1
mirror/root  COMPLETE  da1p2

#


then I still cannot insert da0p2


# gmirror insert root da0p2
gmirror: Cannot access provider da0p2.
#

So how can I gmirror root partion on a live system?


You're almost there... I did this a while ago, can't remember when,  
but I just upgraded the system that had this from FreeBSD 6.3 of  
sometime in 2006 to 7.2.


What I believe I did from this point on was:

Copy everything from the root partition to mirror/root.
Modify /etc/fstab to mount root on mirror/root.
Reboot.

Now the original root partition isn't mounted anymore, so we can do  
operate on it's geom stuff.


gmirror insert root da0p2

That should be it.
If that doesn't work you can always boot off a live file-system CD/DVD  
and perform these actions from there. You won't have man pages in that  
case though, or at least I couldn't find a way to read them off the  
DVD last I tried.


One thing I'd like to warn about at this point:
If you ever upgrade to a kernel with a newer geom metadata version and  
that new kernel crashes, you're left with a system where the new  
kernel can't boot at all while the old kernel can't mount the root  
mirror as it's now of a version it can't handle.
You can however mount a single geom provider of that root file system  
(/dev/da1p2 for example) to try to fix things.
That file-system WILL be dirty, but DON'T run fsck on it or you will  
destroy it's contents. That's what happened to my upgrade above...


Thankfully it was only my root partition with hardly any data on it  
and I did make level 0 dumps before the upgrade, but I needed to  
restore that FS from a fixit shell without man pages. Augh!



many thanks

--
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 928 8233
Fax: +44 (0)117 929 4423
___
freebsd-curr...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org 








Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:760,4a4de90f759155226611503!


___
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


SUCCESS: Re: gmirror per partition

2009-07-03 Thread Anton Shterenlikht
On Fri, Jul 03, 2009 at 01:18:28PM +0200, Alban Hertroys wrote:
 On Jul 3, 2009, at 12:12 PM, Anton Shterenlikht wrote:
 
  now to mirror root partition.
 
  My problem is that root is mounted and cannot (?) be unmounted,  
  unlike /efi,
  on the live system.
 
  # gpart add -b 819234 -s 1048576 -t freebsd-ufs da1
  da1p2 added
  #
 
  # gmirror label -vb round-robin root /dev/da0p2
  gmirror: Can't store metadata on /dev/da0p2: Operation not permitted.
  #
 
  If I create gmirror on da1, the spare disk:
 
  # gmirror label -vb round-robin root /dev/da1p2
  Metadata value stored on /dev/da0p1.
  Done.
  #
 
  so that
 
  # gmirror status
NameStatus  Components
  mirror/efi  COMPLETE  da0p1
da1p1
  mirror/root  COMPLETE  da1p2
 
  #
 
 
  then I still cannot insert da0p2
 
 
  # gmirror insert root da0p2
  gmirror: Cannot access provider da0p2.
  #
 
  So how can I gmirror root partion on a live system?
 
 You're almost there... I did this a while ago, can't remember when,  
 but I just upgraded the system that had this from FreeBSD 6.3 of  
 sometime in 2006 to 7.2.
 
 What I believe I did from this point on was:
 
 Copy everything from the root partition to mirror/root.
 Modify /etc/fstab to mount root on mirror/root.
 Reboot.
 
 Now the original root partition isn't mounted anymore, so we can do  
 operate on it's geom stuff.
 
 gmirror insert root da0p2
 
 That should be it.
 If that doesn't work you can always boot off a live file-system CD/DVD  
 and perform these actions from there. You won't have man pages in that  
 case though, or at least I couldn't find a way to read them off the  
 DVD last I tried.
 
 One thing I'd like to warn about at this point:
 If you ever upgrade to a kernel with a newer geom metadata version and  
 that new kernel crashes, you're left with a system where the new  
 kernel can't boot at all while the old kernel can't mount the root  
 mirror as it's now of a version it can't handle.
 You can however mount a single geom provider of that root file system  
 (/dev/da1p2 for example) to try to fix things.
 That file-system WILL be dirty, but DON'T run fsck on it or you will  
 destroy it's contents. That's what happened to my upgrade above...
 
 Thankfully it was only my root partition with hardly any data on it  
 and I did make level 0 dumps before the upgrade, but I needed to  
 restore that FS from a fixit shell without man pages. Augh!

thank you, that was helpful.

I think I've got it, but it's a bit more complex on ia64
because /boot is a symlink to /efi/boot, which is a separate
partition.

Anyway, I've got:

# gmirror status
   NameStatus  Components
 mirror/efi  COMPLETE  da0p1
   da1p1
mirror/root  COMPLETE  da0p2
   da1p2
mirror/swap  COMPLETE  da0p3
   da1p3
 mirror/var  COMPLETE  da1p4
   da0p4
 mirror/tmp  COMPLETE  da1p5
   da0p5
 mirror/usr  DEGRADED  da1p6
   da0p6 (24%)
# 

I'll try to write up my experience and post later.

thanks again

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 928 8233 
Fax: +44 (0)117 929 4423
___
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: gmirror per partition. Was: Re: gmirror gm0 destroyed on shutdown; GPT corrupt

2009-07-02 Thread Anton Shterenlikht
On Wed, Jul 01, 2009 at 10:00:54PM +0200, Wojciech Puchar wrote:
  It's better to use gmirror per partition.
 
  Like this?
 
  # gmirror label -vb round-robin root /dev/da0p2
  gmirror: Can't store metadata on /dev/da0p2: Operation not permitted.
 isn't that partition accessed by other process or mounted?

should it not be mounted?

Sorry, I was just following the handbook, but I now understand it is
incorrect when it comes to ia64.

many thanks
anton

 ___
 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

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 928 8233 
Fax: +44 (0)117 929 4423
___
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: gmirror per partition. Was: Re: gmirror gm0 destroyed on shutdown; GPT corrupt

2009-07-02 Thread Wojciech Puchar


# gmirror label -vb round-robin root /dev/da0p2
gmirror: Can't store metadata on /dev/da0p2: Operation not permitted.

isn't that partition accessed by other process or mounted?


should it not be mounted?

yes it should not, no matter what architecture.

___
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


gmirror per partition. Was: Re: gmirror gm0 destroyed on shutdown; GPT corrupt

2009-07-01 Thread Anton Shterenlikht
On Thu, Jun 25, 2009 at 09:41:13AM -0700, Marcel Moolenaar wrote:
 
 On Jun 25, 2009, at 4:02 AM, Anton Shterenlikht wrote:
  dev_taste(DEV,mirror/gm0)
  g_part_taste(PART,mirror/gm0)
 
  GEOM: mirror/gm0: the secondary GPT table is corrupt or invalid.
  GEOM: mirror/gm0: using the primary only -- recovery suggested.
  ^^^
 
 You created the mirror after the GPT, which means you destroyed
 the GPT backup header. gmirror uses the last sector on the disk
 for metadata and that by itself is a cause for various problems.
 
 It's better to use gmirror per partition.

Like this?

# gmirror label -vb round-robin root /dev/da0p2
gmirror: Can't store metadata on /dev/da0p2: Operation not permitted.
#

I've read some boot disk gmirror examples, e.g.

http://people.freebsd.org/~rse/mirror

however, all examples I've seen are for i386, talking about MBR, fdisk
and bsdlabel, so these are not directly applicable to ia64.

Application of gvinum for boot disk on ia64 is not clear either.
It seems gvinum section of the handbook, 21.9, is also based on i386.

Please advise

many thanks
anton

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 928 8233 
Fax: +44 (0)117 929 4423
___
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: gmirror per partition. Was: Re: gmirror gm0 destroyed on shutdown; GPT corrupt

2009-07-01 Thread Wojciech Puchar

It's better to use gmirror per partition.


Like this?

# gmirror label -vb round-robin root /dev/da0p2
gmirror: Can't store metadata on /dev/da0p2: Operation not permitted.

isn't that partition accessed by other process or mounted?
___
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: gmirror gm0 destroyed on shutdown; GPT corrupt

2009-06-30 Thread Lorenzo Perone

Hi,


On 28.06.2009, at 10:49, Pawel Jakub Dawidek wrote:


 I for one never put mirror on
already partitioned disk. Although it is sometimes safe to use the  
last

sector.  Gjournal already looks for UFS and if UFS is in place, it
figures out if the last sector is in use - it isn't if partition  
size is

not multiple of UFS block size.




does this actually also mean that gmirror used on a partition
(eg mirroring two partitions of two different disks) is
not recommended and is going to write its metadata always
on the last sector of the disk, instead of the last sector of
the partition?

regards,

Lorenzo

___
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: gmirror gm0 destroyed on shutdown; GPT corrupt

2009-06-29 Thread Anton Shterenlikht
On Thu, Jun 25, 2009 at 09:41:13AM -0700, Marcel Moolenaar wrote:
 
 On Jun 25, 2009, at 4:02 AM, Anton Shterenlikht wrote:
  dev_taste(DEV,mirror/gm0)
  g_part_taste(PART,mirror/gm0)
 
  GEOM: mirror/gm0: the secondary GPT table is corrupt or invalid.
  GEOM: mirror/gm0: using the primary only -- recovery suggested.
  ^^^
 
 You created the mirror after the GPT, which means you destroyed
 the GPT backup header. gmirror uses the last sector on the disk
 for metadata and that by itself is a cause for various problems.

So, gmirror cannot be used on ia64 to mirror the boot disk?

Because on ia64 the last sector always contains secondary GPT.
I take it the RAID1 section, 19.4, in FBSD user manual,
was written with i386 or alpha architecture in mind.

 It's better to use gmirror per partition.

how? Is it in the manual? any link?


  #echo 'geom_mirror_load=YES'  /boot/loader.conf
 
 Is /boot a symlink for /efi/boot?

yes,

lrwxr-xr-x   1 root  wheel 8 Jun 25 10:44 boot - efi/boot


  And when the system is rebooted, there is no /dev/mirror anymore.
 
 You could run into a race condition between GPT and gmirror and
 GPT winning (again the result of gmirror using the last sector
 on a disk for metadata).
 
 Alternatively, make sure gmirror got loaded at boot.

# kldstat
Id Refs AddressSize Name
 13 0xe400 ff9c08   kernel
 21 0xe4ffa000 3c830geom_mirror.ko
#

It's not that I desperately need to mirror a boot disk, it just that
gmirror looked so easy in the manual, I wanted to give it a go.

Perhaps I can just do a block copy to the second disk, say once a day,
and have it as a backup.

Could you also possibly comment on gvinum on ia64?

many thanks
anton

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 928 8233 
Fax: +44 (0)117 929 4423
___
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: gmirror gm0 destroyed on shutdown; GPT corrupt

2009-06-28 Thread Pawel Jakub Dawidek
On Sat, Jun 27, 2009 at 06:20:49PM -0700, Marcel Moolenaar wrote:
 Using the last sector is not only flawed because it creates a race
 condition, it's flawed in the assumption that you can always make
 a geom part of a mirror by storing meta-data on the geom without
 causing corruption. This whole idea of using the last sector was
 so that a fully partitioned disk with data could be turned into a
 mirrored disk. A neat idea, but hardly the basis for a generic
 mirroring implementation when it silently corrupts a disk.

This wasn't the idea:) People started putting gmirror on top of
partitioned disk, because it was easier/simpler/faster than creating
mirror, partitioning and copying the data. I for one never put mirror on
already partitioned disk. Although it is sometimes safe to use the last
sector.  Gjournal already looks for UFS and if UFS is in place, it
figures out if the last sector is in use - it isn't if partition size is
not multiple of UFS block size.

 I think it's better to change gmirror to use the first sector on the
 provider. This never creates a race condition and as such, you don't
 need to invent a priority scheme, that has it's own set of flaws on
 top of it. The only downside is that it's not easy to make a fully
 partitioned and populated disk part of a mirror: one would need to
 move the data forward one sector to free the first sector. This we
 can actually do by inserting a GEOM that does it while I/O is still
 ongoing. The good thing is: we need a class that does exactly this
 for implementing the move verb in gpart.

There were two reasons to use the last sector instead of first:

1. You want to be able to boot from gmirror. If all your data will be
   moved forward your boot sectors and kernel will be harder to find.

2. For recovery reasons you may want to turn off gmirror and still be
   able to access your data.

Note that gmirror can handle the case where disk, slice and partition
share the same last sector - it simply stores provider size in its
metadata, so once it gets disk for tasting it detects its too big and
ignores it, then slice will be given for tasting, but it also has larger
size than expected and will be ignored as well. Finally partition will
be tasted and gmirror configured.

-- 
Pawel Jakub Dawidek   http://www.wheel.pl
p...@freebsd.org   http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!


pgpXtFT4O58hK.pgp
Description: PGP signature


Re: gmirror gm0 destroyed on shutdown; GPT corrupt

2009-06-28 Thread Ivan Voras
2009/6/28 Marcel Moolenaar xcl...@mac.com:

 Using the last sector is not only flawed because it creates a race
 condition, it's flawed in the assumption that you can always make
 a geom part of a mirror by storing meta-data on the geom without
 causing corruption. This whole idea of using the last sector was
 so that a fully partitioned disk with data could be turned into a
 mirrored disk. A neat idea, but hardly the basis for a generic
 mirroring implementation when it silently corrupts a disk.

 I think it's better to change gmirror to use the first sector on the
 provider.

Yes, it would be cleaner to implement but it would also make the
mirrored devices unbootable.

But maybe the class of users needing the functionality is smaller now.

 This never creates a race condition and as such, you don't
 need to invent a priority scheme, that has it's own set of flaws on
 top of it. The only downside is that it's not easy to make a fully
 partitioned and populated disk part of a mirror: one would need to
 move the data forward one sector to free the first sector. This we
 can actually do by inserting a GEOM that does it while I/O is still
 ongoing. The good thing is: we need a class that does exactly this
 for implementing the move verb in gpart.

Looks too complicated and fragile. Maybe there's a need for
metadata-less automatic mirrors in some way, by storing the
configuration somewhere else, possibly in /etc.
___
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: gmirror gm0 destroyed on shutdown; GPT corrupt

2009-06-28 Thread Aisaka Taiga

Ivan Voras wrote:

Yes, it would be cleaner to implement but it would also make the
mirrored devices unbootable.
But maybe the class of users needing the functionality is smaller now.
  
Most dedicated server providers can't afford to use hardware RAID 
systems because that would drastically increase the price of a single 
system; yet many customers want mirroring.

Looks too complicated and fragile. Maybe there's a need for
metadata-less automatic mirrors in some way, by storing the
configuration somewhere else, possibly in /etc.
This might be dangerous in some cases. Imagine booting with two drives 
swapped; such a configuration might lead to data corruption on a volume 
which was enumerated incorrectly or swapped.


--
Kamigishi Rei
KREI-RIPE
___
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: gmirror gm0 destroyed on shutdown; GPT corrupt

2009-06-27 Thread Marcel Moolenaar


On Jun 27, 2009, at 4:15 AM, Ivan Voras wrote:


Marcel Moolenaar wrote:

On Jun 25, 2009, at 4:02 AM, Anton Shterenlikht wrote:

dev_taste(DEV,mirror/gm0)
g_part_taste(PART,mirror/gm0)

GEOM: mirror/gm0: the secondary GPT table is corrupt or invalid.
GEOM: mirror/gm0: using the primary only -- recovery suggested.
^^^

You created the mirror after the GPT, which means you destroyed
the GPT backup header. gmirror uses the last sector on the disk
for metadata and that by itself is a cause for various problems.
It's better to use gmirror per partition.


Or create the GPT partition inside the gmirror device - then the GPT  
backup table will be at last_sector-1, but...



You could run into a race condition between GPT and gmirror and
GPT winning (again the result of gmirror using the last sector
on a disk for metadata).


unfortunately this could still happen, and will lead to the same  
error if GPT is tasted first, since it is embedded in the first  
sector and will assume the whole drive is available to GPT, and will  
then proceed to not find its backup data in the last sector.


It looks to me like GEOM classes should have a priority field for  
tasting. Any objections to that idea?


Using the last sector is not only flawed because it creates a race
condition, it's flawed in the assumption that you can always make
a geom part of a mirror by storing meta-data on the geom without
causing corruption. This whole idea of using the last sector was
so that a fully partitioned disk with data could be turned into a
mirrored disk. A neat idea, but hardly the basis for a generic
mirroring implementation when it silently corrupts a disk.

I think it's better to change gmirror to use the first sector on the
provider. This never creates a race condition and as such, you don't
need to invent a priority scheme, that has it's own set of flaws on
top of it. The only downside is that it's not easy to make a fully
partitioned and populated disk part of a mirror: one would need to
move the data forward one sector to free the first sector. This we
can actually do by inserting a GEOM that does it while I/O is still
ongoing. The good thing is: we need a class that does exactly this
for implementing the move verb in gpart.

In other words: Solving the problem that putting the metadata in the
first sector creates, can and will be re-used in implementing the
gpart move partition feature. I doubt anyone will complain that
the creation of a mirror brings with it a few hours of disk activity
that does not inhibit normal operation...

--
Marcel Moolenaar
xcl...@mac.com



___
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: gmirror gm0 destroyed on shutdown; GPT corrupt

2009-06-25 Thread Marcel Moolenaar


On Jun 25, 2009, at 4:02 AM, Anton Shterenlikht wrote:

dev_taste(DEV,mirror/gm0)
g_part_taste(PART,mirror/gm0)

GEOM: mirror/gm0: the secondary GPT table is corrupt or invalid.
GEOM: mirror/gm0: using the primary only -- recovery suggested.
^^^


You created the mirror after the GPT, which means you destroyed
the GPT backup header. gmirror uses the last sector on the disk
for metadata and that by itself is a cause for various problems.

It's better to use gmirror per partition.



#echo 'geom_mirror_load=YES'  /boot/loader.conf


Is /boot a symlink for /efi/boot?


GEOM_MIRROR: Device gm0 destroyed.
^


This is normal.



And when the system is rebooted, there is no /dev/mirror anymore.


You could run into a race condition between GPT and gmirror and
GPT winning (again the result of gmirror using the last sector
on a disk for metadata).

Alternatively, make sure gmirror got loaded at boot.

FYI,

--
Marcel Moolenaar
xcl...@mac.com



___
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: gmirror THEN geli, correct?

2009-04-06 Thread Oliver Fromme
Modulok modu...@gmail.com wrote:
  I'm looking for a confirmation on the order:  When setting up a (root
  partiton) gmirror+geli, what is the propper order? e.g: gmirror the
  disks and THEN initialize geli on the /dev/mirror partitions? Is this
  correct?

You can also do it the other way round.  Both ways are
possible and have different advantages and disadvantages.

I think most people install gmirror first and put geli
on top of it.  The advantage of this is that it's more
efficient, because data passes through geli only once
for encryption when writing to the mirror.

If you install geli first on both disks and then put
gmirror on top of both geli instances, all data has to
be encrypted twice when writing to the disk (for reading
it doesn't make a difference), so it is less efficient.
However, this setup has the advantage that gmirror will
correctly detach one drive when its geli instance detects
data corruption (if integrity verification is enabled).

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH  Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

If you aim the gun at your foot and pull the trigger, it's
UNIX's job to ensure reliable delivery of the bullet to
where you aimed the gun (in this case, Mr. Foot).
-- Terry Lambert, FreeBSD-hackers mailing list.
___
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: gmirror THEN geli, correct?

2009-04-06 Thread Wojciech Puchar

Modulok modu...@gmail.com wrote:
 I'm looking for a confirmation on the order:  When setting up a (root
 partiton) gmirror+geli, what is the propper order? e.g: gmirror the
 disks and THEN initialize geli on the /dev/mirror partitions? Is this


yes it is right order.

with geli then gmirror - you will end with double CPU load on writes (as 
data would be encrypted twice)

___
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: gmirror THEN geli, correct?

2009-04-06 Thread Oliver Fromme
Wojciech Puchar wrote:
   Modulok modu...@gmail.com wrote:
I'm looking for a confirmation on the order:  When setting up a (root
partiton) gmirror+geli, what is the propper order? e.g: gmirror the
disks and THEN initialize geli on the /dev/mirror partitions? Is this
  
  yes it is right order.

No, there is no right or wrong order.  It depends on
what features of gmirror and geli you want to exploit.
See my more detailed explanation in this thread.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH  Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

Unix gives you just enough rope to hang yourself --
and then a couple of more feet, just to be sure.
-- Eric Allman
___
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: gmirror THEN geli, correct?

2009-04-05 Thread Roland Smith
On Sun, Apr 05, 2009 at 12:58:46PM -0600, Modulok wrote:
 List,
 
 I'm looking for a confirmation on the order:  When setting up a (root
 partiton) gmirror+geli, what is the propper order? e.g: gmirror the
 disks and THEN initialize geli on the /dev/mirror partitions? Is this
 correct?

That works. I tried it. 

But it felt slow. So I dropped the mirroring, and used
rsync running from a cron job at night to keep the primary and secondary
disks (with encrypted partitions) in sync. 

This has a downside that my backup can be up to 24 hours out of date,
but as a plus it provides me with an up to 24 hour window to recover
accidentally deleted files. from the second disk. :-) It's a good
tradeoff, IMO.

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpwx1Yz5Vosr.pgp
Description: PGP signature


Re: gmirror 6.2 - 7.1

2009-04-01 Thread Wojciech Puchar



Hello everyone,

Do you think the following way to upgrade gmirror 6.2 - 7.1 is safe for the 
average person?


yes



1. Backup
2. Remove one of the two SCSI HDDs from the gmirror
3. Install 7.1 on the removed HDD
4. Instruct the boot loader to boot from the 7.1 HDD
5. Reboot
6. Copy data
7. Clean the 6.2 HDD
8. Apply gmirror on 7.1 and add the former 6.2 HDD

Thank you,
Iv
___
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


___
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: gmirror 6.2 - 7.1

2009-04-01 Thread Anton Yuzhaninov
On Wed, 1 Apr 2009 10:11:56 +0200, Iv Ray wrote:
IR Do you think the following way to upgrade gmirror 6.2 - 7.1 is safe  
IR for the average person?
IR 
IR (The server is in a remote data center without physical console access.)

gmirror created on freebsd 6 works fine on freebsd 7

1. Backup (it may be useful even without any upgrade).
2. Upgrade as usually.

-- 
 Anton Yuzhaninov

___
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: gmirror keeps breaking

2009-02-21 Thread Wojciech Puchar

Is gmirror known to break on power failure - i.e., one of the drives
(the same drive every time) becomes unsynchronized, needing a rebuild?


if you turned autosync off - yes

turn it on or do gmirror rebuild


___
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



___
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: gmirror and the UFS file systems

2008-11-28 Thread Mel
On Friday 28 November 2008 18:08:19 Andrew Falanga wrote:

 I'm getting ready to move forward on enabling gmirror on my churches
 website server (FreeBSD 7.0-RELEASE p4).  I used defaults during the
 install (most importantly for this, the file system defaults).  I've read
 in the manual pages that the data for the mirror is contained in the last
 sector of the drive/partitions.  So, I want to mirror the entire drive
 (ad4) to the second drive (ad5).  This server doesn't yet have much data at
 all.  I'm wondering if I turn on this mirror, will anything important be
 overwritten in the last sector?

I've converted UFS filesystems with just the base install and a few ports over 
to gmirror many times and no problem.

I guess the question can best be paraphrased as:
If I cross a street in a residential area at 4am in the morning, will I get 
hit by a car?

Also, gmirror create will tell you if the last sector contains data, just like 
a driver would honk his horn.

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gmirror and the UFS file systems

2008-11-28 Thread Wojciech Puchar

I'm getting ready to move forward on enabling gmirror on my churches website
server (FreeBSD 7.0-RELEASE p4).  I used defaults during the install (most
importantly for this, the file system defaults).  I've read in the manual
pages that the data for the mirror is contained in the last sector of the
drive/partitions.  So, I want to mirror the entire drive (ad4) to the second
drive (ad5).  This server doesn't yet have much data at all.  I'm wondering
if I turn on this mirror, will anything important be overwritten in the last
sector?

is your partition size multiply of fragment size without remainder?

if not (quite a big chance) at least one sector at the end is unused and 
never be.

so go on, but then fix disklabel, as c partition is 1 sector smaller.

of course - boot from livecd to do this.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Re: gmirror and the UFS file systems

2008-11-28 Thread af300wsm

is your partition size multiply of fragment size without remainder?



if not (quite a big chance) at least one sector at the end is unused and  

never be.


so go on, but then fix disklabel, as c partition is 1 sector smaller.



of course - boot from livecd to do this.



Thanks both Mel and Wojciech for the advice.

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


Re: gmirror + gjournal setup question

2008-11-06 Thread Volodymyr Kostyrko

Gabriel Lavoie wrote:

Hello,
 I would like to know what is the best way to setup gmirror + gjournal,
on a slice level on two hard drives. Do I set up a mirrored journal
partition + mirrored journalized slice (gmirror on top of gjournal) on which
I create my labels with bsdlabels (will create /dev/mirror/name.journal,
/dev/mirror/name.journala, /dev/mirror/name.journalb). Or I setup a
journalized slice on both hard drive and then I mirror /dev/ad0s1.journal
and /dev/ad1s1.journal (gjournal on top of gmirror)? I have hard time to
figure out what would be the best, if I want to avoid mirror rebuild on
power failure and I want fast fsck. I'd also like to make this setup on my
1st slice (which contains the root filesystem).


man gjournal:
...
 When gjournal is configured on top of gmirror(8) or graid3(8) 
providers,
 it also keeps them in a consistent state, thus automatic 
synchronization

 on power failure or system crash may be disabled on those providers.
...

I think journaling a mirrored partition can be much better.

--
Sphinx of black quartz judge my vow.

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


Re: gmirror + gjournal setup question

2008-11-06 Thread Gabriel Lavoie
Thanks for your reply. I finally understood that with the power failure
tests I made.

Gabriel

2008/11/6 Volodymyr Kostyrko [EMAIL PROTECTED]

 Gabriel Lavoie wrote:

 Hello,
 I would like to know what is the best way to setup gmirror + gjournal,
 on a slice level on two hard drives. Do I set up a mirrored journal
 partition + mirrored journalized slice (gmirror on top of gjournal) on
 which
 I create my labels with bsdlabels (will create /dev/mirror/name.journal,
 /dev/mirror/name.journala, /dev/mirror/name.journalb). Or I setup a
 journalized slice on both hard drive and then I mirror /dev/ad0s1.journal
 and /dev/ad1s1.journal (gjournal on top of gmirror)? I have hard time to
 figure out what would be the best, if I want to avoid mirror rebuild on
 power failure and I want fast fsck. I'd also like to make this setup on my
 1st slice (which contains the root filesystem).


 man gjournal:
 ...
 When gjournal is configured on top of gmirror(8) or graid3(8)
 providers,
 it also keeps them in a consistent state, thus automatic
 synchronization
 on power failure or system crash may be disabled on those providers.
 ...

 I think journaling a mirrored partition can be much better.

 --
 Sphinx of black quartz judge my vow.

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




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


Re: gmirror slice insertion, FAILURE - READ_DMA status=51READY, DSC, ERROR

2008-11-01 Thread CyberLeo Kitsana
Thomas Sparrevohn wrote:
 The error occured after I had the disk for a couple of days - WHat puzzled me 
 was that the drive
 did not do it automatically 

Hard disks will not map uncorrectable bad sectors on read automatically,
as it no longer knows what the contents of that sector should be. In
this instance, the sector is usually remapped during a write.

Given the symptoms of the problem described above, it looks like this
uncorrectable sector is located in a portion of the disk that isn't
touched by FreeBSD's newfs or installation procedure, and would never
have a chance to be written to and corrected. Then, when the mirror sync
occurs (which copies every block verbatim, regardless of whether it's in
use or not) it's choking on that sector and locking up the disk, thus
freezing the OS.

One thing to try prior to RMAing the disk is to fill the entire disk
with zeroes (dd if=/dev/zero of=/dev/ad6 bs=131072 or similar) to give
its firmware a chance to remap all flakey sectors, and rewrite all ECC
information. I do this with every new or freshly acquired disk that's
guaranteed to be empty, to ensure that no surprise errors bite me later
on, as well as to make sure no previous data hangs around.

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
[EMAIL PROTECTED]

Furry Peace! - http://.fur.com/peace/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gmirror slice insertion, FAILURE - READ_DMA status=51READY, DSC, ERROR

2008-10-31 Thread Thomas Sparrevohn
On Wednesday 29 October 2008 10:04:39 Jeremy Chadwick wrote:
 On Wed, Oct 29, 2008 at 02:00:21AM -0700, Carl wrote:
  Jeremy Chadwick wrote:
  Seagate chooses to encode some raw data for some SMART attributes in a
  custom format.  The format is not publicly documented.  This is why you
  have to go off of the adjusted values shown in VALUE/WORST/THRESH.
  How am I supposed to know all of this?!  You aren't -- it comes with
  experience.
 
  And yet my failing drive's VALUE numbers are still all above their  
  THRESH values, despite it being bad enough to cripple the system. One  
  might argue those threshold values leave something to be desired.
 
 I'd urge you to file complaint(s) with drive manufacturers, as they're
 the ones who decide the values.  Thresholds are not defined per the
 ATA-ATAPI specification, so technically they can pick whatever value
 they want.  This is exactly why you'll encounter people screaming SMART
 is worthless, the drive is already dead by the time the overall SMART
 health check fails!
 
 If you go this route, please CC me, as I'd be quite to see what
 manufacturers have to say.
 

Just a saw note - I saw the same problem with a hitachi disk - I ran a vendor 
diagnostics tool
that I found on their home page and it rebuild the bad sector map and the 
problem went away 

The error occured after I had the disk for a couple of days - WHat puzzled me 
was that the drive
did not do it automatically 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gmirror + subset of partitions gjournal'd, autosync setting?

2008-10-30 Thread Carl

Carl wrote:
I've built a GEOM mirror on a single slice of a single disk and am about 
to insert the second disk. Of the partitions in the mirror, I made only 
a few of them gjournal'd. I've seen it recommended that one disable 
autosynchronization for the mirror if using journaled filesystems.


1. Is that recommendation a must or a nice-to-have? What are the actual 
consequences of not taking that advice?


2. In a case like mine, the non-journaled partitions need 
autosychronization enabled to benefit from being mirrored, right?


3. Exactly how would I disable autosynchronization for the journaled 
partitions in the mirror, but not for the rest?


Can no one help me with this question?

Carl / K0802647

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


Re: gmirror + subset of partitions gjournal'd, autosync setting?

2008-10-30 Thread Jeremy Chadwick
On Wed, Oct 29, 2008 at 11:04:37PM -0700, Carl wrote:
 Carl wrote:
 I've built a GEOM mirror on a single slice of a single disk and am 
 about to insert the second disk. Of the partitions in the mirror, I 
 made only a few of them gjournal'd. I've seen it recommended that one 
 disable autosynchronization for the mirror if using journaled 
 filesystems.

 1. Is that recommendation a must or a nice-to-have? What are the actual 
 consequences of not taking that advice?

 2. In a case like mine, the non-journaled partitions need  
 autosychronization enabled to benefit from being mirrored, right?

 3. Exactly how would I disable autosynchronization for the journaled  
 partitions in the mirror, but not for the rest?

 Can no one help me with this question?

Are you aware of the freebsd-fs list?  freebsd-questions is mainly for
generic How do I use ls(1)? questions.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: gmirror slice insertion, FAILURE - READ_DMA status=51READY, DSC, ERROR

2008-10-29 Thread Carl

Jeremy Chadwick wrote:

Seagate chooses to encode some raw data for some SMART attributes in a
custom format.  The format is not publicly documented.  This is why you
have to go off of the adjusted values shown in VALUE/WORST/THRESH.
How am I supposed to know all of this?!  You aren't -- it comes with
experience.


And yet my failing drive's VALUE numbers are still all above their 
THRESH values, despite it being bad enough to cripple the system. One 
might argue those threshold values leave something to be desired.


Is there anything I should know about this model of hard disk with  
regards to being known for problems? Also, is there a good test I can  
perform to hopefully flush out any problems before I put this thing into  
service?


I'm confused: what gives you the impression there's a problem with
*this model* of hard disk?  I've seen no evidence presented that
indicates such.  What makes you ask that question?


I don't have such an impression, thus far. In fact, Seagate drives have 
always been good to me prior to this. It's only a precautionary question 
because it's better to ask now than after I've committed a lot of real 
data and time to it and put it all into service.



Let's take a look at the SMART data.


# smartctl -a /dev/ad4

ID# ATTRIBUTE_NAME  FLAG VALUE WORST THRESH TYPE UPDATED  
WHEN_FAILED   RAW_VALUE

...

198 Offline_Uncorrectable   0x0010   100   100   000Old_age  Offline
-   0

...


To get an update on Attribute 198, you'd need to run a short offline
test (smartctl -t short /dev/ad4).  You can safely do this while
the disk is in use; don't let the word offline make you think the
disk disappears.  You can watch the status using smartctl -a, and
once its finished, you can compare the old value to the new.  I'm
willing to bet it remains zero.


I ran that test on both drives. ad6 failed immediately at 90% with a 
read failure - not surprising. ad4 completed without error and no 
change in it's values, just as you predicted.



# smartctl -a /dev/ad6

ID# ATTRIBUTE_NAME  FLAG VALUE WORST THRESH TYPE UPDATED  
WHEN_FAILED   RAW_VALUE

...

  5 Reallocated_Sector_Ct   0x0033   100   100   036Pre-fail Always 
-   2

...

 10 Spin_Retry_Count0x0013   100   100   097Pre-fail Always 
-   1

...

187 Reported_Uncorrect  0x0032   098   098   000Old_age  Always 
-   2

...

197 Current_Pending_Sector  0x0012   100   100   000Old_age  Always 
-   2
198 Offline_Uncorrectable   0x0010   100   100   000Old_age  Offline
-   2

...


And here we see the core of the problem.  :-)



Advice is simple: replace this hard disk.



Hope this helps.


It definitely did, Jeremy. Your explanations were most helpful. Thanks!

Carl / K0802647

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


Re: gmirror slice insertion, FAILURE - READ_DMA status=51READY, DSC, ERROR

2008-10-29 Thread Jeremy Chadwick
On Wed, Oct 29, 2008 at 02:00:21AM -0700, Carl wrote:
 Jeremy Chadwick wrote:
 Seagate chooses to encode some raw data for some SMART attributes in a
 custom format.  The format is not publicly documented.  This is why you
 have to go off of the adjusted values shown in VALUE/WORST/THRESH.
 How am I supposed to know all of this?!  You aren't -- it comes with
 experience.

 And yet my failing drive's VALUE numbers are still all above their  
 THRESH values, despite it being bad enough to cripple the system. One  
 might argue those threshold values leave something to be desired.

I'd urge you to file complaint(s) with drive manufacturers, as they're
the ones who decide the values.  Thresholds are not defined per the
ATA-ATAPI specification, so technically they can pick whatever value
they want.  This is exactly why you'll encounter people screaming SMART
is worthless, the drive is already dead by the time the overall SMART
health check fails!

If you go this route, please CC me, as I'd be quite to see what
manufacturers have to say.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: gmirror slice insertion, FAILURE - READ_DMA status=51READY, DSC, ERROR

2008-10-29 Thread Jeremy Chadwick
On Tue, Oct 28, 2008 at 08:41:31PM -0700, Carl wrote:
 Jeremy Chadwick said:
 ad6: FAILURE - READ_DMA status=51READY,DSC,ERROR   
 error=40UNCORRECTABLE LBA=134802751

 Are you sure you don't have a bad hard disk?  This looks to be like a
 classic block/sector failure.

 I hadn't realized that a bad block would manifest itself with a message  
 about DMA. Seems like such semantics would be a little obscure to most  
 users, apparently including me.

Do not let the term DMA confuse you -- the operation was a read
operation, and DMA is used to do the transfer of data between
disk/controller/local memory.  You might see things like READ_DMA48
and WRITE_DMA48, which just indicate that 48-bit LBA addressing mode
is in use when attempting the operation.

For sake of comparison, you should see what Linux and Solaris do.  For
example, when a disk falls off the bus (silently) on a Linux machine
using ext3fs, all I've ever seen is continual spewing of ext3fs journal
errors on the console -- absolutely no indication that the disk itself
has actually fallen off the bus.  With SCSI disks under Solaris, the
level of detail you get is perfect -- it's very easy to determine what
happened.  But in the case of ATA disks, you get more or less something
that looks similar to FreeBSD.

If you have complaints about the formatting of the output, I would
recommend filing a PR for it, or bringing it up with Soren Schmidt
([EMAIL PROTECTED]), author of the ata(4) layer.  I will agree with you
that some more coherent error messages would be useful.

 So you're saying that the *exact* same READ_DMA error, at the *exact*
 same LBA, is reported on ad4?  If so, that's very bizarre.

 No, perhaps I wasn't clear enough. Both instances were on ad6, so far.

Then that makes ad6, or something specific to ad6, the culprit.

 Can you please provide the output from the following commands?

 See end of message. Let me know if you then want more (in- or out-of-band).

 Having now installed smartmontools, you can see below that I ran it for  
 both ad4 and ad6. Sure enough, ad6 has logged 2 READ DMA errors - does  
 that make this a definitive bad disk then?

I'll have to look at the output.  See below.

 Should I not be worried about ad4 too? Those Raw_Read_Error_Rate and  
 Seek_Error_Rate numbers should be zero or very close to it, shouldn't  
 they? I don't know how to interpret what I'm seeing in that output, so  
 I'd appreciate any insight. Should I be returning both disks for  
 warranty claims (they're both very recently purchased)?

As you've admitted, the problem is that most people don't know how to
interpret SMART data, and start freaking out over things which are
normal.  People focus on the RAW values, which for many attributes is
the wrong thing to look at.  For example, on Seagate disks, a insanely
high Raw_Read_Error_Rate and Seek_Error_Rate means absolutely nothing;
it's normal.  But with another vendor, it might actually be accurate.
Welcome to one of the problems with SMART: the specification does not
state what format the raw data must be in.

Seagate chooses to encode some raw data for some SMART attributes in a
custom format.  The format is not publicly documented.  This is why you
have to go off of the adjusted values shown in VALUE/WORST/THRESH.
How am I supposed to know all of this?!  You aren't -- it comes with
experience.

 Is there anything I should know about this model of hard disk with  
 regards to being known for problems? Also, is there a good test I can  
 perform to hopefully flush out any problems before I put this thing into  
 service?

I'm confused: what gives you the impression there's a problem with
*this model* of hard disk?  I've seen no evidence presented that
indicates such.  What makes you ask that question?

None of us here work at Seagate, so even if there was a known problem
with this specific model of disk, we wouldn't know.  For all we know,
there could be little 3mm tall terrorists dancing on the platters, ready
to leap out at any moment and stab us!  :-)

Please keep something in mind: just because you have brand new hard
disks *does not* guarantee they're free of errors.  I have seen hundreds
of brand new hard disks fail right out of the box, including SCSI
disks (which people, for some reason, think are less likely to have
this problem simply because they cost more money).  I deal with this
situation on a daily basis at work, believe it or not.

 # vmstat -i

Interrupts look fine; I was looking for anything that might indicate an
absurdly high rate.

atacontrol cap output looks fine too, nothing weird or out of the
ordinary (I wasn't expecting anything to show up here, but I did want to
get an idea if the disks were truly SATA300 or not).

Let's take a look at the SMART data.

 # smartctl -a /dev/ad4

 ID# ATTRIBUTE_NAME  FLAG VALUE WORST THRESH TYPE UPDATED  
 WHEN_FAILED   RAW_VALUE
   1 Raw_Read_Error_Rate 0x000f   117   099   006Pre-fail Always   
   -   

Re: gmirror slice insertion, FAILURE - READ_DMA status=51READY, DSC, ERROR

2008-10-28 Thread Wojciech Puchar
so good. Began Ralf's procedure for inserting ad4s1 into mirror/gm0. The 
synchronization began and reached 6% when this little horror appeared:


ad6: FAILURE - READ_DMA status=51READY,DSC,ERROR error=40UNCORRECTABLE 
LBA=134802751
GEOM_MIRROR: Request failed (error=5). ad6s1[READ(offset=69018976256, 
length=131072)]
GEOM_MIRROR: Synchronization request failed (error=5). 
mirror/gm0[READ(offset=69018976256, length=131072)]




your disk failed. (uncorrectable error)

assuming you eliminated other causes like drives overheating, cabling 
problem (don't think so) etc.:



boot from some kind of live CD, then make another mirror (single disk now) 
on other drive, then do


dd if=/dev/ad6s1 of=/dev/mirror/newmirror bs=2k conv=noerror,sync

i intentionally did bs=2k instead of larger, to minimize amount of lost 
data.


then change your system to boot from newmirror, take out /dev/ad6 and have 
it replaced on warranty (or buy new), put new ad6, insert it to the 
mirror.

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


Re: gmirror slice insertion, FAILURE - READ_DMA status=51READY, DSC, ERROR

2008-10-28 Thread Wojciech Puchar

error=40UNCORRECTABLE LBA=134802751


Are you sure you don't have a bad hard disk?  This looks to be like a
classic block/sector failure.  This does not appear to be the infamous
famous DMA timeout problem, especially if this is the only error
you're getting.


he can temporarity boot with hw.ata.ata_dma=0

but i think his drive failed.




I reinstalled FB7 to ad4, redid the /boot.config modification to make
ad6/gm0 bootable again and retried the insertion of ad4 into gm0. Exact
same error messages at exactly the same point with same consequences.



so IT IS FAILED drive!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gmirror slice insertion, FAILURE - READ_DMA status=51READY, DSC, ERROR

2008-10-28 Thread Jeremy Chadwick
On Tue, Oct 28, 2008 at 12:04:49PM +0100, Wojciech Puchar wrote:
 error=40UNCORRECTABLE LBA=134802751

 Are you sure you don't have a bad hard disk?  This looks to be like a
 classic block/sector failure.  This does not appear to be the infamous
 famous DMA timeout problem, especially if this is the only error
 you're getting.

 he can temporarity boot with hw.ata.ata_dma=0

They're SATA disks, so this won't do anything sadly.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: gmirror slice insertion, FAILURE - READ_DMA status=51READY, DSC, ERROR

2008-10-28 Thread Carl

Jeremy Chadwick said:
ad6: FAILURE - READ_DMA status=51READY,DSC,ERROR  
error=40UNCORRECTABLE LBA=134802751


Are you sure you don't have a bad hard disk?  This looks to be like a
classic block/sector failure.


I hadn't realized that a bad block would manifest itself with a message 
about DMA. Seems like such semantics would be a little obscure to most 
users, apparently including me.



So you're saying that the *exact* same READ_DMA error, at the *exact*
same LBA, is reported on ad4?  If so, that's very bizarre.


No, perhaps I wasn't clear enough. Both instances were on ad6, so far.


Can you please provide the output from the following commands?


See end of message. Let me know if you then want more (in- or out-of-band).

Having now installed smartmontools, you can see below that I ran it for 
both ad4 and ad6. Sure enough, ad6 has logged 2 READ DMA errors - does 
that make this a definitive bad disk then?


Should I not be worried about ad4 too? Those Raw_Read_Error_Rate and 
Seek_Error_Rate numbers should be zero or very close to it, shouldn't 
they? I don't know how to interpret what I'm seeing in that output, so 
I'd appreciate any insight. Should I be returning both disks for 
warranty claims (they're both very recently purchased)?


Wojciech Puchar said:
boot from some kind of live CD, then make another mirror (single disk now) 
on other drive, then do


dd if=/dev/ad6s1 of=/dev/mirror/newmirror bs=2k conv=noerror,sync

i intentionally did bs=2k instead of larger, to minimize amount of lost 
data.


then change your system to boot from newmirror, take out /dev/ad6 and have 
it replaced on warranty (or buy new), put new ad6, insert it to the 
mirror.


I think you're describing a method to help me save as much data from ad6 
as possible. Fortunately, this is all about constructing a new system, 
so there's no data yet to lose.


Is there anything I should know about this model of hard disk with 
regards to being known for problems? Also, is there a good test I can 
perform to hopefully flush out any problems before I put this thing into 
service?


Carl / K0802647

 Additional Information 

# vmstat -i
interrupt  total   rate
irq1: atkbd0   4  0
irq4: sio0125724 16
irq19: uhci3   5  0
irq21: uhci1+ 478364 63
irq23: uhci2 ehci1 1  0
cpu0: timer 14517071   1923
irq256: em0   109568 14
cpu1: timer 14514956   1922
Total   29745693   3940

# atacontrol list | grep -v no device present
ATA channel 0:
ATA channel 1:
ATA channel 2:
Master:  ad4 ST31000340AS/SD15 Serial ATA II
ATA channel 3:
Master:  ad6 ST31000340AS/SD15 Serial ATA II
ATA channel 4:
Master: acd0 HL-DT-ST DVDRAM GH20NS10/EL00 Serial ATA v1.0
ATA channel 5:
ATA channel 6:
ATA channel 7:

# atacontrol cap ad4

Protocol  Serial ATA II
device model  ST31000340AS
serial number xxxH
firmware revision SD15
cylinders 16383
heads 16
sectors/track 63
lba supported 268435455 sectors
lba48 supported   1953525168 sectors
dma supported
overlap not supported

Feature  Support  EnableValue   Vendor
write cacheyes  yes
read ahead yes  yes
Native Command Queuing (NCQ)   yes   -  31/0x1F
Tagged Command Queuing (TCQ)   no   no  31/0x1F
SMART  yes  yes
microcode download yes  yes
security   yes  no
power management   yes  yes
advanced power management  no   no  65278/0xFEFE
automatic acoustic management  no   no  0/0x00  254/0xFE

# atacontrol cap ad6

Protocol  Serial ATA II
device model  ST31000340AS
serial number xxxA
firmware revision SD15
cylinders 16383
heads 16
sectors/track 63
lba supported 268435455 sectors
lba48 supported   1953525168 sectors
dma supported
overlap not supported

Feature  Support  EnableValue   Vendor
write cacheyes  yes
read ahead yes  yes
Native Command Queuing (NCQ)   yes   -  31/0x1F
Tagged Command Queuing (TCQ)   no   no  31/0x1F
SMART  yes  yes
microcode download yes  yes
security   yes  no
power management   yes  yes
advanced power management  no   no  65278/0xFEFE
automatic acoustic management  no   no  0/0x00  254/0xFE

# smartctl -a /dev/ad4
smartctl version 5.38 [i386-portbld-freebsd7.0] Copyright (C) 2002-8 

Re: gmirror slice insertion, FAILURE - READ_DMA status=51READY, DSC, ERROR

2008-10-27 Thread Jeremy Chadwick
On Mon, Oct 27, 2008 at 06:56:24PM -0700, Carl Voth wrote:
 I'm setting up a dual-disk server and am trying to bring it up with  
 gmirror and gjournal. One slice per disk, the goal being to create a  
 single mirror from said slices with some of the partitions journaled.  
 Installed FreeBSD-7.0RELEASE to ad4, then used technique from here to  
 create single-disk mirror/gm0 on ad6:

   http://people.freebsd.org/~rse/mirror/

 Modified ad4s1a /boot.config to pass control to boot stage 3 on ad6. So  
 far, so good. Began Ralf's procedure for inserting ad4s1 into  
 mirror/gm0. The synchronization began and reached 6% when this little  
 horror appeared:

 ad6: FAILURE - READ_DMA status=51READY,DSC,ERROR  
 error=40UNCORRECTABLE LBA=134802751

Are you sure you don't have a bad hard disk?  This looks to be like a
classic block/sector failure.  This does not appear to be the infamous
famous DMA timeout problem, especially if this is the only error
you're getting.

 I reinstalled FB7 to ad4, redid the /boot.config modification to make  
 ad6/gm0 bootable again and retried the insertion of ad4 into gm0. Exact  
 same error messages at exactly the same point with same consequences.  

So you're saying that the *exact* same READ_DMA error, at the *exact*
same LBA, is reported on ad4?  If so, that's very bizarre.

 Now, I see that other folks are having unexplained DMA problems too,  
 albeit in different contexts. What should I be concluding here? Those  
 other folks don't seem to be concluding it's bad drives. If there were  
 bad sectors, I'd get different error messages, yes?

The error=40UNCORRECTABLE part of what you're seeing seems to imply
there's an uncorrectable read transaction that's happened.  What other
people see are DMA timeouts, but no actual sign of uncorrectable errors.

The problem with the DMA timeout issue is that it manifests itself in
hundreds of different ways.  Each case so far has to be handled on an
individual basis.

 FWIW, I'm using gjournal on 3 partitions in mirror/gm0.

 Here's my server's parts list:
 - Seagate ST31000340AS Barracuda 7200.11, 1TB, SATA (x2).

Can you please provide the output from the following commands?

dmesg
vmstat -i
atacontrol list
atacontrol cap ad4
atacontrol cap ad6
smartctl -a /dev/ad4
smartctl -a /dev/ad6

Thanks.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

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


Re: gmirror prerequisite question SOLVED

2008-10-06 Thread Dino Vliet
 I've bought a secondary HDD to attach to my server running freebsd 7.0.
 I want to enable gmirror on it (will reinstall everything from scratch),

you don't have to.

but I want to know if my hardware is setup correctly as a prerequisite for 
doing this operation.

 The command

 dmesg | grep Seagate

 Yields:

 ad4: 76319MB Seagate ST380815AS 3.AAC at ata2-master UDMA33
 ad6: 76319MB Seagate ST380815AS 3.AAC at ata3-master UDMA33

yes it is.
 
*
Thanks for all your help! I managed to install it on my working system and it 
was a fairly simple procedure. Now I need to restructure my system because I've 
installed it as a desktop system, but want to use the system more like a server 
(database  ruby  weka ). So I will need to deinstall all installed packages 
like KDE4.1, Xorg, Firefox etc etc.
Will still need to figure that out (assuming a pkg_delete -a is what I need)
Brgds
Dino



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


Re: gmirror prerequisite question

2008-10-05 Thread Edwin Groothuis
Today I mirrored my new harddisk with the instructions at
http://www.freebsddiary.org/gmirror.php

Right now I'm synchronized up to 65% :-)

Edwin

-- 
Edwin Groothuis Website: http://www.mavetju.org/
[EMAIL PROTECTED]   Weblog:  http://www.mavetju.org/weblog/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gmirror prerequisite question

2008-10-04 Thread Manolis Kiagias

Dino Vliet wrote:

Hey freebsd list,

I've bought a secondry HDD to attach to my server running freebsd 7.0. I want 
to enable gmirror on it (will reinstall everything from scratch), but I want to 
know if my hardware is setup correctly as a prerequisite for doing this 
operation.

The command 

dmesg | grep Seagate 


Yields:

ad4: 76319MB Seagate ST380815AS 3.AAC at ata2-master UDMA33
ad6: 76319MB Seagate ST380815AS 3.AAC at ata3-master UDMA33

Can I assume everything is ok now and can I start the reinstallation? Why I'm 
in doubt is because of the master/slave thing I was expecting but that seems 
something of the IDE world as I have bought two Sata hard drives and connected 
it with sata cables to my motherboard.

But just checking to be sure.

Brgds and thanks in advanced!
Dino

  


The concept of master / slave only exists in the IDE (PATA) world. SATA 
disks do not have these troubles, as there is only one per cable.
Your setup is absolutely fine. If you haven't  already, I suggest you 
read this excellent article:


http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html?page=1

I've set up quite a few gmirrors with this info.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gmirror prerequisite question

2008-10-04 Thread Wojciech Puchar

I've bought a secondry HDD to attach to my server running freebsd 7.0.
I want to enable gmirror on it (will reinstall everything from scratch),


you don't have to.


but I want to know if my hardware is setup correctly as a prerequisite for 
doing this operation.

The command

dmesg | grep Seagate

Yields:

ad4: 76319MB Seagate ST380815AS 3.AAC at ata2-master UDMA33
ad6: 76319MB Seagate ST380815AS 3.AAC at ata3-master UDMA33

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


Re: gmirror metadata: end of slice or end of disk?

2008-06-27 Thread Rudy

Mark Boolootian wrote:

Hi folks,

I'm trying to understand exactly where on disk gmirror is going to write
its metadata,



It just tosses the info in the end of your disk/slice/partition -- I think  ;)

In your example, you had a da1d... you could do partition level mirroring instead of whole disk 
level if you want.  While a machine was running ... and you had data on da1d, run

 gmirror label -v -b round-robin gm0d /dev/da1d
 gmirror instert gm0d da0d  (asusming your da0 is what you are mirroring to)
and you would have a 'parition level' gmirror...

You may need to umount the partition... not sure.  Oh, there is the secret
sysctl kern.geom.debugflags=16
command as well.  Explained in the reference I always use when using gmirror:
 http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html

Rudy


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


Re: gmirror and resizing partitions..

2008-06-10 Thread Wojciech Puchar


more exact info please.

gmirror status
mount or cat /etc/fstab




now much better - i know that you mirrored whole drives and then 
partitioned.



are whole mirror labeled? if yes - what partition you have to trim down?

if now - where are place (give me bsdlabel gm0s1 output)


as you have 2 drives it's quite easy:

it would be like that:

gmirror remove gm0 ad6
gmirror forget ad6
gmirror clear /dev/ad6
gmirror label -b round-robin -s 1048576 m0 /dev/ad6
   
that's options i use, use what you think it's good for you.

now - you have 2 degraded mirrors. old - gm0, new - m0

now partition m0 as you like.

then - get the system down to single user, unmount everything except /, 
make / read-only


then:

with partition that are same sized use dd if=/dev/oldpartition 
of=/dev/newpartition bs=1m


others - use newfs and tar|tar to copy files

after all done, mount new root partition somewhere read write, and fix 
etc/fstab


at the end - don't forget to bsdlabel -B

then reboot from ad6.

after successful boot:

gmirror stop gm0
gmirror clear ad4
gmirror insert m0 ad4

to get all new things mirrored.


PS. my advice. make one big partition+swap instead of so many. you won't 
have such problems again






NameStatus  Components
mirror/gm0  COMPLETE  ad4
ad6


# DeviceMountpoint  FStype  Options DumpPass#
/dev/mirror/gm0s1b  noneswapsw  0   0
/dev/mirror/gm0s1a  /   ufs rw  1   1
/dev/mirror/gm0s1h  /exportsufs rw  2   2
/dev/mirror/gm0s1g  /home   ufs rw  2   2
/dev/mirror/gm0s1d  /usrufs rw  2   2
/dev/mirror/gm0s1e  /usr/local  ufs rw  2   2
/dev/mirror/gm0s1f  /varufs rw  2   2
/dev/acd0   /cdrom  cd9660  ro,noauto   0   0

#/dev/da0s1 /mnt/root   ufs ro  0 0
#/dev/da0s1bnoneswapsw  0 0

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


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


Re: gmirror and resizing partitions..

2008-06-09 Thread Reid Linnemann
Written by B. Cook on 06/09/08 10:23
 Hello all,
 
 I have a FreeBSD 7 machine that I am running gmirror on (ad4 and ad6).
 
 there is an /exports and /home that need to be resized.
 
 (right now they each are about 55G and /home needed to have been 100G
 and exports 10G)
 
 what do I need to do to fix this.
 
 I am assuming break the mirror, fdisk the /exports and /home then remake
 them, and then rebuild the mirror..
 
 right?
 
 What do I need to do with as little impact on the running server as
 possible.. as many services are already configured on this box and it's
 running :P
 
 (of course.. )
 
 Thanks in advance,
 
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]

What I would do is break the mirror, then resize the partitions and
newfs them on one disk. Then dump|restore the data from the other disk
to your new partitions, and recreate the mirror with the newly resized
disk and insert the other disk into that mirror. That disk should then
rebuild with the new partitioning.

Of course, you can only do this while the mirror is unused. So you're
going to have to have some degree of downtime on those filesystems. You
can minimize the downtime by killing the mirror and remounting the
filesystems direct from one disk while you work on repartitioning the
other. You may want to mount read-only, however, as the dump|restore may
take a significant amount of time and you wouldn't want to lose any data
that may be written to the other disk while you're busy copying from it.
When you've built the new mirror with the repartitioned disk and
dump|restored to it (don't forget the -L option on dump), remount the
partitions from the new mirror and then insert the second disk.

That's what I'd do, anyhow.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gmirror and resizing partitions..

2008-06-09 Thread Wojciech Puchar


there is an /exports and /home that need to be resized.

(right now they each are about 55G and /home needed to have been 100G and 
exports 10G)


more exact info please.

gmirror status
mount or cat /etc/fstab


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


Re: gmirror and resizing partitions..

2008-06-09 Thread B. Cook


On Jun 9, 2008, at 12:12 PM, Wojciech Puchar wrote:



there is an /exports and /home that need to be resized.

(right now they each are about 55G and /home needed to have been  
100G and exports 10G)


more exact info please.

gmirror status
mount or cat /etc/fstab





  NameStatus  Components
mirror/gm0  COMPLETE  ad4
  ad6


# DeviceMountpoint  FStype  Options DumpPass#
/dev/mirror/gm0s1b  noneswapsw  0   0
/dev/mirror/gm0s1a  /   ufs rw  1   1
/dev/mirror/gm0s1h  /exportsufs rw  2   2
/dev/mirror/gm0s1g  /home   ufs rw  2   2
/dev/mirror/gm0s1d  /usrufs rw  2   2
/dev/mirror/gm0s1e  /usr/local  ufs rw  2   2
/dev/mirror/gm0s1f  /varufs rw  2   2
/dev/acd0   /cdrom  cd9660  ro,noauto   0   0

#/dev/da0s1 /mnt/root   ufs ro  0 0
#/dev/da0s1bnoneswapsw  0 0

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


Re: gmirror, geli, gjournal performance

2008-04-21 Thread Wojciech Puchar


I was replacing a disk in a gmirror+geli pair and decided to compare
the performance of gmirror+geli+gjournal before adding the new disk.



too much mixer in one to give exact answer.


gmirror - no slowdown, faster reads when at least 2 concurrent, near 0 CPU 
load

geli - high CPU load, performance depends mostly on CPU
gjournal - extra overhead on writes, no difference on reads.


When using these three together is the appropriate order to 1) fdisk
and label 2) mirror the disk, 3) geli the partitions, and 4) use the
geli partitions for gjournal label?


right.


With respect to performance, I find the writes to the gjournal disk
about half as fast, which I expected from the benchmarks I've seen.


which - with geli, means twice CPU load.

do you really need gjournal.


However, reading a single file is identical between the two:

   dd if=/sofupdates/1.mpg of=/dev/null bs=1m
   994049168 bytes transferred in 34.858793 secs (28516454 bytes/sec)

   dd if=/gjournal/1.mpg of=/dev/null bs=1m
   994049168 bytes transferred in 34.335267 secs (28951258 bytes/sec)

Is this expected? I was under the impression that reads should be
somewhat faster with gjournal.


wrong impression. reads are the same.

it's best to make sure your hardware and kernel config are OK and system 
doesn't crash every day, and don't use gjournal.


fsck isn't that long, is used only after crash, it's not worth extra 
overhead under NORMAL operation.


with geli - divide your system to partitions the way that not secret data 
are not geli encrypted.


for sure your /usr may be unencrypted, just move /usr/local/etc to 
somewhere out of /usr



geli is very good but needs lots of CPU power.

on my core 2 duo system i was able to get total of 100MB/s (concurrent 
from many disks) with geli, at that point both cores was fully used.

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


Re: gmirror, geli, gjournal performance

2008-04-19 Thread Ivan Voras

hideo wrote:

Hi everyone,

I was replacing a disk in a gmirror+geli pair and decided to compare
the performance of gmirror+geli+gjournal before adding the new disk.

When using these three together is the appropriate order to 1) fdisk
and label 2) mirror the disk, 3) geli the partitions, and 4) use the
geli partitions for gjournal label?


It depends on what you want to do. To minimize administration overhead 
I'd modify the sequence like this: gmirror the drives, geli the entire 
gmirror, then fdisk it, then add gjournal, use UFS labels. Of course, 
you can never boot from such a thing.



With respect to performance, I find the writes to the gjournal disk
about half as fast, which I expected from the benchmarks I've seen.
However, reading a single file is identical between the two:

dd if=/sofupdates/1.mpg of=/dev/null bs=1m
994049168 bytes transferred in 34.858793 secs (28516454 bytes/sec)

dd if=/gjournal/1.mpg of=/dev/null bs=1m
994049168 bytes transferred in 34.335267 secs (28951258 bytes/sec)

Is this expected? I was under the impression that reads should be
somewhat faster with gjournal.  Is geli decryption the limiting
factor here?


No, performance with gjournal can at most be as fast as without gjournal 
(in reality it will always be infinitesimally slower since there's 
another layer in GEOM added).




signature.asc
Description: OpenPGP digital signature


Re: gmirror disk fail questions...

2008-04-18 Thread Christopher Cowart
Gary Newcombe wrote:
[...]
 # gmirror status
 
 [mesh:/var/log]# gmirror status
   NameStatus  Components
 mirror/gm0  DEGRADED  ad4
 
 
 looking in /dev/ however, we have
 
 crw-r-  1 root  operator0,  83 17 Apr 13:58 ad4
 crw-r-  1 root  operator0,  91 17 Apr 13:58 ad4s1
 crw-r-  1 root  operator0,  84 17 Apr 13:58 ad6
 crw-r-  1 root  operator0,  92 17 Apr 13:58 ad6a
 crw-r-  1 root  operator0,  99 17 Apr 13:58 ad6as1
 crw-r-  1 root  operator0,  93 17 Apr 13:58 ad6b
 crw-r-  1 root  operator0,  94 17 Apr 13:58 ad6c
 crw-r-  1 root  operator0, 100 17 Apr 13:58 ad6cs1
 crw-r-  1 root  operator0,  95 17 Apr 13:58 ad6d
 crw-r-  1 root  operator0,  96 17 Apr 13:58 ad6e
 crw-r-  1 root  operator0,  97 17 Apr 13:58 ad6f
 crw-r-  1 root  operator0,  98 17 Apr 13:58 ad6s1
 crw-r-  1 root  operator0, 101 17 Apr 13:58 ad6s1a
 crw-r-  1 root  operator0, 102 17 Apr 13:58 ad6s1b
 crw-r-  1 root  operator0, 103 17 Apr 13:58 ad6s1c
 crw-r-  1 root  operator0, 104 17 Apr 13:58 ad6s1d
 crw-r-  1 root  operator0, 105 17 Apr 13:58 ad6s1e
 crw-r-  1 root  operator0, 106 17 Apr 13:58 ad6s1f
 
 I am guessing that a failing disk is responsible for the data
 corruption, but I have no errors in /var/log/messages or console.log.
 On every boot, the mirror is marked clean ad there's no warnings about
 a disk failing anywhere? Where should I be looking for or what should I
 be doing to get any warnings?
 
 Also, how-come if ad4 is the working disk, ad4's slices seem to be
 labelled as ad6. What's going on here? To me, ad6 appears to have
 correct labelling for the mirror from ad6s1a-f

I believe the kernel hides individual labels for a gmirror volume. The
labels on ad4 should be visible in /dev/mirror/. Because gmirror really
just mirrors the data block by block (with a little bit of meta data at
the very end of the drive), once the drive is no longer a member of an
array, the kernel treats it as an individual drive and allows visibility
of all the labels.

 How can I test for sure whether the disk is damaged or dying, or
 whether this is just a temporary glitch in the mirror? This is the
 first time I've had a gmirror raid give me problems.

The first time a drive gets kicked out, I typically try to re-insert it.
We have monitoring, so we receive notifications if it fails again. After
that, I get the vendor to replace it. 

 Assuming ad6 has been deactivated/disconnected, I was thinking of
 trying:
 
 gmirror activate gm0 ad6
 gmirror rebuild gm0 ad6
 
 Is this safe?

You have to kick ad6 out and re-insert it:
# gmirror forget
# gmirror insert gm0 /dev/ad6

After doing that, I would watch closely for a while in case your drive
is actually failing. I've written a small nagios check for gmirror; let
me know if you'd like me to send it (it could easily be adapted to a
cron job). You can also get `gmirror status' output in your dailies by
adding daily_status_gmirror_enable=YES to /etc/periodic.conf.

But, given it's timing out on boot, I would personally bag the drive and
replace it. You'll still need to run the same 2 commands above.

-- 
Chris Cowart
Network Technical Lead
Network  Infrastructure Services, RSSP-IT
UC Berkeley


pgp8qKDBrFFs1.pgp
Description: PGP signature


Re: gmirror disk fail questions...

2008-04-18 Thread Gary Newcombe
On Fri, 18 Apr 2008 10:40:04 -0700, Christopher Cowart
[EMAIL PROTECTED] wrote:

 Gary Newcombe wrote:
 [...]
  # gmirror status
  
  [mesh:/var/log]# gmirror status
NameStatus  Components
  mirror/gm0  DEGRADED  ad4
  
  
  looking in /dev/ however, we have
  
  crw-r-  1 root  operator0,  83 17 Apr 13:58 ad4
  crw-r-  1 root  operator0,  91 17 Apr 13:58 ad4s1
  crw-r-  1 root  operator0,  84 17 Apr 13:58 ad6
  crw-r-  1 root  operator0,  92 17 Apr 13:58 ad6a
  crw-r-  1 root  operator0,  99 17 Apr 13:58 ad6as1
  crw-r-  1 root  operator0,  93 17 Apr 13:58 ad6b
  crw-r-  1 root  operator0,  94 17 Apr 13:58 ad6c
  crw-r-  1 root  operator0, 100 17 Apr 13:58 ad6cs1
  crw-r-  1 root  operator0,  95 17 Apr 13:58 ad6d
  crw-r-  1 root  operator0,  96 17 Apr 13:58 ad6e
  crw-r-  1 root  operator0,  97 17 Apr 13:58 ad6f
  crw-r-  1 root  operator0,  98 17 Apr 13:58 ad6s1
  crw-r-  1 root  operator0, 101 17 Apr 13:58 ad6s1a
  crw-r-  1 root  operator0, 102 17 Apr 13:58 ad6s1b
  crw-r-  1 root  operator0, 103 17 Apr 13:58 ad6s1c
  crw-r-  1 root  operator0, 104 17 Apr 13:58 ad6s1d
  crw-r-  1 root  operator0, 105 17 Apr 13:58 ad6s1e
  crw-r-  1 root  operator0, 106 17 Apr 13:58 ad6s1f
  
  I am guessing that a failing disk is responsible for the data
  corruption, but I have no errors in /var/log/messages or console.log.
  On every boot, the mirror is marked clean ad there's no warnings about
  a disk failing anywhere? Where should I be looking for or what should I
  be doing to get any warnings?
  
  Also, how-come if ad4 is the working disk, ad4's slices seem to be
  labelled as ad6. What's going on here? To me, ad6 appears to have
  correct labelling for the mirror from ad6s1a-f
 
 I believe the kernel hides individual labels for a gmirror volume. The
 labels on ad4 should be visible in /dev/mirror/. Because gmirror really
 just mirrors the data block by block (with a little bit of meta data at
 the very end of the drive), once the drive is no longer a member of an
 array, the kernel treats it as an individual drive and allows visibility
 of all the labels.

OK, so not to worry about the slices.

 
  How can I test for sure whether the disk is damaged or dying, or
  whether this is just a temporary glitch in the mirror? This is the
  first time I've had a gmirror raid give me problems.
 
 The first time a drive gets kicked out, I typically try to re-insert it.
 We have monitoring, so we receive notifications if it fails again. After
 that, I get the vendor to replace it. 
 
  Assuming ad6 has been deactivated/disconnected, I was thinking of
  trying:
  
  gmirror activate gm0 ad6
  gmirror rebuild gm0 ad6
  
  Is this safe?
 
 You have to kick ad6 out and re-insert it:
 # gmirror forget
 # gmirror insert gm0 /dev/ad6
 
 After doing that, I would watch closely for a while in case your drive
 is actually failing. I've written a small nagios check for gmirror; let
 me know if you'd like me to send it (it could easily be adapted to a
 cron job). You can also get `gmirror status' output in your dailies by
 adding daily_status_gmirror_enable=YES to /etc/periodic.conf.

I've since added the gmirror entry to periodic.conf, but your script
sounds ideal. I would like that, thanks. I would much rather get some
warning about this happening as it does appear to have caused some data
corruption.

 
 But, given it's timing out on boot, I would personally bag the drive and
 replace it. You'll still need to run the same 2 commands above.

[mesh:/dev/mirror]# gmirror forget
Missing device(s).

[mesh:/dev/mirror]# gmirror status
  NameStatus  Components
mirror/gm0  DEGRADED  ad4

[mesh:/dev/mirror]# gmirror insert gm0 /dev/ad6
Not all disks connected.

Looks like it is new disk time then after all.
Thanks for your advice.

Gary

 
 -- 
 Chris Cowart
 Network Technical Lead
 Network  Infrastructure Services, RSSP-IT
 UC Berkeley
 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gmirror + glabel + gjournal and 7.0 installation

2008-02-29 Thread Ivan Voras
HN wrote:

 Not entirely clear in my mind how to do this. I've got:
 
   http://people.freebsd.org/~rse/mirror/
 
 for the mirroring, but don't have a grasp of how glabel and gjournal
 fit into this.
 
 Can I do this with sysinstall (should I ?) and what order should I be
 adding things in ? Can I switch the journalling on and off after it's
 been set up ? Any thing I should look out for ?

Sysinstall can't do that. You could do the install manually from the
fixit command line environment (meaning: set up the devices, RAID, boot
loader, base system, etc.), or maybe semi-manually, by specifying file
systems and devices you created to sysinstall and then letting
sysinstall proceed, but I think this would be *more* error prone than not.

Once you have a system running on a single drive, it's almost trivial to
mirror it. I'd recommend you don't use gjournal for all file systems but
only for some, like /home, /srv or /usr/local. This way, you can install
a normal system, boot into the newly installed system, set up gjournal
and file systems on gjournaled devices, and then mirror the whole thing
to another drive as usual.

I'd recommend you use UFS labels with glabels, in which case it's also
almost trivial - add -L mylabel argument to the newfs command line.
You could run into a problem here - mirrored drives will have mirrored
labels and I don't know if it would be possible to choose or distinguish
between the labels on the original drives, the labels on the gmirror
device and the labels on the gjournaled device. If you get this kind of
problems, ask on freebsd-geom@ mailing list for further directions.





signature.asc
Description: OpenPGP digital signature


Re: gmirror on slice

2008-02-24 Thread Bogdan Ćulibrk

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Daniel Gerzo wrote:
| Hello people,
|
|  I'm trying to set up a gmirror on two slices, but I am stuck
|  somewhere. I am unable to find out what is wrong. Here's what I have
|  done so far:
|
|  I have 2 disks in the box. I have created 2 slices on both of them
|  (ad{4,6}s1 and ad{4,6}s2) through sysinstall. (btw,
|  http://www.freebsd.org/cgi/query-pr.cgi?pr=72895cat= is really
|  annoying, lucky I had a remote console :-))
|
|  Now I want to initialize gmirror on slice 1:
|
| ha-db1# gmirror label -v -b round-robin gm0 /dev/ad4s1
| gmirror: Can't store metadata on /dev/ad4s1: Operation not permitted.
| ha-db1# sysctl kern.geom.debugflags=16
| kern.geom.debugflags: 0 - 16
| ha-db1# gmirror label -v -b round-robin gm0 /dev/ad4s1
| gmirror: Can't store metadata on /dev/ad4s1: Operation not permitted.
|
| for additional information, I am including the following:
|
| ha-db1# fdisk -vp ad4
| # /dev/ad4
| g c1453521 h16 s63
| p 1 0xa5 63 72340632
| a 1
| p 2 0xa5 72340695 1392803370
|
| ha-db1# disklabel /dev/ad4s1
| # /dev/ad4s1:
| 8 partitions:
| #size   offsetfstype   [fsize bsize bps/cpg]
|   a:  104857604.2BSD 2048 16384 8
|   b: 25165824  1048576  swap
|   c: 723406320unused0 0 # raw part,
don't edit
|   d: 25165824 262144004.2BSD 2048 16384 28528
|   e: 20960408 513802244.2BSD 2048 16384 28528
|
|
|  Any ideas will be much appreciated.
|


Hi there,

sysinstall is piece of crap when it comes to gmirror'ing slices.
I recall that I had numerous problems with it and that I couldn't find
any solution nor workaround but doing slicing by hand.
Have serial console handy if you don't have physical access to the system.

I hope this 2857574857th whine about bugs in sysinstall will reach to
someone capable of fixing it.



- --
Best regards,
Bogdan Culibrk
[EMAIL PROTECTED] http://default.co.yu/~bc
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkfBgl0ACgkQo6C4vAhYtCATQQCfbHB8pp29ExUSPLlrEjz/5HSE
H2cAn2YgErKzd4reBOcFGQZaDdZUsOEB
=Ui3B
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gmirror on slice

2008-02-23 Thread Wojciech Puchar

Now I want to initialize gmirror on slice 1:

ha-db1# gmirror label -v -b round-robin gm0 /dev/ad4s1
gmirror: Can't store metadata on /dev/ad4s1: Operation not permitted.
ha-db1# sysctl kern.geom.debugflags=16


you try to make a mirror on used slice or some partition of that


kern.geom.debugflags: 0 - 16
ha-db1# gmirror label -v -b round-robin gm0 /dev/ad4s1
gmirror: Can't store metadata on /dev/ad4s1: Operation not permitted.

for additional information, I am including the following:

ha-db1# fdisk -vp ad4
# /dev/ad4
g c1453521 h16 s63
p 1 0xa5 63 72340632
a 1
p 2 0xa5 72340695 1392803370

ha-db1# disklabel /dev/ad4s1
# /dev/ad4s1:
8 partitions:
#size   offsetfstype   [fsize bsize bps/cpg]
 a:  104857604.2BSD 2048 16384 8
 b: 25165824  1048576  swap
 c: 723406320unused0 0 # raw part, don't edit
 d: 25165824 262144004.2BSD 2048 16384 28528
 e: 20960408 513802244.2BSD 2048 16384 28528


Any ideas will be much appreciated.

--
Best regards,
Daniel  mailto:[EMAIL PROTECTED]

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



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


Re: gmirror challenge

2008-01-21 Thread Jason Morgan
On Mon, Jan 21, 2008 at 03:41:16PM -0800, Jeff Pflueger wrote:
 I have a server and am using gmirror to mirror two disks.
 
 The intent was to double my security...but my experience has been that
 it has generally doubled the amount of time that the server goes down!
 
 gm0s1 is the name of the mirror. The mirror is Freebsd's boot source.
 ad4s1 is one provider
 ad6s1 is another provider
 
 problems arose after a power outage.
 gmirror would work furiously at rebuilding ad4s1 to no avail and
 eventually I'd get an error like GMIRROR provider gm0s1 destroyed and
 the server would go down. I could reboot and do a little from within the
 system before this would happen again.
 
 So I booted FreeBSD from disk, went into FixIt mode from sysinstall,
 then selected the cd/dvd option and then:
 chroot /dist
 mount_devfs devfs /dev
 kldload geom_mirror
 
 and then gmirror clear ad4s1
 (no problem, that worked) - but, unfortunately I am unable to boot off
 of ad4 when ad6 has its SATA cable unplugged - I think that the drive is
 hosed/corrupted.
 
 but, here's another problem:
 gmirror clear ad6s1 gives me this error:
 Can't clear metadata on ad6s1: Invalid argument. Not fully done.
 
 So without the metadata cleared on ad6s1, I can't boot from it
 and I can't boot from ad4s1 because I suspect that it is hosed...
 
 anybody have any suggestions on how to clear the metadata of ad6s1 so I
 can boot from it without it going into gmirror and being unhappy?
 
 Thanks for any help!
 
 Jeff

Hey Jeff,

Try:

gmirror forget ad6s1

From gmirror(8):

remove  Remove the given component(s) from the mirror and clear meta-
data on it.

and futher on:

One disk failed.  Replace it with a brand new one:

   gmirror forget data
   gmirror insert data da1


I had a drive do something similar --- the system wouldn't crash, but
a drive just refused to be rebuilt. I used `forget' and it worked like
a charm.

~Jason


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


Re: gmirror challenge

2008-01-21 Thread Jason Morgan
On Mon, Jan 21, 2008 at 05:35:46PM -0800, Jeff Pflueger wrote:
 
  Hey Jeff,
 
  Try:
 
  gmirror forget ad6s1
 
  From gmirror(8):
 
  remove  Remove the given component(s) from the mirror and clear meta-
  data on it.
 
  and futher on:
 
  One disk failed.  Replace it with a brand new one:
 
 gmirror forget data
 gmirror insert data da1
 
 
  I had a drive do something similar --- the system wouldn't crash, but
  a drive just refused to be rebuilt. I used `forget' and it worked like
  a charm.
 
  ~Jason

 Thanks for that!
 turns out that if I rebuild a mirror once booted from cd via:
 gmirror label -v -b load gm0s1 /dev/ad4s1
 mount /dev/mirror/gm0s1 /mnt
 
 then I disconnected ad6 and booted from ad4. Once booted, the disk was
 very busy for a long time and now it seems to be working fine.
 
 However, ad6...
 when I have booted from CD I can't gmirror clean ad6 without getting the
 message about
 
 Can't clear metadata on ad6s1: Invalid argument. Not fully done.
 
 I suspect that something is either mechanically wrong (less likely) or 
 somehow corrupted on ad6...
 
 How can I wipe ad6 so that I can now try to insert it into the new mirror?

To completely wipe the drive? Try:

# dd if=/dev/zero of=/dev/ad6 bs=512

That will zero out the *whole* drive, nothing will be left. You will
also need to make sure you do

# gmirror forget ad6

first; otherwise, I think gmirror will expect to find metadata on the
drive. Read the man page carefully to make sure you are taking the
steps in the right order.

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


Re: gmirror

2007-09-27 Thread Brian A. Seklecki
The size colum can be human readable number (ex, 5g) and the offset
can be the name of the previous partition.  For the offset and size of
the first and last partitions respectively use *.  Read the
disklabel(8) man page for more details -- it is actually a real well
written one.

I wouldn't worry about exact replication -- the sector sizes and total
sectors of the logical gmirror volume and the underlying phyiscal disk
will always be different -- that's the nature of LVM.

Just make them relatively close and match up the letters.

~~BAS

On Wed, 2007-06-27 at 14:16 -0400, [EMAIL PROTECTED] wrote:
 Quick question, I am configuring gmirror to mirror certain slices on my
 hard drives.. I want to mirror /dev/ad0s1 (700M) to another drive.. I am
 fine with configuring gmirror and getting it running but I am unsure of
 how I create the BSD slices with bsdlabel -e..
 
 When I do a bsdlabel -e /dev/ad0s1 I get:
 
 # /dev/ad0s1:
 8 partitions:
 #size   offsetfstype   [fsize bsize bps/cpg]
   a:   40960004.2BSD 2048 16384 25608
   c:  14297220unused0 0 # raw part,
 don't edit
   d:  1020122   4096004.2BSD 2048 16384 63760
 
 When I initially create the mirror on the backup disk, I run a bsdlabel -e
 /dev/mirror/gm0s1 and this is what it shows:
 
 # /dev/mirror/gm0s1:
 8 partitions:
 #size   offsetfstype   [fsize bsize bps/cpg]
   a:  1429705   16unused0 0
   c:  14297210unused0 0 # raw part,
 don't edit
 
 My initial instinct was to mirror the bsdlabel output from ad0s1 but with
 just the 16 offset for the 'a' slice coming out with:
 
 # /dev/mirror/gm0s1:
 8 partitions:
 #size   offsetfstype   [fsize bsize bps/cpg]
   a:  409584164.2BSD 2048 16384 25608
   c:  14297210unused0 0 # raw part,
 don't edit
   d:  1020122   4095844.2BSD 2048 16384 63760
 
 Is my assumption correct?  Or am I missing something here?
 
 
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 
 
 
 
 
 

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


Re: gmirror woes

2007-09-12 Thread Wojciech Puchar

  Priority: 0
  Flags: DIRTY
  GenID: 1
  SyncID: 2
  ID: 1129080348

But when I try to run gmirror configure -a mirror/gm0s1, I get:

No such device: mirror/gm0s1.

Can someone give me some pointers here?


gmirror configure -a gm0s1 (no mirror/ here)



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



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


Re: gmirror woes

2007-09-11 Thread Eric Crist

On Sep 11, 2007, at 4:31 PMSep 11, 2007, Brian McCann wrote:


I had a disk die in a gmirror set, and I'm trying to replace it, but
I'm having a heck of a time.   I can see the mirror set in gmirror
list:



[snip]

[PLUG] Take at peek at https://www.secure-computing.net/wiki/ 
index.php/Gmirror [/PLUG]
It's something I wrote up for work, as we use gmirror on many of our  
firewalls, or will be shortly.  If you have questions, please feel  
free to ask!


-
Eric F Crist
Secure Computing Networks


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


Re: gmirror woes

2007-09-11 Thread Norberto Meijome
On Tue, 11 Sep 2007 17:31:34 -0400
Brian McCann [EMAIL PROTECTED] wrote:

 But when I try to run gmirror configure -a mirror/gm0s1, I get:
 
 No such device: mirror/gm0s1.

have u tried with either 
/dev/mirror/gm0s1 

or

gm0s1 ? 

_
{Beto|Norberto|Numard} Meijome

They never open their mouths without subtracting from the sum of human 
knowledge.
  Thomas Brackett Reed

I speak for myself, not my employer. Contents may be hot. Slippery when wet. 
Reading disclaimers makes you go blind. Writing them is worse. You have been 
Warned.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gmirror woes

2007-09-11 Thread Brian McCann
Thanks Eric!

--Brian

On 9/11/07, Eric Crist [EMAIL PROTECTED] wrote:
 On Sep 11, 2007, at 4:31 PMSep 11, 2007, Brian McCann wrote:

  I had a disk die in a gmirror set, and I'm trying to replace it, but
  I'm having a heck of a time.   I can see the mirror set in gmirror
  list:
 

 [snip]

 [PLUG] Take at peek at https://www.secure-computing.net/wiki/
 index.php/Gmirror [/PLUG]
 It's something I wrote up for work, as we use gmirror on many of our
 firewalls, or will be shortly.  If you have questions, please feel
 free to ask!

 -
 Eric F Crist
 Secure Computing Networks


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



-- 
_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_-=-_
Brian McCann
Systems  Network Administrator, K12USA

I don't have to take this abuse from you -- I've got hundreds of
people waiting to abuse me.
-- Bill Murray, Ghostbusters
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gmirror and booting one and/or the other of the twins, then rebuilding raid 1

2007-09-05 Thread Nikos Vassiliadis
On Wednesday 05 September 2007 06:09, John Crawford wrote:
 I'd like to be able to boot either of the
 two drives.

That's up to your BIOS. FreeBSD will mount / from the
gmirror, which will be backed by one or more disks. Earlier
stages will use BIOS to load the kernel, etc.

May I suggest {{{
When I configured gmirror on a server, I felt safer pulling
the plug than disabling it the normal way. That way I could
evaluate that:
1) my BIOS settings are correct regarding booting
from both disks.
2) gmirror is doing what I wanted it to do.
}}}

 I suppose I could use kernel.conf and di ad0 or di ad2
 to suppress drive hardware detection, but I'm hoping to
 do something simple (with a few keystrokes) during
 one of the boot stages to suppress one or another of the
 drive detections. I don't recall how to disable a given
 device during the an interactive boot procedure.

You can detach an ATA channel using atacontrol detach.
Since your disks are on different channels, that's probably
what you asked for. Not all controllers/controller drivers
support this.

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


Re: gmirror woes on 6.2-S, Aug 1

2007-08-16 Thread Pawel Jakub Dawidek
On Wed, Aug 15, 2007 at 02:57:19PM -0700, Kelsey Cummings wrote:
 FreeBSD meno 6.2-STABLE FreeBSD 6.2-STABLE #3: Wed Aug  1
 08:21:29 PDT 2007 root@:/usr/obj/usr/src/sys/SMP  i386
 
 I just swapped a gmirror pair of disks into a new box and have run into a 
 problem that I can't seem to figure out.  Upon boot it reports the
 following and doesn't appear to see ad10, the other disk in the mirror set.
 
 GEOM_MIRROR: Device gm0 created (id=2427626556).
 GEOM_MIRROR: Device gm0: provider ad12 detected.
 GEOM_MIRROR: Force device gm0 start due to timeout.
 GEOM_MIRROR: Device gm0: provider ad12 activated.
 GEOM_MIRROR: Device gm0: provider mirror/gm0 launched.
 
 However, ad10 was seen at boot and is currently attached.
 
 meno# atacontrol list | grep ad
 Master: ad10 WDC WD3000JD-00KLB0/08.05J08 Serial ATA v1.0
 Master: ad12 WDC WD3000JD-00KLB0/08.05J08 Serial ATA v1.0
 
 So:
 
 meno# gmirror forget gm0
 meno# gmirror insert gm0 ad10
 meno# gmirror status
   NameStatus  Components
 mirror/gm0  DEGRADED  ad12
   ad10 (0%)
 ...
 
 Which compelete and everything appears to work fine, until I reboot and
 repeat the cycle.  Has anyone run into anything similar, if so, what is
 the fix?  

Could I add:

kern.geom.mirror.debug=2

to your /boot/loader.conf and reboot? It should print provider it
tastes, this will show us if ad10 is given for tasting at all.

-- 
Pawel Jakub Dawidek   http://www.wheel.pl
[EMAIL PROTECTED]   http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!


pgpsqXgfNvWkl.pgp
Description: PGP signature


Re: gmirror - one provider won't activate

2007-04-20 Thread [EMAIL PROTECTED]

On 19/04/07, Cam Baillie [EMAIL PROTECTED] wrote:


I set up a RAID 1 duplex following the well-laid out OnLamp
article.  I had successfully synchronised both disks prior to
rebooting.  Then I rebooted and the ad3 disk wouldn't activate.

The system boots off of ad0 while slices within ad1 and ad3 are
supposed to serve as the duplex.  The duplex (/dev/mirror/gm0)
mounts successfully to /usr/home so I have access to my data
from ad1.

I am running 6.2-release.  The dmesg and fstab files are attached.


The pertinant lines from dmesg:
ad0: 76319MB Seagate ST380021A 3.10 at ata0-master UDMA100
ad1: 286168MB Seagate ST3300631A 3.04 at ata0-slave UDMA100
acd0: CDRW NEC CD-RW NR-7900A/1.08 at ata1-master UDMA33
ad3: 286168MB Seagate ST3300631A 3.04 at ata1-slave UDMA100
GEOM_MIRROR: Device gm0 created (id=2536797825).
GEOM_MIRROR: Device gm0: provider ad1 detected.
GEOM_MIRROR: Device gm0: provider ad3 detected.
GEOM_MIRROR: Component ad3 (device gm0) broken, skipping.
GEOM_MIRROR: Device gm0: provider ad1 activated.
GEOM_MIRROR: Device gm0: provider mirror/gm0 launched.

Distressingly, from searching google with the line:
GEOM_MIRROR: Component broken, skipping.
I find lots of references to disk failures.  Worse,
there are several unanswered posts with nearly
this very question.
The cause of the error seems to be metadata
corruption, which could be something as innocent
as cosmic rays, or the dying screams of a thoroughly
tormented hard-drive.

One suggestion was to try using something like:
# gmirror forget gm0
# gmirror insert gm0 /dev/ad3
And see if it works better.
I suppose the admonition to backup what data you
can from gm0 is not lost here.  Also, make sure that
all cables are properly seated.

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


Re: gmirror device numbers

2007-04-12 Thread [EMAIL PROTECTED]

On 11/04/07, Toomas Aas [EMAIL PROTECTED] wrote:

Hello!

I have a server with gmirror volumes. Backup of this server is being done
with Amanda, which uses GNU tar and its --listed-incremental option
(snapshot files) in order to do incremental backups.

It seems that gmirror devices get a different 'device number' on each boot
(each time the gmirror is created). Since the device number is stored in
GNU tar's snapshot file, it effectively means that after rebooting GNU tar
sees all files as having been changed since previous backup. This causes
huge incremental backups.

Is there a way to force a gmirror device to have a 'fixed' device number?


Not to sound too thick, but what do you mean
by device number?  Is this the Geom name:
or ID: field when you type:
gmirror list

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


Re: gmirror device numbers

2007-04-12 Thread Toomas Aas

[EMAIL PROTECTED] wrote:


On 11/04/07, Toomas Aas [EMAIL PROTECTED] wrote:


It seems that gmirror devices get a different 'device number' on each 
boot

(each time the gmirror is created). Since the device number is stored in
GNU tar's snapshot file, it effectively means that after rebooting GNU 
tar

sees all files as having been changed since previous backup. This causes
huge incremental backups.

Is there a way to force a gmirror device to have a 'fixed' device number?


Not to sound too thick, but what do you mean
by device number?  Is this the Geom name:
or ID: field when you type:
gmirror list


First, I may have to take back some of what I said. I've rebooted the 
server twice in last two days, and the results are different.


First time, the server actually lost power accidentally (faulty UPS) and 
the gmirror volume was rebuilt. The device numbers had changed after that. 
Second time I rebooted the server myself (gmirror remained healthy), and 
device numbers remained unchanged.


Now to your question. By device number I mean the numbers 81, 83, 84 etc 
as displayed here:


# ls -l /dev/mirror/gm0*
crw-r-  1 root  operator0,  81 Apr 11 18:18 /dev/mirror/gm0
crw-r-  1 root  operator0,  83 Apr 11 18:18 /dev/mirror/gm0s1
crw-r-  1 root  operator0,  84 Apr 11 18:18 /dev/mirror/gm0s1a
crw-r-  1 root  operator0,  85 Apr 11 18:18 /dev/mirror/gm0s1b
crw-r-  1 root  operator0,  86 Apr 11 18:18 /dev/mirror/gm0s1c
crw-r-  1 root  operator0,  87 Apr 11 18:18 /dev/mirror/gm0s1d
crw-r-  1 root  operator0,  88 Apr 11 18:18 /dev/mirror/gm0s1e
crw-r-  1 root  operator0,  89 Apr 11 18:18 /dev/mirror/gm0s1f
crw-r-  1 root  operator0,  90 Apr 11 18:18 /dev/mirror/gm0s1g
crw-r-  1 root  operator0,  91 Apr 11 18:18 /dev/mirror/gm0s1h

When, for example, the / filesystem that resides on /dev/mirror/gm0s1a is 
backed up with GNU tar 1.15.1 and a snapshot file is created (using 
--listed-incremental), the snapshot file contains lines such as:


84 4165 ./etc/bluetooth
84 22 ./root/.cpan/sources/authors/id
84 12486 ./media
84 8323 ./boot
84 169 ./root/.cpan/build/Tree-R-0.05/blib/arch
84 4169 ./etc/mtree

The first number here is device number. If this number changes, GNU tar 
considers all files as having been changed next time it is run, and as a 
result the incremental backup backs up all files.


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


Re: gmirror: degraded, Component ad4 (device gm0) broken, skipping.

2007-02-14 Thread Brian A. Seklecki

gmirror insert gm0 ad4


The big question is:

In your example, ad4 has already been prepped for use in as a component 
in the gmirror by ?


Or will it just overwrite anything on ad4 regardless?

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


Re: gmirror: degraded, Component ad4 (device gm0) broken, skipping.

2007-02-14 Thread John Nielsen
On Wednesday 14 February 2007 15:13, Brian A. Seklecki wrote:
  gmirror insert gm0 ad4

 The big question is:

 In your example, ad4 has already been prepped for use in as a component
 in the gmirror by ?

 Or will it just overwrite anything on ad4 regardless?

No prep is necessary when using raw devices such as ad4. The insert operation 
will overwrite everything (or the first $VOLUME_SIZE blocks) on ad4 with the 
contents of the mirror.

Obviously if you want to use only a portion of a drive as a gmirror consumer 
then the drive should be fdisk'ed and/or bsdlabel'ed and the device name of 
the slice or partition (e.g. ad4a, ad4s1, or ad4s1a depending) should be used 
instead of ad4 as the gmirror consumer.

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


Re: gmirror setup

2007-01-23 Thread James Riendeau
i just set up my first gmirror raid1, and... it was really simple.   
too

simple.  ok... what did i skip or do wrong?, was my first thought.

i follow the doc from onlamp.com:

http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html?page=1

i did have one giant deviation tho, and im wondering if it really  
makes a
difference.  the article depicts creating the gmirror immediately  
following

initial operating system install, but i did my example on a fully
functioning
system.  other than that, i have 2 identical disks, and things seem  
to be

working:

castor# gmirror status
  NameStatus  Components
mirror/gm0  DEGRADED  ad0
  ad1 (33%)

im sure im seeing less than the best performance since im using but  
a single


ide channel, but other than that, is it feasible to insert an  
identical

disk,
and setup the gmirror at anytime a freebsd'er likes?

also, the doc didnt mention it, but if you do use to differing disk  
sizes,
obviously the smaller one should be ad0?  and other than that, is  
there any

difference in setting up gmirror if the second disk is larger?

cheers,
jonathan


The surest way to test your raid is to unplug the IDE cable to one  
drive while the system is running and see if it still works.  Plug it  
back in and rebuild the drive.  Do the same for the other drive.


Setting up gmirror on a new system is straight forward; trying to set  
it up on a system that can't be taken down for a day can be a major  
headache.


I would like to stress that a mirrored RAID setup is no substitute  
for a solid backup plan.  If there is a data error, gmirror will  
faithfully replicate that error on the other drive.  You may not find  
out that a drive has failed until both drives fail especially if  
you're not keeping a close eye on your daily reports, so a backup is  
essential.


James Riendeau
MMI Computer Support Technician
1300 University Ave
Rm. 436, Dept. of MedMicro
Madison, WI  53706



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


Re: gmirror setup

2007-01-22 Thread Jason Morgan
On Mon, Jan 22, 2007 at 10:11:05PM -0600, Jonathan Horne wrote:
 i just set up my first gmirror raid1, and... it was really simple.  too 
 simple.  ok... what did i skip or do wrong?, was my first thought.

I thought the exact same thing. My previous experience was with vinum
and, while it was great 4 years ago (props to grog), the simplicity of
geom for simple setups was greatly needed.

 i follow the doc from onlamp.com:
 
 http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html?page=1
 
 i did have one giant deviation tho, and im wondering if it really makes a 
 difference.  the article depicts creating the gmirror immediately following 
 initial operating system install, but i did my example on a fully functioning 
 system.  other than that, i have 2 identical disks, and things seem to be 
 working:
 
 castor# gmirror status
   NameStatus  Components
 mirror/gm0  DEGRADED  ad0
   ad1 (33%)

 im sure im seeing less than the best performance since im using but a single 
 ide channel, but other than that, is it feasible to insert an identical disk, 
 and setup the gmirror at anytime a freebsd'er likes?

Whether or not this is the *right* way to do it or not, I am not sure,
but I can tell you that this is basically what I did on two servers
about 6 months ago and I've had no problems. I even had a drive
failure. When I plugged the new one in, it rebuilt correctly and has
been running well since.

 also, the doc didnt mention it, but if you do use to differing disk sizes, 
 obviously the smaller one should be ad0?  and other than that, is there any 
 difference in setting up gmirror if the second disk is larger?

Yes, make the first disk the smaller one. I don't believe there is a
difference in setup, but the extra space on the second drive (say,
ad2) will be wasted.

Cheers,

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


Re: gmirror on root filesystem

2007-01-04 Thread Russell E. Meek

Quoting Josh Paetzel [EMAIL PROTECTED]:


I'm trying to use gmirror on my root filesystem.  I've set sysctl
kern.geom.debugflags to 16 and yet can't label the root partition.

# gmirror label -v root /dev/ad4s1a
Can't store metadata on /dev/ad4s1a: Operation not permitted.

I was able to do this for /var and /usr while they were mounted.
Unless someone has any ideas the only solution I see is to put this
disk in a different box to create the mirror.

--
Thanks,

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



Josh,

If using Kernel Secure Levels input the following into rc.conf and reboot.

kern_securelevel_enable=NO

Thanks,

Russell



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


Re: gmirror on root filesystem

2007-01-04 Thread Josh Paetzel
On Thursday 04 January 2007 13:35, Russell E. Meek wrote:
 Quoting Josh Paetzel [EMAIL PROTECTED]:
  I'm trying to use gmirror on my root filesystem.  I've set sysctl
  kern.geom.debugflags to 16 and yet can't label the root
  partition.
 
  # gmirror label -v root /dev/ad4s1a
  Can't store metadata on /dev/ad4s1a: Operation not permitted.
 
  I was able to do this for /var and /usr while they were mounted.
  Unless someone has any ideas the only solution I see is to put
  this disk in a different box to create the mirror.
 
  --
  Thanks,
 
  Josh Paetzel
  ___
  freebsd-questions@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to
  [EMAIL PROTECTED]

 Josh,

 If using Kernel Secure Levels input the following into rc.conf and
 reboot.

 kern_securelevel_enable=NO

 Thanks,

 Russell


Nope, no securelevels set. 

-- 
Thanks,

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


Re: gmirror (was Re: It's time to bite the bullet and do a major upgrade...)

2006-11-15 Thread John Nielsen
On Wednesday 15 November 2006 10:40, Jonathan McKeown wrote:
 On Wednesday 15 November 2006 16:58, John Nielsen wrote:
  It is possible to convert regular devices into gmirror members after
  they have data on them, but unless you're extremely careful there's a
  small risk of the gmirror metadata sector overlapping a data sector.

 OK, I see the warning in the gmirror(8) manpage that gmirror metadata
 overwrites the last sector of the provider.  Is that sector more likely, or
 less likely, to be in use than any other sector on a non-full disk? If it's
 equally or less likely the risk is extremely small - which I know is no
 consolation when it happens!

It's generally significantly less likely to even be available for use due to 
device sizes not dividing evenly into the block sizes used by the filesystem, 
etc.

Depending on what type of device you actually pass to gmirror as a consumer 
(raw disk, slice, or partition), it should be possible to manually ensure 
that there are a couple unused sectors at the end. It just depends on how 
paranoid (or possibly other more reasonable terms) you are.

 In this case, I'm doing something of a ``stunt upgrade'' anyway: I have two
 remote boxes to upgrade to 6.1, one of which is running 5.4-RELEASE and one
 4.8-RELEASE. Both boxes have 80GB drives, and on my last flying visit I
 added to each box a blank 80GB drive and a null-modem serial link to a
 neighbouring ssh-accessible box.

 The plan is to ssh to the neighbour box, establish a serial console on the
 upgrade target, install 6.1 from scratch over the network on the blank
 drive and then make it the only drive in a gmirror. Once that's done, data
 can be migrated from the original drive, which can then be added to the
 mirror.

 I have successfully carried out the procedure on a box in my office (so
 that I could intervene when it all went horribly wrong, several times) and
 am in the process of documenting it: as I said earlier, I couldn't find an
 easy guide to all this anywhere - perhaps not surprising as it's an odd
 thing to want to do.

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


Re: gmirror (was Re: It's time to bite the bullet and do a major upgrade...)

2006-11-15 Thread Jonathan McKeown
On Wednesday 15 November 2006 18:52, John Nielsen wrote:

[risk that last sector of geom(4) provider is already in use]

 It's generally significantly less likely to even be available for use due
 to device sizes not dividing evenly into the block sizes used by the
 filesystem, etc.

 Depending on what type of device you actually pass to gmirror as a consumer
 (raw disk, slice, or partition), it should be possible to manually ensure
 that there are a couple unused sectors at the end. It just depends on how
 paranoid (or possibly other more reasonable terms) you are.

I've always maintained that the correct question to ask a sysadmin is not

Are you paranoid?

but rather

Are you paranoid *enough*?

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


Re: gmirror HD failure detection

2006-09-21 Thread Alex Zbyslaw

Robin Becker wrote:


Dave wrote:


Hi,
   I've got smartd going on a gmirror system, however when smartd 
starts up it says it can't find the various drives. I've tried both 
the autodetection line as well as specifying the individual drives. 
If this does work i'd like to know about it as i believe i might have 
one failing drive, but am not sure which one.

Thanks.
Dave.




well as root I can certainly run smartctl -a /dev/ad4 (or /dev/ad6) so 
I assume smartd could.


I like the idea of using gmirror status -s , but I don't know what the 
results would be if one of the disks were going bad. Would it change 
from COMPLETE to DEGRADED suddenly?


I would expect gmirror to report a problem when a disk gad *gone* bad.  
Going bad from a SMART point of view can mean, for example, too high a 
rate of read retries or too many bad sectors remapped.  At that point 
the drive is technically working, so there is nothing technically wrong 
with the array status.  In such a case SMART would just be telling you 
that the disk is likely to go kablooey soon; time for backups, new drive 
etc. etc.


Something like gmirror status -s you can presumably run even every five 
minutes from cron; if you weed out the good results you'll only get 
email if something does go wrong.


Use both approaches since they tell you different things which just 
happen some of the time to coincide.


--Alex


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


Re: gmirror HD failure detection

2006-09-21 Thread John Nielsen
On Thursday 21 September 2006 06:15, Alex Zbyslaw wrote:
 Robin Becker wrote:
  Dave wrote:
  Hi,
 I've got smartd going on a gmirror system, however when smartd
  starts up it says it can't find the various drives. I've tried both
  the autodetection line as well as specifying the individual drives.
  If this does work i'd like to know about it as i believe i might have
  one failing drive, but am not sure which one.
  Thanks.
  Dave.
 
  well as root I can certainly run smartctl -a /dev/ad4 (or /dev/ad6) so
  I assume smartd could.
 
  I like the idea of using gmirror status -s , but I don't know what the
  results would be if one of the disks were going bad. Would it change
  from COMPLETE to DEGRADED suddenly?

 I would expect gmirror to report a problem when a disk gad *gone* bad.
 Going bad from a SMART point of view can mean, for example, too high a
 rate of read retries or too many bad sectors remapped.  At that point
 the drive is technically working, so there is nothing technically wrong
 with the array status.  In such a case SMART would just be telling you
 that the disk is likely to go kablooey soon; time for backups, new drive
 etc. etc.

 Something like gmirror status -s you can presumably run even every five
 minutes from cron; if you weed out the good results you'll only get
 email if something does go wrong.

 Use both approaches since they tell you different things which just
 happen some of the time to coincide.

If you happen to be one of the smart admins who actually reviews the output of 
the periodic scripts, then simply adding
daily_status_gmirror_enable=YES
to /etc/periodic.conf will give you a daily health check. If you want more 
granularity than a single day, you could use the contents of the periodic 
script as a starting point for rolling your own.

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


Re: gmirror HD failure detection

2006-09-21 Thread Robin Becker

John Nielsen wrote:
..

Use both approaches since they tell you different things which just
happen some of the time to coincide.


If you happen to be one of the smart admins who actually reviews the output of 
the periodic scripts, then simply adding

daily_status_gmirror_enable=YES
to /etc/periodic.conf will give you a daily health check. If you want more 
granularity than a single day, you could use the contents of the periodic 
script as a starting point for rolling your own.


JN



That's good as I actually get all of our servers to email to me. I have 
also done the smartd thing with an email output as well.


Thanks to all for useful input.
--
Robin Becker
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: gmirror HD failure detection

2006-09-20 Thread Bob Johnson

On 9/20/06, Robin Becker [EMAIL PROTECTED] wrote:

After using Dru Lavigne's excellent article http://tinyurl.com/da66a about
Raid-1 I have a full Raid-1 mirror on a new rack server. I'm wondering if
anyone
can tell me how best to monitor the hardware status to detect imminent
failure
of one of the disks? Do I use something like smartctl in a cron or what?


When you installed smartmontools to get smartctl, it should have also
installed smartd. It will run in the background and notify you of
significant changes. man smartd for details.

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


Re: gmirror HD failure detection

2006-09-20 Thread Dave

Hi,
   I've got smartd going on a gmirror system, however when smartd starts up 
it says it can't find the various drives. I've tried both the autodetection 
line as well as specifying the individual drives. If this does work i'd like 
to know about it as i believe i might have one failing drive, but am not 
sure which one.

Thanks.
Dave.

- Original Message - 
From: Bob Johnson [EMAIL PROTECTED]

To: Robin Becker [EMAIL PROTECTED]
Cc: freebsd-questions@freebsd.org
Sent: Wednesday, September 20, 2006 1:02 PM
Subject: Re: gmirror HD failure detection



On 9/20/06, Robin Becker [EMAIL PROTECTED] wrote:
After using Dru Lavigne's excellent article http://tinyurl.com/da66a 
about

Raid-1 I have a full Raid-1 mirror on a new rack server. I'm wondering if
anyone
can tell me how best to monitor the hardware status to detect imminent
failure
of one of the disks? Do I use something like smartctl in a cron or what?


When you installed smartmontools to get smartctl, it should have also
installed smartd. It will run in the background and notify you of
significant changes. man smartd for details.

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


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


Re: gmirror HD failure detection

2006-09-20 Thread Alex Zbyslaw

Robin Becker wrote:

After using Dru Lavigne's excellent article http://tinyurl.com/da66a 
about Raid-1 I have a full Raid-1 mirror on a new rack server. I'm 
wondering if anyone can tell me how best to monitor the hardware 
status to detect imminent failure of one of the disks? Do I use 
something like smartctl in a cron or what?


Assuming that the disks support SMART then just read the man page for 
smartd.  No need for cron.  You can also schedule short and long 
tests to run in off hours.  smartmontools is easy to uninstall if it 
doesn't work for you. 

However, this will tell you that a disk is failing (or failed) which is 
not quite the same as array status.  An array (theoretically)  might be 
sub-optimal for non-SMART reasons.  Someone familiar with gmirror will 
have to answer that bit... but gmirror status -s looks from the man page 
like it might be interesting and *that* could be run from cron and 
parsed to weed out status OK results.


--Alex


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


  1   2   >