From 3ff17e413301b6580cf7308cdb94bd5af287f8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maurice=20Preu=C3=9F?= Date: Sat, 21 Mar 2026 13:25:14 +0000 Subject: [PATCH] =?UTF-8?q?nas/README.md=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nas/README.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 nas/README.md diff --git a/nas/README.md b/nas/README.md new file mode 100644 index 0000000..7b5eccf --- /dev/null +++ b/nas/README.md @@ -0,0 +1,74 @@ +# Setup RAID + +### List all devices + +```` +lsblk +```` + +### Create new partition + +For each drive you'll need to type `fdisk /dev/sdx` replace the `x` with the letter of the drive. and youll want to use option `d` to delete a partition and `n` to make a new partition, just go ahead and use the smaller value for start and biggest value for last sector since im sure you want to utilize the whole drive, then optionp to print the partion table then option `w` to finalize the whole thing. repeat for all the drives involved. + +### List each of the drives + +```` +ls /dev/sd[a-d]* +```` + +### Create new RAID + +```` +mdadm --create --verbose /dev/md0 --level=10 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 +```` + +next youll want to type the command `ls -l /dev/disk/by-uuid` and take note of the entries that are there. you should `NOT` see an entry for your new array + +```` +mkfs.ext4 -F /dev/md0 +```` + +### Setup mount + +```` +ls -l /dev/disk/by-uuid +```` + +get the UUID from the `lrwxrwxrwx 1 root root 11 Jul 18 17:12 c9399944-da22-456a-8c6b-d768ac3471b1 -> ../../md0` part and define it in `/etc/fstab` + +```` +nano /etc/fstab +```` + +```` +UUID=c9399944-da22-456a-8c6b-d768ac3471b1 /path/to/mount ext4 auto 0 0 +```` + +```` +reboot +```` + +## TS +```` +parted /dev/sdb + +mklabel gpt + +print + +mkpart primary 0% 100% +```` +```` +cat /proc/mdstat +```` + +```` +umount -l /mnt/data +mdadm --stop /dev/md127 +mdadm --zero-superblock /dev/sda1 +mdadm --zero-superblock /dev/sdb1 +```` + +```` +mdadm --detail /dev/md127 +```` \ No newline at end of file