Rexxer

Some tips for me and other

Ubuntu + Script to extend a disk

#!/bin/bash fdisk /dev/sda << FDISK_CMDS n w FDISK_CMDS partprobe /dev/sda a=$(vgs | awk ‘ NR==2 {print $1;}’) vgextend “$a” /dev/sda3 b=$(vgdisplay | awk ‘ NR==17 {print $3;}’) lvextend -l +”$b” /dev/$a/ubuntu-lv resize2fs /dev/$a/ubuntu-lv Usefull link: https://packetpushers.net/ubuntu-extend-your-default-lvm-space/ Manual:

Mcedit + color scheme

Can be configured in the file ~/.config/mc/ini

ESXi + Modify RAID0 to RAID1

/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 show detail /opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 ld 3 add drives=allunassigned /opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 ld 3 modify raid=1

ESXi 6.7 + HP Array Utility

Show controller config/opt/smartstorageadmin/ssacli/bin/ssacli ctrl all show config Show controller status/opt/smartstorageadmin/ssacli/bin/ssacli ctrl all show status Show controller info/opt/smartstorageadmin/ssacli/bin/ssacli ctrl all show detail Show controller info by slot/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 show detail Controller re-scan/opt/smartstorageadmin/ssacli/bin/ssacli rescan Physical disks status/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 pd all show status Physical disk status full/opt/smartstorageadmin/ssacli/bin/ssacli ctrl slot=0 pd all show detail Logical disks status/opt/smartstorageadmin/ssacli/bin/ssacli […]

Test HDD speed + Linux

ESXi 5.5 to 6.7 + no datastores

Link: https://kb.vmware.com/s/article/1011387 Connect to the ESXi host with an SSH session and root credentials To list the volumes detected as snapshots, run this command: esxcli storage vmfs snapshot listYou see output similar to: 49d22e2e-996a0dea-b555-001f2960aed8Volume Name: VMFS_1VMFS UUID: 49d22e2e-996a0dea-b555-001f2960aed8Can mount: trueReason for un-mountability:Can resignature: trueReason for non-resignaturability:Unresolved Extent Count: 1 To mount a snapshot/replica LUN that […]

Gitlab + Get a list of projects

PREFIX=”ssh_url_to_repo”; cat test | grep -o “\”$PREFIX\”:[^ ,]+” | xargs -L1 basename | awk -F ‘.’ ‘{print $1}’

Zabbix + WakeOnLan script

FreeBSD/PFsense + install a package

Go to https://pkgs.org/download/digitemp, choose a package e.g. digitemp and get the link. Login to PFSense and install the package: pkg add https://pkg.freebsd.org/FreeBSD:12:amd64/quarterly/All/digitemp-3.7.2.pkg

Ubuntu VM + extend disk space

https://kb.vander.host/operating-systems/how-to-resize-an-ubuntu-18-04-lvm-disk/ sudo growpart /dev/sda 2 (your partition number)sudo resize2fs /dev/sda2 for LVM open the link or

Previous Posts Next posts