Skip to content

Commit

Permalink
Update commands.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Tontonjo authored Jun 4, 2021
1 parent 7f43ca1 commit 73c8b1e
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,65 +13,66 @@ for i in pve-cluster pvedaemon vz qemu-server pveproxy pve-cluster; do systemctl
## VM Management

### Disk passtrough

```shell
qm set VMID -scsi0 /dev/sdX

```
Appliance Import

```shell
qm importdisk VMID pathtoappliance.ova local-lvm

```

## Disk Management

### Find a disc with ID:

```shell
ls /dev/disk/by-id/ -la

```
```shell
ls /dev/disk/by-id/ -la | grep "serial"

```

### list disk informations: Replace X

```shell
lsblk -o name,model,serial,uuid /dev/sdX

```

### Read actual partition status after change

```shell
hdparm -z /dev/sdX

```
## Zpool Management


### Find ARC RAM usage for Zpool:

```shell
awk '/^size/ { print $1 " " $3 / 1048576 }' < /proc/spl/kstat/zfs/arcstats

```

### Replace Zpool Drive:

```shell
zpool replace pool /old/drive /new/drive

```

### mark a pool a OK - Clear errors on pool and drives

```shell
zpool clear "poolname"

```

### Get Zpool version:

```shell
zpool --version

```

### ugrade a zpool:

```shell
zpool upgrade "poolname"

```
## Monitoring

### live disk IO

```shell
watch -n 1 "zpool iostat -v"

```
## Tools

Ioping - usefull to simulate drive activity and therefore locating it.
Expand Down

0 comments on commit 73c8b1e

Please sign in to comment.