Frans Haarman | 1 May 2007 14:24
Picon

gmirror magic ?

Can someone explain this to me ? I was testing gmirror/gstripe and
decided to
remove the vnode files stripe0 & stripe1. This resulted in a mirror
which kept on
working.....

 
/dev/mirror/mirro0 on /mnt (ufs, local)

DEVEL# ls /mnt/
.snap   anders  test    testje

DEVEL# ls /data/STRIPING/
create-image-file       mnt                     mnt0
mnt1

DEVEL# mdconfig -l -u md1
md1     vnode     512M  /data/STRIPING/stripe0
DEVEL# mdconfig -l -u md2
md2     vnode     512M  /data/STRIPING/stripe1
DEVEL# mdconfig -l -u md123
md123   vnode     512M  /data/STRIPING/stripe1

DEVEL# gmirror status
         Name    Status  Components
mirror/mirro0  COMPLETE  md2
                         md123

DEVEL# dd if=/dev/zero of=where-does-this-go bs=1m count=512

(Continue reading)

Eric Anderson | 1 May 2007 15:03
Picon
Favicon
Gravatar

Re: gmirror magic ?

On 05/01/07 07:24, Frans Haarman wrote:
> Can someone explain this to me ? I was testing gmirror/gstripe and
> decided to
> remove the vnode files stripe0 & stripe1. This resulted in a mirror
> which kept on
> working.....
>  
>  
> /dev/mirror/mirro0 on /mnt (ufs, local)
>  
> DEVEL# ls /mnt/
> .snap   anders  test    testje
> 
> DEVEL# ls /data/STRIPING/
> create-image-file       mnt                     mnt0
> mnt1
> 
> 
> DEVEL# mdconfig -l -u md1
> md1     vnode     512M  /data/STRIPING/stripe0
> DEVEL# mdconfig -l -u md2
> md2     vnode     512M  /data/STRIPING/stripe1
> DEVEL# mdconfig -l -u md123
> md123   vnode     512M  /data/STRIPING/stripe1

Does that look right to you?  You have 2 md devices using the same file?

> DEVEL# gmirror status
>          Name    Status  Components
> mirror/mirro0  COMPLETE  md2
(Continue reading)

Arne "Wörner" | 1 May 2007 15:18
Picon
Favicon

Re: gmirror magic ?

--- Eric Anderson <anderson <at> freebsd.org> wrote:
> On 05/01/07 07:24, Frans Haarman wrote:
> > Can someone explain this to me ? I was testing gmirror/gstripe and
> > decided to
> > remove the vnode files stripe0 & stripe1. This resulted in a mirror
> > which kept on
> > working.....
> >  
So the files that the md devices r based on r away?
But while md still exists, the inode still exists...
So: In their directory those files r deleted, but in the file system their
inode still exists.

That is why the md devices r still there and why the gmirror can still write to
them...

-Arne

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Frans Haarman | 1 May 2007 15:28
Picon

RE: gmirror magic ?

Excuse my ignorance,

What I tried was removing a file on disk which 
was  attached as a "md vnode". 

I assumed removing the file on disk will "kill" 
the "md vnode" but it does not.

It seems this has nothing todo with gmirror/gstripe
but the way md vnodes work!

Frans Haarman 
De Giessen Automatisering B.V.

Technische Dienst 
Telefoon : (0184) 67 53 75 
Fax : (0184) 61 12 46 
E-mail : servicedesk <at> giessen.nl 
Website : www.giessen.nl 

Algemeen 
Tel : (0184) 67 54 00 

d u i d e l i j k e   t a a l !

-----Oorspronkelijk bericht----- 
Van: Eric Anderson [mailto:anderson <at> freebsd.org] 
Verzonden: dinsdag 1 mei 2007 15:03
Aan: Frans Haarman
CC: freebsd-geom <at> freebsd.org
(Continue reading)

Eric Anderson | 1 May 2007 15:39
Picon
Favicon
Gravatar

