Skip to content

Instantly share code, notes, and snippets.

@WadOps
WadOps / ExtendLogicalVolume.md
Last active October 6, 2025 14:16
Extend Logical Volume in Virtual Machines
  1. Extend hard disk on virtualisation manager
  2. Force linux kernel to rescan disks
    • List storage devices ls /sys/class/scsi_device/
    • Put the devices listed, in this command echo 1 > /sys/class/scsi_device/X\:X\:X\:X/device/rescan
      • For example echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan
  3. Extend physical volume
    • Execute fdisk /dev/sdx sdx: primary disk
      • Either create a new partition or recreate an existing one
        • Command (m for help): d start here for recreating >
@WadOps
WadOps / sshKeyConfig.md
Created April 8, 2024 15:15
sshKeyConfig

SSH Key Generation

  • generate ssh key by this command ssh-keygen -t rsa -b 4096 -N '' -f ~/.ssh/id_rsa
    • -t rsa type of key rsa
    • -b 4096 byte number 4096
    • -N '' the passphrase, we leave it empty
    • -f ~/.ssh/id_rsa key file name, we leave the default name

SSH Key installation

  • from client server
  • we send local key to remote server ssh-copy-id $USERNAME@$REMOTESERVER, password authentication is required
@WadOps
WadOps / addCAcert.md
Last active April 4, 2024 07:08
Add CA cert to local certs store on Debian-based and RPM-based distro

Debian-based

  • Copy the .crt file to /usr/local/share/ca-certificates/
  • Use this commande to update the store update-ca-certificates
  • Check if the CA cert has been added openssl crl2pkcs7 -nocrl -certfile /etc/ssl/certs/ca-certificates.crt | openssl pkcs7 -print_certs -noout | grep $CERTCN

RPM-based

  • Copy the .crt file to /etc/pki/ca-trust/source/anchors/
  • Use this commande to update the store update-ca-trust extract
  • Check if the CA cert has been added openssl crl2pkcs7 -nocrl -certfile /etc/ssl/certs/ca-bundle.crt | openssl pkcs7 -print_certs -noout | grep $CERTCN