Posts

Reduce (shrink) and resize raw disk at Proxmox

 Reduce (shrink) and resize raw disk at Proxmox 1. Check the status of raw disk:   #e2fsck -fy /hdd-img/images/111/vm-111-disk-1.raw e2fsck 1.46.5 (30-Dec-2021) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /hdd-img/images/111/vm-111-disk-1.raw: 135279/327680000 files (1.8% non-contiguous), 857599886/1310720000 blocks  2. At first, check raw disk size:   #qemu-img info /hdd-img/images/111/vm-111-disk-1.raw image: /hdd-img/images/111/vm-111-disk-1.raw file format: raw virtual size: 4.88 TiB (5368709120000 bytes) disk size: 3.59 TiB  3. Resize filesystem: -M - will resize to the minimum size based on saved files -p - will display progress bar #resize2fs -M -p /hdd-img/images/111/vm-111-disk-1.raw resize2fs 1.46.5 (30-Dec-2021) Resizing the filesystem on /hdd-img/images/111/vm-111-disk-1.raw to 852166716 (4k) blocks. Begin pass 2 (max = 196

JDK, JRE java enable TLS10

JDK, JRE java enable TLS10 If some old software requires TLSv1 or TLSv1.1, you have to edit java.security file and remove from this entry required algorithms.   jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \     DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \     include jdk.disabled.namedCurves    

Running bin/elasticsearch-setup-passwords auto Getting error : Failed to set password for user [apm_system] with elastic password

  Running bin/elasticsearch-setup-passwords auto Getting error : Failed to set password for user [apm_system] with elastic password   Your cluster does not have a data node.  Just add to the /etc/elasticsearch/elasticsearch.yml node.data: true If elastic cannot start, comment #node.roles: [master]

Apache 2.4 require IP virtualhost

Apache 2.4 require IP virtualhost   In Apache 2.4, the authorization configuration syntax has changed, and the Order , Deny or Allow directives should no longer be used. The new way to do this would be: <VirtualHost *:8080> <Location /> Require ip 192.168.1.0 </Location> ... </VirtualHost>

Proxmox 7 upgrade error CT does not support running in a unified cgroup v2 layout

When upgrading Proxmox to ver 7 and running Centos 7.9 as Container it gives error   At least one CT (174) which does not support running in a unified cgroup v2 layout.  To solve it, update systemd using this repo wget https://copr.fedorainfracloud.org/coprs/jsynacek/systemd-backports-for-centos-7/repo/epel-7/jsynacek-systemd-backports-for-centos-7-epel-7.repo -O /etc/yum.repos.d/jsynacek-systemd-centos-7.repo yum update systemd

Symlinks inside SFTP chroot

Symlinks inside SFTP chroot If symlinks inside chroot does not work, because require full, absolute path, you can just make mount to the destination folder 1. create dir else 2. mount --bind /some/directory /somewhere/else  

How to check which application listens on particular port in Windows

   How to check which application listens on particular port in Windows go to start->cmd and run  netstat -aon | findstr ":80" | findstr "LISTENING" Output is like this: TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3880   and last number is process id, now search for the application   tasklist /fi "pid eq 3880"    or use Powershell   Get-Process -Id (Get-NetTCPConnection -LocalPort 80).OwningProcess