unzip -O CP852 file.zip
úterý 28. února 2023
neděle 19. února 2023
LVM - recovery of a temporarily failed disk/PV, missing PV
https://www.golinuxcloud.com/recover-lvm2-partition-restore-vg-pv-metadata/#Step_2_Restore_PV_Physical_Volume_in_Linux
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/cluster_logical_volume_manager/mdatarecover
https://serverfault.com/questions/788202/locked-lvm-logical-volume-in-vg-with-missing-pv
Similar to Can't remove volume group, solved this problem by creating a temporary pv with the same uuid:
UUID="RQr0HS-17ts-1k6Y-Xnex-IZwi-Y2kM-vCc5mP" # from question
dd if=/dev/zero of=/tmp/tmp.raw bs=1M count=100
losetup -f
losetup /dev/loop0 /tmp/tmp.raw
pvcreate --norestorefile -u $UUID /dev/loop0 # it has arisen!
killall lvmetad # so it stops complaining about duplicate uuids (dulezite)
pvremove /dev/loop0 # a clean removal
losetup -D
pvscan --cache # to restart lvmetad
https://serverfault.com/questions/894410/cant-remove-volume-group
You cannot use --removemissing or force delete VG if metadata area equal zero as in my case.
Make block device from file and include in $VG:
dd if=/dev/zero of=/tmp/tmp.raw bs=1M count=100
losetup -f
losetup /dev/loop0 /tmp/tmp.raw
vgextend $VG /dev/loop0
After that I have Metadata Areas 1
vgremove --force $VG
and remove pvdevice:
pvremove /dev/loop0
pátek 17. února 2023
compression
https://linuxreviews.org/Comparison_of_Compression_Algorithms
https://www.privex.io/articles/which-compression-algorithm-tool/
Summary - which compression algorithms are best for each usecase?
Fastest compression and decompression: LZ4
Highest overall compression ratio: XZ
Compromise between compression ratio and speed: BZIP2 using LBZIP2
Most widely used / compatible compression algorithm: GZIP
My test: 256060514304 linux-sda.raw (239G) (almost empty disk image)
| program | size | secs. | speed | real | user | sys |
| pigz | 10457259791 | 382.226 s | 27.4 MB/s | 6m22.2s | 79m49.8s | 10m14.8s |
| pbzip2 | 10147770833 | 511.313 s | 19.8 MB/s | 8m31.3s | 151m19.4s | 6m25.3s |
| lbzip2 | 10135040141 | 427.531 s | 23.7 MB/s | 7m7.5s | 65m57.9s | 3m23.1s |
| plzip | 28286275683 | 1033.31 s | 8.0 MB/s | 17m13.3s | 529m13.4s | 3m1.4s |
| xz -T0 | 8183670908 | 887.644 s | 9.2 MB/s | 14m47.9s | 339m29.3s | 2m40.7s |
My test 2: 10400825344 tmp.qcow2 (9.7G)
| program | size | secs. | speed | real | user | sys |
| pigz | 4452123186 | 24.9386 s | 179 MB/s | 0m24.9s | 8m52.9s | 0m30.6s |
| pbzip2 | 4230752746 | 67.2459 s | 62.9 MB/s | 1m7.3s | 33m10.6s | 1m5.4s |
| lbzip2 | 4228282477 | 33.8341 s | 125 MB/s | 0m33.1s | 16m43.6s | 0m29.0s |
| plzip | 3808851634 | 155.09 s | 24.6 MB/s | 2m35.1s | 79m57.5s | 0m35.6s |
| xz -T0 | 3756465944 | 156.155 s | 24.1 MB/s | 2m36.4s | 79m7.2s | 0m30.9s |
Intel(R) Xeon(R) CPU E5-2697A v4 @ 2.60GHz, 16core/32threads, 128G ram