1. reassemble way mdadm --stop /dev/md0 mdadm --assemble /dev/md0 /dev/sd[cd]1 mdadm --detail /dev/md0 mdadm --detail --scan --verbose > /etc/mdadm.conf [NOTICE] add DEVICE vi /etc/mdadm.conf ARRAY /dev/md0 level=raid1 num-devices=2 metadata=1.2 name=owl49:0 UUID=xxxxxxxx:0e451cef:a240f6e8:bf4734b4 devices=/dev/sdb1,/dev/sdc1 DEVICE /dev/sdb1 DEVICE /dev/sdc1 2. make it fail manually & remove & add # check examplemdadm --examine /dev/sd[a-z] # check disksfdisk -l # […]
Linux : umount force Hint - target is busy.
# fuser -ck /dev/sdb1 # umount -f /dev/sdb1 # umount -l /dev/sdb1
Fedora 31 : change langauge Hint
# system-config-languageselect languageinstall language pack
Linux Raid mdadm Hint
# fdisk /dev/sdb Command (m for help): d Command (m for help): n Command (m for help): n Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p): Enter Using default response p. Partition number (1-4, default 1): Enter First sector (2048-1953525167, default 2048): Enter Last […]
Linux : fast remove many files Hint
mkdir ./blankDir; rsync -av --delete ./blankDir/ /removePath/; rm -Rf ./blankDir;
linux : cp --preserve=links : copy symlink only Hint
cp --preserve=links /home/ /backup/home/ cp --RPnv /home/ /backup/home/
Fedora 31 : setup Hint
-------------------------------------- fallocate -l 10G /disk01/swapfile chmod 0600 /disk01/swapfile mkswap /disk01/swapfile swapon /disk01/swapfile -------------------------------------- vi /etc/fstab /dev/mapper/cl-root /disk01 xfs defaults 0 0 /dev/mapper/cl-home /home xfs defaults 0 0 /dev/sdb1 /data0 ext4 nofail,defaults 0 0 […]
/etc/fstab : with nofail
vi /etc/fstab -------------------------------------- /dev/sdb1 /data300G1 ext4 nofail,defaults 0 0 1.1.1.46:/ /owl46 nfs nofail,defaults 0 0 -------------------------------------- findmnt --verify --verbose
CentOS8 : rc-local.service nfs mount Hint
vi /usr/lib/systemd/system/rc-local.service [Unit] Description=/etc/rc.d/rc.local Compatibility Documentation=man:systemd-rc-local-generator(8) ConditionFileIsExecutable=/etc/rc.d/rc.local After=network.target After=network-online.target [Service] Type=forking ExecStart=/etc/rc.d/rc.local start TimeoutSec=0 RemainAfterExit=yes GuessMainPID=no [Install] WantedBy=multi-user.target -------------------------------------- vi /etc/rc.d/rc.local mount /dev/sdc1 /data1TB3 mount -t nfs 1.1.1.49:/ /owl49 -------------------------------------- chmod 755 /etc/rc.d/rc.local -------------------------------------- systemctl enable rc-local.service -------------------------------------- Created symlink […]
mariadb-10.3 : enum empty insert error Hint : STRICT_TRANS_TABLES
mysql -uroot -p -e "show variables like 'sql_mode';" sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' remove STRICT_TRANS_TABLES mysql -uroot -p -e "SET GLOBAL sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';"