ZFS RAID Mirror

Discussion in 'Storage' started by mhari, Feb 26, 2012.

  1. Offline

    mhari

    Member Since:
    Feb 26, 2012
    Messages:
    2
    Message Count:
    2
    Likes Received:
    0
    Trophy Points:
    0
    mhari, Feb 26, 2012

    Hello,

    we start running a FreeNAS-Box with ZFS RAID in mirror-mode with a usb-stick as boot-device. After setting up the raid, the webinterface says that the mirror was setup correctly and it´s "healthy".

    After that we checked the functionality in case of a hardware failure - we shutted down the system and plugged off one of the disks. After booting up, the raid was degraded, as expected, but all data was still available from the nas. Afterwards we shutted the system down again, replugged the first hdd and plugged the other drive off. Know we expected all data woud be still in place, but nothing could be found. The webinterface (ZFS info) just gives an error.

    Did we get something wrong with a ZFS mirror? Could´nt we run each drive independently in case of failure.

    Thx for your response,
    mhari
  2. Offline

    b1ghen

    Member Since:
    Oct 19, 2011
    Messages:
    113
    Message Count:
    113
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Sweden
    b1ghen, Feb 26, 2012

    you need to make the pool healthy again before unplugging the next drive, what you just did was basically pulling both drives of a mirror which of course gets you data loss. You need to start a rebuild (resilver) of the pool (array) before you can pull the other drive.
  3. Offline

    joeschmuck Old Man

    Member Since:
    May 28, 2011
    Messages:
    2,488
    Message Count:
    2,488
    Likes Received:
    76
    Trophy Points:
    48
    Occupation:
    Electrical Engineer, Data Analysis, and Management
    Location:
    Virginia
    joeschmuck, Feb 26, 2012

    Yes, you messed up. You caused a two drive failure in a two drive system which is not good.

    You could run each drive independently. I don't have the answer on how to do that but it can be done. Your data is not lost, it's still there.
  4. Offline

    mhari

    Member Since:
    Feb 26, 2012
    Messages:
    2
    Message Count:
    2
    Likes Received:
    0
    Trophy Points:
    0
    mhari, Feb 26, 2012

    Thanks for your replies. We tried it the other way round and it works fine.

    1. Raid is healthy
    2. Unplugging of the first hdd.
    3. Raid is degraded, but data is still available. Writing some data for testing purpose.
    4. Replugging of the first device.
    5. Now the missing part: SRUBING OF THE POOL -> resilvering
    6. Raid is healthy again. New data was written to the first hdd.
    7. Unplugging of second hdd.
    8. Raid degraded, but data is available from the first hdd.
    9. Replugging of second hdd, followed by a little scrubing
    10. everything works fine

    Many thanks !!!!

Share This Page