Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 2006 15:19:47 +0100
From:      "Olivier Cochard" <olivier@freenas.org>
To:        "Lukas Ertl" <le@freebsd.org>
Cc:        freebsd-geom@freebsd.org
Subject:   Re: Gvinum RAID5 volume don't work after a simple reboot
Message-ID:  <3131aa530603060619o6fd23c8bl@mail.gmail.com>
In-Reply-To: <Pine.WNT.4.64.0602272234530.1080@korben>
References:  <3131aa530602271250r458dd9fep@mail.gmail.com> <Pine.WNT.4.64.0602272206350.1080@korben> <3131aa530602271316n479af14fi@mail.gmail.com> <Pine.WNT.4.64.0602272227470.1080@korben> <3131aa530602271330t5b94992ei@mail.gmail.com> <Pine.WNT.4.64.0602272234530.1080@korben>

next in thread | previous in thread | raw e-mail | index | archive | help
I can reproduce the problem (tested under VMware).
It's a long mail, But i can reproduce at each time!

For resume:
When I create a RAID 5 volume, I must run newfs twice for have a permanent
raid volume (if not, I loose the RAID 5 when I reboot the PC).

Details:

- VMware workstation 5.5.1
- Tested with I'm using a small FreeBSD system (6.0 with FreeNAS 0.6
and 6.1beta with FreeNAS
0.63)
- Have 3 disks of 100Mb each (ad0, ad1, ad3)

---------------------------------------------------
Step 1: Initialized and  format the 3 disks with theses commands:

/sbin/fdisk -I -b /boot/mbr ad0
/bin/dd if=3D/dev/zero of=3D/dev/ad0s1 bs=3D32k count=3D16
/sbin/bsdlabel -w ad0s1 auto

Editing the bsdlabel for each:
- replacing c: by a:
- changing "unused" to "vinum"

---------------------------------------------------
Step 2: Create this raid.conf file:

drive disk_ad0 device /dev/ad0s1
drive disk_ad1 device /dev/ad1s1
drive disk_ad3 device /dev/ad3s1
volume raid5
plex org raid5 256k
sd length 102M drive disk_ad0
sd length 102M drive disk_ad1
sd length 102M drive disk_ad3

---------------------------------------------------
Step 3: Create the volume:
/sbin/gvinum create raid.conf

---------------------------------------------------
Step 4:Start the volume
/sbin/gvinum start raid5

For information at this state, all it's ok:
3 drives:
D disk_ad3              State: up    /dev/ad3s1    A: 0/102 MB (0%)
D disk_ad1              State: up    /dev/ad1s1    A: 0/102 MB (0%)
D disk_ad0              State: up    /dev/ad0s1    A: 0/102 MB (0%)

1 volume:
V raid5                 State: up    Plexes:       1    Size:        204 MB

1 plex:
P raid5.p0           R5 State: up    Subdisks:     3    Size:        204 MB

3 subdisks:
S raid5.p0.s2           State: up    D: disk_ad3     Size:        102 MB
S raid5.p0.s1           State: up    D: disk_ad1     Size:        102 MB
S raid5.p0.s0           State: up    D: disk_ad0     Size:        102 MB

---------------------------------------------------
Step 5: Create filesystem on this volume

/sbin/newfs -U /dev/gvinum/raid5

---------------------------------------------------
Step 6: I can mount it wihtout problem, and copy lot's of file on it withou=
t
problem:

$ mount
/dev/md0 on / (ufs, local)
devfs on /dev (devfs, local)
/dev/fd0 on /cf (msdosfs, local, read-only)
/dev/gvinum/raid5 on /mnt/raid5mnt (ufs, local, soft-updates)

touch /mnt/raid5mnt test.txt
---------------------------------------------------
Step 7: I reboot the system.

The rebuilding of the raid volume take a long time... (1 minutes for 3 disk
of 100Mb each).

---------------------------------------------------
Step 8: Impossible to mount the raid5 volume:

$ mount /dev/gvinum/raid5 /mnt/raid5
mount: /dev/gvinum/raid5 on /mnt/raid5: incorrect super block

$ fsck -t ufs /dev/gvinum/raid5
Cannot find file system superblock
fsck_ufs: /dev/gvinum/raid5: can't read disk label
** /dev/gvinum/raid5
ioctl (GCINFO): Inappropriate ioctl for device

Loosing all the files.... !!!!

---------------------------------------------------
Step 9: Re-create the filesystem

/sbin/newfs -U /dev/gvinum/raid5
---------------------------------------------------
Step 10: Then I can re-mount a filesystem without problem (but without the
file!)

$ mount
/dev/md0 on / (ufs, local)
devfs on /dev (devfs, local)
/dev/fd0 on /cf (msdosfs, local, read-only)
/dev/gvinum/raid5 on /mnt/raid5mnt (ufs, local, soft-updates)

And create file..
touch /mnt/raid5mnt titi.txt

---------------------------------------------------
Step 11: Reboot for the second time (after re-create the filesystem a secon=
d
time)

No problem! I can mount the RAID volume without problem.

Regards,

Olivier

--
Olivier Cochard
FreeNAS main developer
http://www.freenas.org
Skype: callto://ocochard

2006/2/27, Lukas Ertl <le@freebsd.org >:
>
> On Mon, 27 Feb 2006, Olivier Cochard wrote:
>
> > Yes, the volume is UP but I can't mount it, and the fsck report the
> error
> > message previously post.
>
> Hm, actually, no idea.  Maybe the first superblock got lost somehow, and
> you can find an alternate superblock to mount the FS.  Using "newfs -N"
> should print out how a FS would be created without doing it, so you can
> find the locations of the alternate superblocks.
>
> regards,
> le
>
> --
> Lukas Ertl                         http://homepage.univie.ac.at/l.ertl/
> le@FreeBSD.org                     http://people.freebsd.org/~le/<http://=
people.freebsd.org/%7Ele/>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3131aa530603060619o6fd23c8bl>