From 719fb59e322061f399e6b6f473fd649bdfcdcc65 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sat, 9 Sep 2023 18:48:34 +0200 Subject: [PATCH] chore: included updates regarding the diy nas --- knowledge base/diy nas/v1.md | 29 +++++++++++++++++- knowledge base/linux/lsblk.md | 38 +++++++++++++++++++++++ knowledge base/proxmox.md | 58 +++++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 knowledge base/linux/lsblk.md create mode 100644 knowledge base/proxmox.md diff --git a/knowledge base/diy nas/v1.md b/knowledge base/diy nas/v1.md index 276aabf..e77a10d 100644 --- a/knowledge base/diy nas/v1.md +++ b/knowledge base/diy nas/v1.md @@ -4,6 +4,7 @@ 1. [Hardware](#hardware) 1. [Software](#software) +1. [Operational issues](#operational-issues) 1. [Further readings](#further-readings) 1. [Sources](#sources) @@ -21,7 +22,30 @@ ## Software -See [TrueNAS core]. +[Proxmox] on bare metal, running [TrueNAS Core] as VM. + +## Operational issues + +One NIC is used by Proxmox as _management port_.
+This one is given a fixed IP address and bridged from inside the system. + +To allow for disk suspension and SMART checks from the VM, Proxmox needs to **directly** attach the disks to it: + +```sh +$ lsblk -do 'NAME,SIZE,TYPE,MODEL,SERIAL' -I '8' +NAME SIZE TYPE MODEL SERIAL +sda 3.6T disk ST4000VN008-2DR166 ZGY9WA2F +sdb 3.6T disk ST4000VN008-2DR166 ZGY9WDD5 +sdc 3.6T disk ST4000VN008-2DR166 ZGY9WL4Z +sdd 3.6T disk ST4000VN008-2DR166 ZGY9W66G + +$ qm set 100 -sata0 /dev/disk/by-id/ata-ST4000VN008-2DR166_ZGY9WA2F +$ qm set 100 -sata1 /dev/disk/by-id/ata-ST4000VN008-2DR166_ZGY9WDD5 +$ qm set 100 -sata2 /dev/disk/by-id/ata-ST4000VN008-2DR166_ZGY9WL4Z +$ qm set 100 -sata3 /dev/disk/by-id/ata-ST4000VN008-2DR166_ZGY9W66G +``` + +Wanting to aggregate ## Further readings @@ -49,6 +73,9 @@ All the references in the [further readings] section, plus the following: [further readings]: #further-readings + +[proxmox]: ../proxmox.md + [amazon cable matters sata cables]: https://www.amazon.nl/dp/B018Y2LEBE/ [amazon corsair rm850e 2023]: https://www.amazon.nl/dp/B0BVL17341/ diff --git a/knowledge base/linux/lsblk.md b/knowledge base/linux/lsblk.md new file mode 100644 index 0000000..9cbf053 --- /dev/null +++ b/knowledge base/linux/lsblk.md @@ -0,0 +1,38 @@ +# `lsblk` + +## Table of contents + +1. [TL;DR](#tldr) +1. [Sources](#sources) + +## TL;DR + +```sh +# Install the tool. +dnf install 'util-linux' + +# Show information about block devices. +lsblk +lsblk -a + +# Also print other specific columns. +# Mind the '+' character at the beginning. +lsblk -o '+MODEL,SERIAL' + +# Show only physical disks +lsblk -d + +# Filter by major device numbers. +lsblk -I '8,259' +``` + +## Sources + +- [`man` page][man page] + + + + +[man page]: https://linux.die.net/man/8/lsblk diff --git a/knowledge base/proxmox.md b/knowledge base/proxmox.md new file mode 100644 index 0000000..6fcd3ab --- /dev/null +++ b/knowledge base/proxmox.md @@ -0,0 +1,58 @@ +# Proxmox + +## Table of contents + +1. [Management port](#management-port) +1. [Disk passthrough](#disk-passthrough) +1. [Further readings](#further-readings) +1. [Sources](#sources) + +## Management port + +One NIC is used by Proxmox as _management port_.
+This one is given a fixed IP address and bridged from inside the system. + +## Disk passthrough + +To allow for disk suspension and SMART checks from a VM, Proxmox needs to **directly** attach the disks to it. + +Add all SATA disks to the VM with ID 100: + +```sh +$ lsblk -do 'NAME,SIZE,TYPE,MODEL,SERIAL' -I '8' +NAME SIZE TYPE MODEL SERIAL +sda 3.6T disk ST4000VN008-2DR166 ZGY9WA2F +sdb 3.6T disk ST4000VN008-2DR166 ZGY9WDD5 +sdc 3.6T disk ST4000VN008-2DR166 ZGY9WL4Z +sdd 3.6T disk ST4000VN008-2DR166 ZGY9W66G + +$ qm set 100 -sata0 /dev/disk/by-id/ata-ST4000VN008-2DR166_ZGY9WA2F +$ qm set 100 -sata1 /dev/disk/by-id/ata-ST4000VN008-2DR166_ZGY9WDD5 +$ qm set 100 -sata2 /dev/disk/by-id/ata-ST4000VN008-2DR166_ZGY9WL4Z +$ qm set 100 -sata3 /dev/disk/by-id/ata-ST4000VN008-2DR166_ZGY9W66G +``` + +## Further readings + +- [Website] +- [Renaming a PVE node] + +## Sources + +All the references in the [further readings] section, plus the following: + +- [How to run TrueNAS on Proxmox?] + + + + +[renaming a pve node]: https://pve.proxmox.com/wiki/Renaming_a_PVE_node +[website]: https://www.proxmox.com/en/ + + +[further readings]: #further-readings + + +[how to run truenas on proxmox?]: https://www.youtube.com/watch?v=M3pKprTdNqQ