Giter Site home page Giter Site logo

alteredadmin / zfs-mirrored-encrypted-setup Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5 KB

"ZFS_Mirrored_Encrypted_Setup.sh" is a Bash script designed for setting up a mirrored ZFS pool with encrypted datasets. It guides the user through selecting two disks, creating a mirrored ZFS pool, and establishing an encrypted ZFS dataset with a user-provided passphrase.

Shell 100.00%
bash-script disk-encryption encryption zfs

zfs-mirrored-encrypted-setup's Introduction

ZFS Mirrored Encrypted Setup

โš ๏ธ Experimental Script - Use With Caution

Disclaimer: This script is experimental and performs significant disk operations that can potentially erase data. Please use it with extreme caution. Ensure that you have backups of all important data before proceeding. The author is not responsible for any data loss or damage that may occur.

About

ZFS_Mirrored_Encrypted_Setup.sh is a Bash script designed to streamline the process of setting up a mirrored ZFS pool with an encrypted dataset. It's aimed at users who are familiar with ZFS, disk operations, and Linux system administration.

Features

  • Prompts for disk selection to create a mirrored ZFS pool.
  • Guides through setting up ZFS encryption with a passphrase.
  • Automatically mounts the encrypted dataset to a specified directory.

Script Explanation

  • Shebang and Error Handling: Starts with a shebang for Bash and uses set -e to halt on any error.
  • Warning and Confirmation Prompts: Displays warnings about the potential risks of disk operations and requires user confirmation to proceed.
  • Disk Selection: Prompts the user to input names for two disks to be used in the ZFS pool.
  • Passphrase Setup: Requests a passphrase for ZFS encryption and confirms it, ensuring the user enters the same passphrase twice.
  • ZFS Pool Creation: Creates a mirrored ZFS pool using the specified disks.
  • Encrypted Dataset Creation: Sets up an encrypted ZFS dataset within the mirrored pool.
  • Dataset Mounting: Mounts the encrypted dataset to /mnt/my_raid.
  • Completion Notification: Informs the user upon successful completion of the setup.

Prerequisites

  • A Linux system with ZFS installed.
  • Knowledge of disk partitioning and ZFS pool management.

Usage

  1. Download the script.
  2. Make the script executable: chmod +x ZFS_Mirrored_Encrypted_Setup.sh.
  3. Run the script: ./ZFS_Mirrored_Encrypted_Setup.sh.
  4. Follow the on-screen prompts carefully.

Support the Developer

If you found this helpful, please consider:

  • Buymeacoffee: Link

zfs-mirrored-encrypted-setup's People

Contributors

alteredadmin avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.