ZFS fail simulation

General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

ZFS fail simulation

Postby nomoo » 12 Jul 2010, 14:52

Hello.

First of all, hardware:
MB: supermicro MBD-X8TL-IF-O, 4x1Tb Seagate Barracuda

I did raidz1 ZFS setup of FreeBSD 8 stable with the help of this article: http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/RAIDZ1
Then i did csup to 8 stable and rebuild world/kernel, upgraded zfs to v14, also installed updated loader:
[CMD=" "]gpart bootcode -p /boot/gptzfsboot -i 1 ad4[/CMD]

Well, everything is ok untill i reboot and remove one of HDDs, then i got this:
Code: Select all
can't work out which disk we're booting from. can't load kernel

and sometimes:
Code: Select all
assertation failed. Function ficlCompileSoftCore ...


The question is: am I doing something wrong or it should work somehow different then i expect?

Thanks in advance..
nomoo
Junior Member
 
Posts: 7
Joined: 12 Jul 2010, 14:38

Postby nomoo » 13 Jul 2010, 05:59

Guys, please help me. I need this file/backup server yesterday and it should be failsafe. Maybe i have to switch to ufs/gmirror or smth like that?

p.s. thanks, DutchDaemon
nomoo
Junior Member
 
Posts: 7
Joined: 12 Jul 2010, 14:38

Postby redixin » 13 Jul 2010, 17:34

I divided 3 HDDs in 2 slices (20G for system, and rest for the rest), joined first slices to gmirror, and the rest for raidz.

Code: Select all
[root@backup ~]# gmirror list | grep Name
1. Name: mirror/m0
1. Name: ad6s1
2. Name: ad7s1
3. Name: ad9s1
[root@backup ~]# zpool status
  pool: tank
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          raidz1    ONLINE       0     0     0
            ad6s2   ONLINE       0     0     0
            ad7s2   ONLINE       0     0     0
            ad9s2   ONLINE       0     0     0

errors: No known data errors
[root@backup ~]#


GL
redixin
Junior Member
 
Posts: 7
Joined: 13 Jul 2010, 15:03

Postby nomoo » 13 Jul 2010, 18:00

and now try some testing: swap devices and look if it is working, try to simulate drive failure.. what results will you get.
nomoo
Junior Member
 
Posts: 7
Joined: 12 Jul 2010, 14:38

Postby redixin » 13 Jul 2010, 18:51

I tried to remove two disks. Heh, raidz became unavailable, but geom still works. With one removed drive -- zfs degraded but working, gmirror of course ok. About swap -- it is better to use one more slice, without mirroring or something, or even swap file on zfs.
redixin
Junior Member
 
Posts: 7
Joined: 13 Jul 2010, 15:03

Postby nomoo » 13 Jul 2010, 19:45

mm, seems, that the practice with bootable mirrored ufs partition and data-zfs driven is the best choice. Will try it tomorrow.
nomoo
Junior Member
 
Posts: 7
Joined: 12 Jul 2010, 14:38

Postby jem » 14 Jul 2010, 07:15

I'm a little confused by what you've done.

The GPTZFSBoot/raidz1 instructions should have resulted in three GPT partitions on each disk, named ad6p1, ad6p2, ad6p3. p1 would have contained the boot code and been very small (64kb), p2 would have been used for swap and p3 would have been used by the zpool.

Instead, you appear to have two MBR slices ad6s1 and ad6s2.

I think you've got your wires crossed somewhere and ended up following the wrong instructions. The gptzfsboot loader isn't appropriate for MBR slices, which is probably why it isn't working.


Can you paste the output of '[FILE]gpart show[/FILE]' please?
jem
Member
 
Posts: 342
Joined: 23 Oct 2009, 11:24

Postby nomoo » 14 Jul 2010, 07:50

jen, is that question for me? if yes then, yes, i have 4 disks, with 3 partitions on each:
ad4p1,ad6p1,ad8p1,ad10p1 - bootcode
ad4p2,ad6p2,ad8p2,ad10p2 - swap
ad4p3,ad6p3,ad8p3,ad10p3 - zpool
nomoo
Junior Member
 
Posts: 7
Joined: 12 Jul 2010, 14:38

Postby jem » 14 Jul 2010, 08:31

My apologies. I read redixin's section of code and thought it was from you.

Do you have the 'bootfs' property set on your zpool? This is something the ZFS guides on the FreeBSD wiki don't mention, but I've found it necessary to set it before.

In my case, my root filesystem is pool0/ROOT/freebsd, so I do the following:

[CMD=""]zpool set bootfs=pool0/ROOT/freebsd pool0[/CMD]
jem
Member
 
Posts: 342
Joined: 23 Oct 2009, 11:24

Postby nomoo » 14 Jul 2010, 09:51

Yeah, that string was in howto, looked like:
[CMD=]zpool set bootfs=zroot zroot[/CMD]
nomoo
Junior Member
 
Posts: 7
Joined: 12 Jul 2010, 14:38


Return to General

Who is online

Users browsing this forum: Yahoo [Bot], YZMSQ and 1 guest