Methods for Querying FC HBA Info in Operating Systems
Methods for Querying FC HBA Info in Operating Systems For Linux 查看系统是否正常识别 HBA 卡。 ~]# lspci | grep Fibre03:00.0 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host Adapter (rev 03)03:00.1 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host Adapter (rev 03)~]# cat /sys/class/scsi_host/host*/model*nameLPe12002LPe12002 查看 WWN 信息 ~]# cat /sys/class/fc_host/host*/port_name0x210000e08b9079550x210000e08b902856 For Windows 通用查询程序: Fibre Channel Informati...
Dracut-initqueue swap does not exist during system boot
Dracut-initqueue swap does not exist during system boot APPLIES TO Operating System - Oracle Linux Server 7.4 SYMPTOMS [198.935138] dracut-initqueue[310]: Warning: Could not boot. [198.971675] dracut-initqueue[310]: Warning: /dev/ol/swap does not exist Starting Dracut Emergency Shell... Warning: /dev/ol/swap does not exist CAUSE The logical volume /dev/ol/swap was lost or not exist. SOLUTION Method 1 Type blkid to list device information. Mount sysroot. Mount boot. Changi...
Run the Docker daemon as a non-root user
Run the Docker daemon as a non-root user To create the docker group and add your user: Create the docker group. sudo groupadd docker Add your user to the docker group. sudo usermod -aG docker $USER Log out and log back in so that your group membership is re-evaluated. If you're running Linux in a virtual machine, it may be necessary to restart the virtual machine for changes to take effect. You can also run the following command to activate the changes to groups: newgrp docker Ver...
mysqldump
mysqldump Backup mysqldump -uroot -p'welcome' \--all-databases \--single-transaction \--routines \--source-data=1 \--flush-logs > backup.sql Restore # 设置还原时不记录binlog日志sed -i '1i set sql_log_bin=0;' backup.sqlmysql -uroot -p'welcome@123' < backup.sqlmysqlbinlog --start-position=154 binlog.00003 binlog.00004 | mysql -uroot -p'welcome@123'systemctl restart mysqld --stop-position, --start-position 误删除时,可以用来跳过误删除语句
Import and Export on MySQL
Import and Export on MySQL outfile 命令导出表数据 SELECT @@secure_file_priv;SELECT * FROM wiki.table1 INTO OUTFILE '/var/lib/mysql-files/wiki_table1' FIELDS TERMINATED BY '---'; mysql 命令导出表数据 mysql -ujove -pjove -e 'select * from wiki.table1' > /backup/wiki_table1mysql -ujove -pjove --xml -e 'select * from wiki.table1' > /backup/wiki_table1.xmlmysql -ujove -pjove --html -e 'select * from wiki.table1' > /backup/wiki_table1.html 备份表结构 mysqldump -ujove -pjove -d wiki table1 > /backup...
Using LVM Snapshot to Backup MySQL
Using LVM Snapshot to Backup MySQL 数据库全局读锁 flush tables with read lock; LVM 快照 lvcreate -L 500M -s -n mysql-snap /dev/datavg/mysql-snap mysql -uroot -p'Jove@123' -e 'show master status' > /backup/date +%F_position.log 释放全局读锁(关闭全局锁会话时,锁将自动失效) unlock tables; 挂载快照卷(只读) 从快照卷中复制数据(cp/tar) 卸载并删除快照卷 #! /bin/bash# LVM Snapshot for mysql backupbackup_dir=/backup/`date +%F`[ -d $backup_dir ] || mkdir -p $backup_direcho "FLUSH TABLES WITH READ LOCK; \SYSTEM lvcreate -L 500M -s -n mysql-snap /dev...
Percona XtraBackup 2.4(EOL)
Percona XtraBackup 2.4(EOL) Percona XtraBackup 2.4.29 is the final release of the Percona XtraBackup 2.4 series. Percona XtraBackup 2.4 does not support making backups of databases created in MySQL 8.0 or higher. Full Backup # 备份mkdir -p /xtarbackup/fullinnobackupex --user=root --password='welcome' /xtarbackup/full# 停止MySQL服务,删除数据systemctl stop mysqldrm -rf /var/lib/mysql/*rm -rf /var/log/mysqld.logrm -rf /var/log/mysql-slow/slow.log# 备份还原innobackupex --apply-log /xtarbackup/full/2022-01-01...
Percona XtraDB Cluster
Percona XtraDB Cluster Examples: Node Host IP Node 1 node1.localhost 192.168.184.161 Node 2 node2.localhost 192.168.184.162 Node 3 node3.localhost 192.168.184.163 Prerequisites Make sure that the following ports are not blocked by firewall or used by other software. Percona XtraDB Cluster requires them for communication. • 3306 • 4444 • 4567 • 4568 The SELinux security module can constrain access to data for Percona XtraDB Cluster. The best solution is to change the mode from...
Master-Slave Replication on MySQL 5.7.13
Master-Slave Replication on MySQL 5.7.13 Architecture All database operations are copied to the master’s binary log. Salves connect to the master and asks for the data. The slave servers get the masters binary log. Slaves then apply the binary log to its realy log. The relay log is read by the SQL thread process and it applies all the operations/data to the slave’s database and its binary log. Configuration Procedures Setup on Master 配置主机名解析。 "/etc/hosts"172.17.0.3 db2c998a052d ...
MY-011906
MY-011906 SYMTOMS MySQL8 服务器意外掉电,启动时报错: InnoDB: End of page dump InnoDB: Page may be an update undo log page 2021-02-10T14:22:14.800611Z 0 [ERROR] [MY-011906] [InnoDB] Database page corruption on disk or a failed file read of page [page id: space=4294967279, page number=611]. You may have to recover from a backup. SOLUTION 添加 innodb_force_recovery 参数,重新启动数据库进入恢复模式 [mysqld]innodb_force_recovery = 1 1 (SRV_FORCE_IGNORE_CORRUPT): 忽略检查到的 corrupt 页。尽管检测到了损坏的 page 仍强制服务运行。一般设置为该值即可,然后 dump 出...