Re: gmirror magic ?

On 05/01/07 08:28, Frans Haarman wrote:
> Excuse my ignorance,
> 
> What I tried was removing a file on disk which 
> was  attached as a "md vnode". 
> 
> I assumed removing the file on disk will "kill" 
> the "md vnode" but it does not.
> 
> It seems this has nothing todo with gmirror/gstripe
> but the way md vnodes work!

It's the way all files in UFS work - if it's in use, and it gets 
removed, the directory entry goes away, but the data stays there until 
all references are gone.  Once they are all gone, the data blocks get 
recycled too.

Eric
deniswork | 3 May 2007 19:12
Picon

graid5 compilation problem

Hi, I  want  migrate(after two after-reboot-crashes) from gvinum to
graid5.
I take graid5 from this url:

http://home.tiscali.de/cmdr_faako/geom_raid5.tbz

and trying to compile it using this guide:
http://www.freenas.org/downloads/docs/devel-docs/#d0e689

kernel module compiles OK.
, but i meet troubles when I
trying to compile geom_raid5.c

[root <at> 82 /usr/src/sbin/geom/class/raid5]# cd /usr/src/sbin/geom/class/raid5/
[root <at> 82 /usr/src/sbin/geom/class/raid5]#
[root <at> 82 /usr/src/sbin/geom/class/raid5]# mkdir /usr/include/geom/raid5
[root <at> 82 /usr/src/sbin/geom/class/raid5]#
[root <at> 82 /usr/src/sbin/geom/class/raid5]# cp /usr/src/sys/geom/raid5/g_raid5.h /usr/include/geom/raid5/
[root <at> 82 /usr/src/sbin/geom/class/raid5]#
[root <at> 82 /usr/src/sbin/geom/class/raid5]# make depend
[root <at> 82 /usr/src/sbin/geom/class/raid5]#
[root <at> 82 /usr/src/sbin/geom/class/raid5]# make
Warning: Object directory not changed from original /usr/src/sbin/geom/class/raid5
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[root <at> 82 /usr/src/sbin/geom/class/raid5]#
[root <at> 82 /usr/src/sbin/geom/class/raid5]# make install
[root <at> 82 /usr/src/sbin/geom/class/raid5]#

and after this graid5(at /sbin/graid5 and at any other location) doesn't created : (

(Continue reading)

Arne "Wörner" | 3 May 2007 19:48
Picon
Favicon

Re: graid5 compilation problem

--- deniswork <at> uzvik.kiev.ua wrote:
> Hi, I  want  migrate(after two after-reboot-crashes) from gvinum to
> graid5.
>
Cool... I am glad to read that...

> I take graid5 from this url:
>
> http://home.tiscali.de/cmdr_faako/geom_raid5.tbz
>
OK...

> and trying to compile it using this guide:
> http://www.freenas.org/downloads/docs/devel-docs/#d0e689
> 
> kernel module compiles OK.
> , but i meet troubles when I
> trying to compile geom_raid5.c
> 
> [root <at> 82 /usr/src/sbin/geom/class/raid5]# cd /usr/src/sbin/geom/class/raid5/
> [root <at> 82 /usr/src/sbin/geom/class/raid5]#
> [root <at> 82 /usr/src/sbin/geom/class/raid5]# mkdir /usr/include/geom/raid5
> [root <at> 82 /usr/src/sbin/geom/class/raid5]#
> [root <at> 82 /usr/src/sbin/geom/class/raid5]# cp
> /usr/src/sys/geom/raid5/g_raid5.h /usr/include/geom/raid5/
> [root <at> 82 /usr/src/sbin/geom/class/raid5]#
> [root <at> 82 /usr/src/sbin/geom/class/raid5]# make depend
> [root <at> 82 /usr/src/sbin/geom/class/raid5]#
> [root <at> 82 /usr/src/sbin/geom/class/raid5]# make
> Warning: Object directory not changed from original
(Continue reading)

