informatique:logiciels:proxmox
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatique:logiciels:proxmox [2025/02/15 21:53] – [Redimensionner la taille du stockage local-lvm] pteu | informatique:logiciels:proxmox [2025/04/02 16:48] (current) – [Ajouter un SSD M.2 en passthrough sur une VM] pteu | ||
---|---|---|---|
Line 149: | Line 149: | ||
+ | =====Partager un stockage local entre les LXC===== | ||
+ | |||
+ | (Inspiré de [[https:// | ||
+ | Pour partager [[informatique: | ||
+ | |||
+ | Dans la conf de chaque LXC : | ||
+ | <code bash> | ||
+ | echo "mp0: / | ||
+ | |||
+ | # uid map: from uid 0 map 1005 uids (in the ct) to the range starting 100000 (on the host), | ||
+ | # so 0..1004 (ct) → 100000..101004 (host) | ||
+ | lxc.idmap = u 0 100000 1005 | ||
+ | lxc.idmap = g 0 100000 1005 | ||
+ | # we map 1 uid starting from uid 1005 onto 1005, so 1005 → 1005 | ||
+ | lxc.idmap = u 1005 1005 1 | ||
+ | lxc.idmap = g 1005 1005 1 | ||
+ | # we map the rest of 65535 from 1006 upto 101006, so 1006..65535 → 101006..165535 | ||
+ | lxc.idmap = u 1006 101006 64530 | ||
+ | lxc.idmap = g 1006 101006 64530" >>/ | ||
+ | </ | ||
+ | |||
+ | Sur le système hôte: | ||
+ | <code bash> | ||
+ | echo " | ||
+ | echo " | ||
+ | chown -R 1005:1005 /mnt/datarv | ||
+ | </ | ||
+ | |||
+ | Puis redémarrer le conteneur: | ||
+ | <code bash> | ||
+ | lxc-stop 100 && lxc-start 100 | ||
+ | </ | ||
+ | |||
+ | Liens: | ||
+ | * https:// | ||
+ | |||
+ | |||
+ | =====Ajouter un SSD M.2 en passthrough sur une VM===== | ||
+ | |||
+ | (ref: https:// | ||
+ | |||
+ | En connectant un SSD m.2 sur le châssis ProxMox il est connecté en direct sur une ligne PCI express. On peut l' | ||
+ | |||
+ | La procédure se fait en ligne de commande : | ||
+ | |||
+ | Préalable potentiel... | ||
+ | <code bash> | ||
+ | apt install -y lshw | ||
+ | </ | ||
+ | |||
+ | Vérifier qu'il est bien détecté par Proxmox | ||
+ | <code bash> | ||
+ | lshw -class disk -class storage | ||
+ | *-nvme | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | bus info: pci@0000: | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | On doit le retrouver dans / | ||
+ | <code bash> | ||
+ | ls -l / | ||
+ | lrwxrwxrwx 1 root root 13 Apr 2 18:10 nvme-WD_Blue_SN5000_4TB_0123456789 -> ../ | ||
+ | lrwxrwxrwx 1 root root 13 Apr 2 18:10 nvme-WD_Blue_SN5000_4TB_0123456789_1 -> ../ | ||
+ | </ | ||
+ | |||
+ | Cette commande barbare résume tous les disques détectés: | ||
+ | <code bash> | ||
+ | lsblk |awk ' | ||
+ | NAME | ||
+ | sda 8:0 0 3.6T 0 disk / | ||
+ | nvme0n1 | ||
+ | nvme1n1 | ||
+ | </ | ||
+ | |||
+ | Dans notre cas il s'agit du WD 4 To ; on l' | ||
+ | <code bash> | ||
+ | qm set 103 -scsi1 / | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Vérification: | ||
+ | <code bash> | ||
+ | grep 0123456789 / | ||
+ | scsi1: / | ||
+ | </ | ||
+ | |||
+ | Si on change d' | ||
+ | <code bash> | ||
+ | qm unlink 103 --idlist scsi1 | ||
+ | </ |
informatique/logiciels/proxmox.1739656380.txt.gz · Last modified: 2025/02/15 21:53 by pteu