1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ZFS fail simulation

Discussion in 'General' started by nomoo, Jul 12, 2010.

  1. nomoo

    nomoo New Member

    Messages:
    8
    Thanks Received:
    0
    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:
    gpart bootcode -p /boot/gptzfsboot -i 1 ad4

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

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


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

    Thanks in advance..
     
  2. nomoo

    nomoo New Member

    Messages:
    8
    Thanks Received:
    0
    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
     
  3. redixin

    redixin New Member

    Messages:
    7
    Thanks Received:
    0
    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:
    [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
     
  4. nomoo

    nomoo New Member

    Messages:
    8
    Thanks Received:
    0
    and now try some testing: swap devices and look if it is working, try to simulate drive failure.. what results will you get.
     
  5. redixin

    redixin New Member

    Messages:
    7
    Thanks Received:
    0
    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.
     
  6. nomoo

    nomoo New Member

    Messages:
    8
    Thanks Received:
    0
    mm, seems, that the practice with bootable mirrored ufs partition and data-zfs driven is the best choice. Will try it tomorrow.
     
  7. jem

    jem Member

    Messages:
    349
    Thanks Received:
    55
    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 'gpart show' please?
     
  8. nomoo

    nomoo New Member

    Messages:
    8
    Thanks Received:
    0
    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
     
  9. jem

    jem Member

    Messages:
    349
    Thanks Received:
    55
    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:

    zpool set bootfs=pool0/ROOT/freebsd pool0
     
  10. nomoo

    nomoo New Member

    Messages:
    8
    Thanks Received:
    0
    Yeah, that string was in howto, looked like:
    zpool set bootfs=zroot zroot