Skip to content

Instantly share code, notes, and snippets.

@poddmo
poddmo / mdadm and lvm.md
Last active December 4, 2024 00:42
Storage: mdadm and lvm

Raid arrays

Create array

Partition 2TB drives and add to raid6 array

for d in g h i j k ; do echo "/dev/sd${d}" ; sgdisk -n 0:0:3907029134 -t 0:0xfd00  /dev/sd$d ; done
mdadm --create --verbose /dev/md6 --level=6 --chunk=1M --raid-devices=5 /dev/sdg1 /dev/sdh1 /dev/sdi1 /dev/sdj1 /dev/sdk1

Check array

Debian/Ubuntu systems: Run the command /usr/share/mdadm/checkarray -x --all as root. This will cancel all running sync checks.

@nerdalert
nerdalert / Netfilter-IPTables-Diagrams.md
Last active April 16, 2025 02:11
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.