Forked from ivan-rio/gist:957a0ec207bef051bb7935edc54eff60
Created
January 31, 2026 15:18
-
-
Save Gamblt/9671a7622d18f5eaacc4629a3c9744d9 to your computer and use it in GitHub Desktop.
Proxmox ZFS Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Створити ZFS пул | |
| # Створити датасети | |
| zfs create tank/photo | |
| zfs create tank/files | |
| # Обмеження розміру датасетів | |
| zfs set quota=50G tank/photo | |
| zfs get quota tank/photo | |
| zfs set quota=none tank/photo | |
| # Група власника на хості | |
| groupadd -g 110000 nas_shares | |
| # Користувач власник на хості | |
| useradd nas -u 101000 -g 110000 -m -s /bin/bash | |
| # Робимо користувача власником датасетів | |
| chown -R nas:nas_shares /tank/ | |
| # Встановлюємо Cockpit LXC | |
| https://community-scripts.github.io/ProxmoxVE/scripts?id=cockpit | |
| # Завантажити плагіни | |
| wget https://github.com/45Drives/cockpit-file-sharing/releases/download/v4.2.9-8/cockpit-file-sharing_4.2.9-8focal_all.deb | wget https://github.com/45Drives/cockpit-identities/releases/download/v0.1.12/cockpit-identities_0.1.12-1focal_all.deb | wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.10/cockpit-navigator_0.5.10-1focal_all.deb | |
| # Встановити плагіни | |
| apt install ./*.deb -y | |
| # Видалити інсталятори | |
| rm *.deb | |
| # Встановити пароль | |
| passwd root | |
| # Група в контейнері: | |
| groupadd -g 10000 nas_shares | |
| # Користувач, ім'я може бути будь-яке | |
| useradd nasowner -u 1000 -g 10000 -m -s /bin/bash | |
| # Точки монтування датасетів | |
| pct set 100 -mp0 /tank/photo,mp=/mnt/photo | |
| pct set 100 -mp1 /tank/files,mp=/mnt/files | |
| # Додати mirror диск в пул: | |
| zpool attach [-f] pool device new_device | |
| # Збільшити пул додатковим диском: | |
| zpool add [-f] [-n [-l]] pool vdev ... | |
| #Зупинка диску через 10 хв. бездіяльності | |
| nano /etc/hdparm.conf | |
| #1 - це 5 секунд, відповідно 120 - це 600 секунд (10 хвилин) | |
| /dev/disk/by-id/*** { | |
| spindown_time = 120 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment