itday.org.ua

simple memo website

January 23

RAID always renames itself to /dev/md127 after rebooting

Solution:

mdadm --detail --scan /dev/md127 >> /etc/mdadm/mdadm.conf

vim /etc/mdadm/mdadm.conf, edit the appended line to look like this:

ARRAY /dev/md0 metadata=1.2 UUID=XXXXXXXX:XXXXXXXX:XXXXXXXX:XXXXXXXX

In other words, remove the name part, and set the device to /dev/md0.

update-initramfs -u

reboot

Original post

Category: simple memo | LEAVE A COMMENT
January 19

Create an empty test file to test disk speed

dd if=/dev/zero of=test.file bs=64k count=16k conv=fdatasync

Category: simple memo | LEAVE A COMMENT
January 19

Alma/Rocky/Centos/CloudLinux set time zone

List zones:

timedatectl list-timezones

Set timezone:
timedatectl set-timezone Europe/Kyiv

Category: simple memo | LEAVE A COMMENT
January 19

SSHFS mount with permission to access the folder by other users

sshfs -o allow_other username@some_server_ip:/home/user/specific/folder/ /mnt/some/folder

Category: simple memo | LEAVE A COMMENT
January 19

Check Nginx realtime connections

yum -y install python-pip; pip install --upgrade pip; pip install ngxtop
once done, it can be used via alias
alias nf='ngxtop -l /var/log/nginx/access.log top remote_addr http_referer'

Category: simple memo | LEAVE A COMMENT
January 19

Import huge MySQL DB

set global net_buffer_length=1000000;
set global max_allowed_packet=1000000000;
SET foreign_key_checks = 0;

Once it done:

SET foreign_key_checks = 1;

Category: simple memo | LEAVE A COMMENT
January 19

Migrate emails from one email address to another via imapsync tool

imapsync --no-modules_version --tls1 --host1 source_server_name_or_ip --user1 source@user.name --password1 'some_password_for_source_user' --host2 target_server_name_or_ip --user2 target@user.name --password2 'some_password_for_target_user'

Category: simple memo | LEAVE A COMMENT
January 19

Delete all emails from the Postfix mailq

To delete all emails:
mailq | awk '{print$7}'|sed '/^$/d'|sed 's/>//g'|sort -n|uniq -c|sort -n|tail -10

To check specific email:
postcat -q email_id_here|less

Category: simple memo | LEAVE A COMMENT
January 19

Replace text using Perl

perl -p -i -e 's/old/new/g'

Category: simple memo | LEAVE A COMMENT
January 19

Drop local DNS cache in Windows

Drop all cache:
ipconfig /flushdns

Check the records present/cached:
ipconfig /displaydns

Category: simple memo | LEAVE A COMMENT

Posts navigation

Older posts
Newer posts
RSS

Archives

  • July 2025 (11)
  • July 2024 (1)
  • June 2024 (1)
  • May 2024 (3)
  • February 2024 (2)
  • January 2024 (13)
  • December 2023 (1)
  • November 2023 (1)
  • October 2023 (1)
  • September 2023 (3)
  • May 2023 (1)
  • February 2023 (1)
  • July 2022 (2)
  • June 2022 (1)
  • February 2022 (2)
  • January 2022 (2)
  • December 2021 (1)
  • November 2021 (1)
  • July 2021 (3)
  • January 2021 (1)
  • February 2020 (2)
  • January 2020 (1)
  • August 2019 (7)
  • July 2019 (4)
  • May 2019 (2)
  • April 2019 (2)
  • February 2019 (1)
  • January 2019 (4)
  • December 2018 (5)
  • November 2018 (6)
  • October 2018 (1)
  • September 2018 (2)
  • August 2018 (2)
  • June 2018 (1)
  • May 2018 (2)
  • April 2018 (1)
  • December 2017 (1)
  • August 2017 (2)
  • July 2017 (5)
  • June 2017 (11)
  • March 2017 (1)
  • February 2017 (3)
  • January 2017 (6)
  • November 2016 (3)
  • October 2016 (8)
  • September 2016 (2)
  • July 2016 (3)
  • June 2016 (5)
  • May 2016 (2)
  • January 2016 (2)
  • November 2015 (1)
  • March 2015 (2)
  • February 2015 (1)
  • January 2015 (4)
  • December 2014 (3)
  • November 2014 (1)
  • October 2014 (1)
  • September 2014 (3)
  • June 2014 (1)
  • March 2014 (2)
  • February 2014 (2)
  • January 2014 (3)
  • December 2013 (7)
  • April 2013 (1)
  • February 2013 (2)
  • January 2013 (5)
  • September 2012 (1)
  • August 2012 (2)
  • July 2011 (3)
  • June 2011 (2)
  • April 2011 (1)
  • March 2011 (1)
  • February 2011 (1)
  • April 2010 (5)
  • fix cPanel Solr missed indexes
  • resize qcow2 with windows on board from the command line. Yes, i did it
  • Nginx Gzip Settings
  • cPanel Calendar delegation
  • Check SSL valid from/valid till from the command line
  • check CRT and KEY pair



Copyright 2021. All rights reserved.
WordPress theme "Anarcho Notepad" by Space X-Chimp.