deniswork | 3 May 2007 21:11
Picon

Re[2]: graid5 compilation problem

Can you please advice how to create raid with graid5?
I found on docs
graid5 label -v -s 131072 data /dev/da0 /dev/da1 /dev/da2 /dev/da3
newfs /dev/raid5/data
mount /dev/raid5/data /mnt

So my attempt:
$ geom raid5  label -v /dev/ad4 /dev/ad6 /dev/ad8 /dev/ad10
i get:
Unknown command: label
usage: geom raid5 help
       geom raid5 list [name ...]
       geom raid5 status [-s] [name ...]
       geom raid5 load [-v]
       geom raid5 unload [-v]

Thanks!

p.s.
[root <at> 82 /usr/src/sbin/geom/class/raid5]# kldstat
Id Refs Address    Size     Name
 1    6 0xc0400000 70794c   kernel
 2    1 0xc0b08000 11920    geom_vinum.ko
 3    1 0xc0b1a000 59f20    acpi.ko
 5    1 0xc8f43000 5000     geom_label.ko
 6    1 0xc85e4000 13000    geom_raid5.ko

> --- deniswork <at> uzvik.kiev.ua wrote:
>> Hi, I  want  migrate(after two after-reboot-crashes) from gvinum to
>> graid5.
(Continue reading)

deniswork | 3 May 2007 21:16
Picon

Re[2]: graid5 compilation problem

Btw, after make install on geom_raid5.c i'm unable locate
geom_raid5.so at system.

And I thing I need copy it to /lib/geom     as described in guide

> --- deniswork <at> uzvik.kiev.ua wrote:
>> Hi, I  want  migrate(after two after-reboot-crashes) from gvinum to
>> graid5.
>>
> Cool... I am glad to read that...

>> I take graid5 from this url:
>>
>> http://home.tiscali.de/cmdr_faako/geom_raid5.tbz
>>
> OK...

>> and trying to compile it using this guide:
>> http://www.freenas.org/downloads/docs/devel-docs/#d0e689
>> 
>> kernel module compiles OK.
>> , but i meet troubles when I
>> trying to compile geom_raid5.c
>> 
>> [root <at> 82 /usr/src/sbin/geom/class/raid5]# cd /usr/src/sbin/geom/class/raid5/
>> [root <at> 82 /usr/src/sbin/geom/class/raid5]#
>> [root <at> 82 /usr/src/sbin/geom/class/raid5]# mkdir /usr/include/geom/raid5
>> [root <at> 82 /usr/src/sbin/geom/class/raid5]#
>> [root <at> 82 /usr/src/sbin/geom/class/raid5]# cp
>> /usr/src/sys/geom/raid5/g_raid5.h /usr/include/geom/raid5/
(Continue reading)

Arne "Wörner" | 3 May 2007 21:15
Picon
Favicon

Re: Re[2]: graid5 compilation problem

--- deniswork <at> uzvik.kiev.ua wrote:
> Can you please advice how to create raid with graid5?
> I found on docs
> graid5 label -v -s 131072 data /dev/da0 /dev/da1 /dev/da2 /dev/da3
> newfs /dev/raid5/data
> mount /dev/raid5/data /mnt
>
Yup - looks good...

> So my attempt:
> $ geom raid5  label -v /dev/ad4 /dev/ad6 /dev/ad8 /dev/ad10
> i get:
> Unknown command: label
> usage: geom raid5 help
>        geom raid5 list [name ...]
>        geom raid5 status [-s] [name ...]
>        geom raid5 load [-v]
>        geom raid5 unload [-v]
> 
Looks like u do not have the user-land library installed:
% cd /usr/src/sbin/geom/class/raid5
% make && make install

Then u should have this file:
  /lib/geom/geom_raid5.so

-Arne

__________________________________________________
Do You Yahoo!?
(Continue reading)


Gmane