forked from Tontonjo/proxmox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.txt
42 lines (28 loc) · 1.27 KB
/
commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Tonton Jo - 2020
# Join me on Youtube: https://www.youtube.com/c/TontonJo
# You'll find there some usefull commands used for proxmox
# ---------------------- VM Management --------------------------------
# Disk passtrough
qm set VMID -scsi0 /dev/sdX
# Appliance Import
qm importdisk VMID pathtoappliance.ova local-lvm
# ---------------------- Disk management ------------------------------
# Find a disc with ID:
ls /dev/disk/by-id/ -la
ls /dev/disk/by-id/ -la | grep "serial"
# list disk informations: Replace X
lsblk -o name,model,serial,uuid /dev/sdX
# ----------------------Zpool Management ------------------------------
# Find ARC RAM usage for Zpool:
awk '/^size/ { print $1 " " $3 / 1048576 }' < /proc/spl/kstat/zfs/arcstats
# Replace Zpool Drive:
zpool replace pool /old/drive /new/drive
# mark a pool a OK - Clear errors on pool and drives
zpool clear "poolname"
# ---------------------- MONITORING ----------------------------------
# live disk IO
watch -n 1 "zpool iostat -v"
# -------------------------- TOOLS --------------------------------------
# Ioping - usefull to simulate drive activity and therefore locating it.
# s-tui - Graphical interface to monitor system performances
# stress - install it with s-tui to be able to stress your system - dont use in prod