Skip to content

Phils Blog and Stuff

TELECOMS. VIRTUALIZATION. IT. CODING. and more…

Menu
  • Home
  • Resources
    • Subnet Mask Cheat Sheet
    • Easy Dmarc+Email
    • MX Tool Box
    • LOAD BALANCING & SRE
  • SHOP
  • SOLUTIONS
  • SERVICES
  • Contact Me
Menu

Simple ZFS Mirrored file system…

Posted on 04/05/201308/03/2023 by Phil

zfs

Introduction:

In this blog post we are going to create a Mirrored file system using ZFS.

We are going to use 5 Disks, 4 for data and 1 as a hot spare.

The disks will be 200GB with a combined size of 1TB, but acutal usable space will only be 400GB.

This file system has the ability to support 2 disks failing and to have one disk replaced automatically by ZFS its self.

Commands:

zpool create mypool mirror disk01 disk02

zpool addmypool mirror disk03 disk04

zpool add mypool spare drive05

zpool set autoreplace=on mypool

Check:

zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
mypool 390M 120K 390M 0% 1.00x ONLINE -
zpool status
pool: mypool
 state: ONLINE
 scrub: none requested
config:

        NAME                  STATE     READ WRITE CKSUM
        mypool                ONLINE       0     0     0
          mirror-0            ONLINE       0     0     0
            /zdisk/disk1.img  ONLINE       0     0     0
            /zdisk/disk2.img  ONLINE       0     0     0
          mirror-1            ONLINE       0     0     0
            /zdisk/disk3.img  ONLINE       0     0     0
            /zdisk/disk4.img  ONLINE       0     0     0
        spares
          /zdisk/disk5.img    AVAIL

errors: No known data errors

You can now access the new file system under “/mypool” and begin adding files there in the knowledge that should 1 disk fail, ZFS will auto replace it with the spare, giving you time to replace the drive.

POSTS

  • Home Assistant. Add water meter with PHP+MQTT+YML.
  • Automating your home with Home Assistant. Initial install and config (Hyper-V).
  • The importance of setting up email security correctly.
  • Automate Debian installations with Seed, DHCP and Nginx.
  • A simple link shortener.. Fun little project…

WORD CLOUD

3CX 3CX Phone System Apache Asterisk Cacti CentOS CRM DHCP DNS Email Fail over Failover File System Firewall FreeBSD FreeNAS FXO IAX install IP IP PBX Linux M0n0wall Nottingham Open Source PBX PFSense PHP Router Server SIP snom SSH TrixBox ubuntu VLAN Voice VoIP VPN vyatta WAN Website WiFi yealink ZFS

© 2025 Phils Blog and Stuff | Powered by Superbs Personal Blog theme