Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Help about MediaWiki
FUTO
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Introduction to a Self Managed Life: a 13 hour & 28 minute presentation by FUTO software
(section)
Main Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== 4.1 Verify Our Drives === First, let’s double-check we’re using the right drives: <pre>lsblk -o NAME,SIZE,MODEL,SERIAL</pre> You should see your two operating system drives listed, and the six hard drives we plugged in. Let’s make absolutely sure they’re empty: <pre># Check if drives have any existing partitions sudo fdisk -l /dev/sd[bdefgh]</pre> If you see any partitions, you might want to clear them: <pre># Only run these if you're SURE these are the right drives # THIS WILL ERASE ALL DATA ON THESE DRIVES sudo wipefs -a /dev/sdb sudo wipefs -a /dev/sdd sudo wipefs -a /dev/sde sudo wipefs -a /dev/sdf sudo wipefs -a /dev/sdg sudo wipefs -a /dev/sdh</pre> <span id="create-the-encrypted-pool"></span> ==== 4.2 Create the Encrypted Pool ==== We’ll create a RAIDZ2 pool (similar to RAID6) with encryption: <pre>sudo zpool create -o ashift=12 -O encryption=aes-256-gcm -O keylocation=prompt -O keyformat=passphrase mediapool raidz2 /dev/sdb /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh</pre> What do these commands do? * <code>-o ashift=12</code>: Optimizes for 4K sector drives * <code>-O encryption=aes-256-gcm</code>: Enables strong encryption * <code>-O keylocation=prompt</code>: Tells ZFS to ask for password * <code>-O keyformat=passphrase</code>: Use a password instead of keyfile * <code>raidz2</code>: Two drive redundancy * <code>mediapool</code>: Name of your pool (can be whatever you want) You’ll be prompted for a password. '''USE A STRONG PASSWORD AND DON’T FORGET IT!''' <span id="set-good-pool-properties"></span> ==== 4.3 Set Good Pool Properties ==== After creation, let’s set some good default properties: <pre># Enable compression sudo zfs set compression=lz4 mediapool # Disable atime updates (better performance)</pre> <pre>sudo zfs set atime=off mediapool # Set correct recordsize for general media storage sudo zfs set recordsize=1M mediapool</pre> <span id="verify-pool-creation"></span> ==== 4.4 Verify Pool Creation ==== Check that everything is set up correctly: <pre># Check pool status sudo zpool status mediapool # Check pool properties sudo zpool get all mediapool # Check encryption is enabled sudo zfs get encryption mediapool</pre> The <code>zpool status</code> output should show something like: <pre>louis@happycloud:~$ sudo zpool status mediapool pool: mediapool state: ONLINE config: NAME STATE READ WRITE CKSUM mediapool ONLINE 0 0 0 raidz2-0 ONLINE 0 0 0 sdb ONLINE 0 0 0 sdd ONLINE 0 0 0 sde ONLINE 0 0 0 sdf ONLINE 0 0 0 sdg ONLINE 0 0 0 sdh ONLINE 0 0 0 errors: No known data errors</pre> <span id="create-the-datasets-for-your-data-virtual-machine-backups"></span> ==== 4.5: Create the Datasets for your data & virtual machine Backups ==== Set permissions: <pre># Set ownership (replace 'louis' with your actual username) sudo chown louis:louis /mediapool # Set permissions (only you can access it) sudo chmod 700 /mediapool</pre> <span id="test-pool-importexport"></span> ==== 4.6 Test Pool Import/Export ==== Let’s make sure we can properly mount/unmount the pool: <pre># Export (unmount) the pool sudo zpool export mediapool # Import it back sudo zpool import mediapool</pre> You’ll have to enter the password with <code>sudo zfs load-key mediapool</code> in order to do anything with it, but we will do that later. You will be prompted for the password again when importing. <span id="important-notes"></span> ==== Important Notes ==== # '''BACKUP YOUR POOL PASSWORD!''' #* If you lose it, your data is GONE #* Store it in a password manager (that you don’t self-host) #* Consider a paper backup in a secure location that is not a post-it-note on your monitor. # '''Space Available''' #* Total raw capacity: 6 × 8TB = 48TB #* RAIDZ2 uses 2 drives for parity, so you lose 2 drives worth of capacity #* Usable space is 4 × 8TB = 32TB # '''What Redundancy Gives You''' #* Can survive one drive failure #* Can survive two drive failures #* '''Not a backup! Still need proper backups''' <span id="step-5-setting-up-zfs-pool-mount-points-and-permissions"></span>
Summary:
Please note that all contributions to FUTO may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
FUTO:Copyrights
for details).
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:
Cancel
Editing help
(opens in new window)