Re: Hand on gmirror (Was: Re: gmirror bugs, how many?)

2004-12-08 Thread Pawel Jakub Dawidek
On Wed, Dec 08, 2004 at 02:10:02AM +0200, Alexandr Kovalenko wrote:
+ Hello, Pawel Jakub Dawidek!
+  
+  This is known race, which is already fixed in HEAD. I want to commit it
+  soon.
+ 
+ Any plans on backporting it to RELENG_5 (RELENG_5_3 maybe?)?

I'm going to MFC it probably this weekend to RELENG_5, RELENG_5_3 is
closed for changes like this one.

+ To be on original topic - is there any way to make a mirror from live
+ system? I mean I have running FreeBSD on da0 and I want to make a
+ gmirror on it (I'm planning to add second drive soon). How to avoid
+ those disklabel warnings correctly?

You still need to reboot. The whole instruction you should find in
freebsd-geom@ mailing list archives, I wrote about this few times, AFAIR.

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


pgpHbqJJEZamw.pgp
Description: PGP signature


Re: Hand on gmirror (Was: Re: gmirror bugs, how many?)

2004-12-08 Thread Alexandr Kovalenko
Hello, Pawel Jakub Dawidek!

On Wed, Dec 08, 2004 at 09:53:06AM +0100, you wrote:

 On Wed, Dec 08, 2004 at 02:10:02AM +0200, Alexandr Kovalenko wrote:
 + Hello, Pawel Jakub Dawidek!
 +  
 +  This is known race, which is already fixed in HEAD. I want to commit it
 +  soon.
 + 
 + Any plans on backporting it to RELENG_5 (RELENG_5_3 maybe?)?
 
 I'm going to MFC it probably this weekend to RELENG_5, RELENG_5_3 is
 closed for changes like this one.

Thanks a lot!

 + To be on original topic - is there any way to make a mirror from live
 + system? I mean I have running FreeBSD on da0 and I want to make a
 + gmirror on it (I'm planning to add second drive soon). How to avoid
 + those disklabel warnings correctly?
 
 You still need to reboot. The whole instruction you should find in
 freebsd-geom@ mailing list archives, I wrote about this few times, AFAIR.

Could you please remember subject of that thread?

I was able to make a gmirror on live system using
kern.geom.debugflags=16, but problem with disklabel remains.

-- 
NEVE-RIPE, will build world for food
Ukrainian FreeBSD User Group
http://uafug.org.ua/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hand on gmirror (Was: Re: gmirror bugs, how many?)

2004-12-08 Thread Pawel Jakub Dawidek
On Wed, Dec 08, 2004 at 11:40:44AM +0200, Alexandr Kovalenko wrote:
+  + To be on original topic - is there any way to make a mirror from live
+  + system? I mean I have running FreeBSD on da0 and I want to make a
+  + gmirror on it (I'm planning to add second drive soon). How to avoid
+  + those disklabel warnings correctly?
+  
+  You still need to reboot. The whole instruction you should find in
+  freebsd-geom@ mailing list archives, I wrote about this few times, AFAIR.
+ 
+ Could you please remember subject of that thread?
+ 
+ I was able to make a gmirror on live system using
+ kern.geom.debugflags=16, but problem with disklabel remains.

You cannot do this on live system, because you need to mount root file
system on top of the mirror and remounting root file system is not
possible. You need to create the mirror on 2nd disk first, etc.

Even if you store metadata on disk (with debugflags=16), changes will
not be updated on 2nd disk, because I/O requests go to the disk provider,
not to the mirror provider.

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


pgpCpwiAJCThe.pgp
Description: PGP signature


Re: Hand on gmirror (Was: Re: gmirror bugs, how many?)

2004-12-08 Thread =?ISO-8859-1?Q?Jo=E3o_Carlos_Mendes_Lu=EDs?=

Pawel Jakub Dawidek wrote:
On Wed, Dec 08, 2004 at 02:10:02AM +0200, Alexandr Kovalenko wrote:
+ Hello, Pawel Jakub Dawidek!
+  
+  This is known race, which is already fixed in HEAD. I want to commit it
+  soon.
+ 
+ Any plans on backporting it to RELENG_5 (RELENG_5_3 maybe?)?

I'm going to MFC it probably this weekend to RELENG_5, RELENG_5_3 is
closed for changes like this one.
Thanks!
+ To be on original topic - is there any way to make a mirror from live
+ system? I mean I have running FreeBSD on da0 and I want to make a
+ gmirror on it (I'm planning to add second drive soon). How to avoid
+ those disklabel warnings correctly?
You still need to reboot. The whole instruction you should find in
Oh yes, a reboot is surely needed.  What I wanted to avoid is a full 
disk copy/xfer for the first consumer being created, as we have to do 
with vinum.

freebsd-geom@ mailing list archives, I wrote about this few times, AFAIR.
Maybe a good time for a FAQ or handbook entry...
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hand on gmirror (Was: Re: gmirror bugs, how many?)

2004-12-07 Thread Alexandr Kovalenko
Hello, Pawel Jakub Dawidek!

On Mon, Nov 29, 2004 at 11:59:25PM +0100, you wrote:

 On Mon, Nov 29, 2004 at 07:27:51PM -0200, Jo?o Carlos Mendes Lu?s wrote:
 + I finally got the system to boot with gmirror fully enabled.  But I got 
 + this during boot:
 + 
 + 
 + GEOM_MIRROR: Device vol0 created (id=3592859320).
 + GEOM_MIRROR: Device vol0: provider ad0s1 detected.
 + GEOM_MIRROR: Device vol0: provider ad1s1 detected.
 + GEOM_MIRROR: Device vol0: provider ad1s1 activated.
 + GEOM_MIRROR: Cannot update metadata on disk ad0s1 (error=1).
 + GEOM_MIRROR: Device vol0: provider ad0s1 activated.
 + GEOM_MIRROR: Device vol0: provider mirror/vol0 launched.
 + GEOM_MIRROR: Cannot update metadata on disk ad0s1 (error=1).
 + GEOM_MIRROR: Device vol0: provider ad0s1 disconnected.
 
 This is known race, which is already fixed in HEAD. I want to commit it
 soon.

Any plans on backporting it to RELENG_5 (RELENG_5_3 maybe?)?

To be on original topic - is there any way to make a mirror from live
system? I mean I have running FreeBSD on da0 and I want to make a
gmirror on it (I'm planning to add second drive soon). How to avoid
those disklabel warnings correctly?

-- 
NEVE-RIPE, will build world for food
Ukrainian FreeBSD User Group
http://uafug.org.ua/
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hand on gmirror (Was: Re: gmirror bugs, how many?)

2004-11-29 Thread João Carlos Mendes Luís
Pawel Jakub Dawidek wrote:
Not working 'unload' command is because of bug in GEOM. Now, to avoid
deadlock you get an error (ENXIO), but mirror will be destroyed.
The next 'unload' should be ok. To avoid those errors, you should first
stop all mirrors (unsing 'stop' command) and then unload kernel module.
I thought unload did a stop before.
BTW. There is no 'reload' command.
I know, I meant redoing the load command.
+ Indeed, the -h option is what I wanted and the bug is in the 
+ manual. What would happen if I change the disc ID in this case?

Your disk will not be detected as a mirror component, because hardcoded
name is different.
Oops.  Is there a check for that?  For example, let's say that ad0s1 got 
renamed to ad1s1, and hardcoded a reference to ad0s1.  In this case, 
there is a disk called ad0s1 in the system.  Is gmirror smart enough in 
this case?

+ sigesc::root jcmendes [553] disklabel mirror/vol0
+ # /dev/mirror/vol0:
+ 8 partitions:
+ #size   offsetfstype   [fsize bsize bps/cpg]
+   a: 16498864   16unused0 0
+   c: 164988800unused0 0 # raw part, 
+ don't edit
+ sigesc::root jcmendes [554]
+ 
+   Seems good until now.  Except for the offset 16 of the a partition. 
+  Is this necessary?  The man page says that the only sector reserved 
+ for metadata is the provider's last one.

Ehh, blame disklabel(8). First 16 sectors are reserved for boot code.
And why this does not happen with ad0s1, etc?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hand on gmirror (Was: Re: gmirror bugs, how many?)

2004-11-29 Thread Pawel Jakub Dawidek
On Mon, Nov 29, 2004 at 12:52:40PM -0200, Jo?o Carlos Mendes Lus wrote:
+ + Indeed, the -h option is what I wanted and the bug is in the 
+ + manual. What would happen if I change the disc ID in this case?
+ 
+ Your disk will not be detected as a mirror component, because hardcoded
+ name is different.
+ 
+ Oops.  Is there a check for that?  For example, let's say that ad0s1 got 
+ renamed to ad1s1, and hardcoded a reference to ad0s1.  In this case, 
+ there is a disk called ad0s1 in the system.  Is gmirror smart enough in 
+ this case?

In this case ad1s1 will not be connected to the mirror (but don't worry,
ad0s1 will not be connected as well).

+ + sigesc::root jcmendes [553] disklabel mirror/vol0
+ + # /dev/mirror/vol0:
+ + 8 partitions:
+ + #size   offsetfstype   [fsize bsize bps/cpg]
+ +   a: 16498864   16unused0 0
+ +   c: 164988800unused0 0 # raw part, 
+ + don't edit
+ + sigesc::root jcmendes [554]
+ + 
+ +   Seems good until now.  Except for the offset 16 of the a partition. 
+ +  Is this necessary?  The man page says that the only sector reserved 
+ + for metadata is the provider's last one.
+ 
+ Ehh, blame disklabel(8). First 16 sectors are reserved for boot code.
+ 
+ And why this does not happen with ad0s1, etc?

I think it should, only using sysinstall for this will not allocate those
sectors. Anyway, it has nothing to do with gmirror.

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


pgpcMmdf82g2J.pgp
Description: PGP signature


Re: Hand on gmirror (Was: Re: gmirror bugs, how many?)

2004-11-29 Thread João Carlos Mendes Luís
I finally got the system to boot with gmirror fully enabled.  But I got 
this during boot:

GEOM_MIRROR: Device vol0 created (id=3592859320).
GEOM_MIRROR: Device vol0: provider ad0s1 detected.
GEOM_MIRROR: Device vol0: provider ad1s1 detected.
GEOM_MIRROR: Device vol0: provider ad1s1 activated.
GEOM_MIRROR: Cannot update metadata on disk ad0s1 (error=1).
GEOM_MIRROR: Device vol0: provider ad0s1 activated.
GEOM_MIRROR: Device vol0: provider mirror/vol0 launched.
GEOM_MIRROR: Cannot update metadata on disk ad0s1 (error=1).
GEOM_MIRROR: Device vol0: provider ad0s1 disconnected.
Both slices have been created with a cylinder less than the maximum, to 
avoid having to use hardcoded names.

The last messages before the shutdown -r were:
Nov 29 15:03:56 sigesc kernel: GEOM: Configure ad0s1a, start 0 length 
536870912 end 536870911
Nov 29 15:03:56 sigesc kernel: GEOM: Configure ad0s1b, start 536870912 
length 536870912 end 1073741823
Nov 29 15:03:56 sigesc kernel: GEOM: Configure ad0s1c, start 0 length 
8447394304 end 8447394303
Nov 29 15:03:56 sigesc kernel: GEOM: Configure ad0s1d, start 1073741824 
length 7373652480 end 8447394303
Nov 29 15:04:16 sigesc kernel: GEOM_MIRROR: Device vol0: provider ad0s1 
detected.
Nov 29 15:04:16 sigesc kernel: GEOM_MIRROR: Device vol0: rebuilding 
provider ad0s1.
Nov 29 15:35:19 sigesc kernel: GEOM_MIRROR: Device vol0: rebuilding 
provider ad0s1 finished.
Nov 29 15:35:19 sigesc kernel: GEOM_MIRROR: Device vol0: provider ad0s1 
activated.
Nov 29 15:35:19 sigesc kernel: GEOM: Configure ad0s1a, start 0 length 
536870912 end 536870911
Nov 29 15:35:19 sigesc kernel: GEOM: Configure ad0s1b, start 536870912 
length 536870912 end 1073741823
Nov 29 15:35:19 sigesc kernel: GEOM: Configure ad0s1c, start 0 length 
8447394304 end 8447394303
Nov 29 15:35:19 sigesc kernel: GEOM: Configure ad0s1d, start 1073741824 
length 7373652480 end 8447394303

I thought the syncronization was completed without errors.  What have I 
missed?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Hand on gmirror (Was: Re: gmirror bugs, how many?)

2004-11-29 Thread Pawel Jakub Dawidek
On Mon, Nov 29, 2004 at 07:27:51PM -0200, Jo?o Carlos Mendes Lus wrote:
+ I finally got the system to boot with gmirror fully enabled.  But I got 
+ this during boot:
+ 
+ 
+ GEOM_MIRROR: Device vol0 created (id=3592859320).
+ GEOM_MIRROR: Device vol0: provider ad0s1 detected.
+ GEOM_MIRROR: Device vol0: provider ad1s1 detected.
+ GEOM_MIRROR: Device vol0: provider ad1s1 activated.
+ GEOM_MIRROR: Cannot update metadata on disk ad0s1 (error=1).
+ GEOM_MIRROR: Device vol0: provider ad0s1 activated.
+ GEOM_MIRROR: Device vol0: provider mirror/vol0 launched.
+ GEOM_MIRROR: Cannot update metadata on disk ad0s1 (error=1).
+ GEOM_MIRROR: Device vol0: provider ad0s1 disconnected.

This is known race, which is already fixed in HEAD. I want to commit it
soon.

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


pgpoTcPvSZWCS.pgp
Description: PGP signature


Re: Hand on gmirror (Was: Re: gmirror bugs, how many?)

2004-11-28 Thread Pawel Jakub Dawidek
On Fri, Nov 26, 2004 at 05:55:51PM -0200, Jo?o Carlos Mendes Lus wrote:
+ Pawel Jakub Dawidek wrote:
[...]
+ What error do you get when you try to do this?
+ 
+ Step by step:
+ 
+ - The system has started with a preloaded geom_mirror:
[...]
+ - There is a running mirror partition:
[...]
+ - Now let's try to remove (disable was my intention, a bad idea):
+ 
+ sigesc::root jcmendes [524] gmirror unload
+ Could not unload module: Device not configured.
+ sigesc::root jcmendes [525] gmirror list
+ sigesc::root jcmendes [526] gmirror load
+ Command 'load' not available.
+ sigesc::root jcmendes [527] gmirror list
+ sigesc::root jcmendes [528] kldstat
+ Id Refs AddressSize Name
+  1   13 0xc040 3126c4   kernel
+  21 0xc0713000 10be8geom_mirror.ko
+  3   14 0xc0724000 59340acpi.ko
+  41 0xc106a000 6000 linprocfs.ko
+  51 0xc107 18000linux.ko
+  61 0xc1183000 2000 fade_saver.ko
+ sigesc::root jcmendes [529] ls -l /dev/mirror/
+ total 1
+ dr-xr-xr-x  2 root  wheel  512 Nov 26 12:19 .
+ dr-xr-xr-x  5 root  wheel  512 Nov 26 12:19 ..
+ sigesc::root jcmendes [530]
+ 
+ - Well, something not good happened.  The device did not unload, and do 
+ not list any device anymore.  Trying to reload it has no effect.
+ - This used to work before preloading it in loader.conf, but then I 
+ would not be able to boot a mirror partition.
[...]

Not working 'unload' command is because of bug in GEOM. Now, to avoid
deadlock you get an error (ENXIO), but mirror will be destroyed.
The next 'unload' should be ok. To avoid those errors, you should first
stop all mirrors (unsing 'stop' command) and then unload kernel module.
BTW. There is no 'reload' command.

+ Indeed, the -h option is what I wanted and the bug is in the 
+ manual. What would happen if I change the disc ID in this case?

Your disk will not be detected as a mirror component, because hardcoded
name is different.

+ sigesc::root jcmendes [553] disklabel mirror/vol0
+ # /dev/mirror/vol0:
+ 8 partitions:
+ #size   offsetfstype   [fsize bsize bps/cpg]
+   a: 16498864   16unused0 0
+   c: 164988800unused0 0 # raw part, 
+ don't edit
+ sigesc::root jcmendes [554]
+ 
+   Seems good until now.  Except for the offset 16 of the a partition. 
+  Is this necessary?  The man page says that the only sector reserved 
+ for metadata is the provider's last one.

Ehh, blame disklabel(8). First 16 sectors are reserved for boot code.

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


pgpWBT4JUfk0K.pgp
Description: PGP signature