Gvinum RAID5 volume don't work after a simple reboot
Olivier Cochard
olivier at freenas.org
Mon Mar 6 06:19:51 PST 2006
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=/dev/zero of=/dev/ad0s1 bs=32k count=16
/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 without
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 second
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 at 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 at FreeBSD.org http://people.freebsd.org/~le/<http://people.freebsd.org/%7Ele/>
>
More information about the freebsd-geom
mailing list