
- How to create softraid raid10 how to#
- How to create softraid raid10 install#
- How to create softraid raid10 update#
How to create software raid 10 with mdadm November 28, 2017.How to resize Physical volume and shrink disk partition December 6, 2017.
How to create softraid raid10 install#
How to install Nextcloud v 13 on Centos 7 with php 7 March 12, 2018. Encrypted LVM partition on software raid-1 with mdadm August 23, 2018. How to use Apache as Reverse Proxy on Centos 7 with selinux September 19, 2018. Hardening iptables from “ACCEPT all” to “DROP all” June 21, 2019. Install WordPress on Centos-8-stream with apache (httpd) September 27, 2019. Ftp access to linux server and apache listing of this content December 10, 2019.
How to install nextcloud v18 on Centos 8 Stream February 28, 2020. How to install mail server (postfix, dovecot, webmail and spamassasin) on Centos 8 with selinux enabled September 18, 2020. How to create a router from Centos 8 Stream September 6, 2021. How to create ceph on Centos 8 Stream September 22, 2021. If you notice any errors, please contact us. This entry was posted in Linux and tagged LPIC-2, MySQL, RAID, Ubuntu. Reload apparmor daemon and start mysql server: # service apparmor reloadĬheck mysql logs in case you run into problems: # tail -f /var/log/mysql/error.log Open the configuration file and change datadir appropriatelly: # vim /etc/mysql/my.cnfĬreate an alias for the new path: # echo "alias /var/lib/mysql/ -> /sql_data/," > /etc/apparmor.d/tunables/aliasĬopy all content form the default directory to the new location and change ownership of the folder: # cp -Rp /var/lib/mysql/* /sql_data Stop the daemon first: # service mysql stop We want to change it to our newly created raid drive. # echo "MAILFROM " > /etc/mdadm/nf Configure MySQLīy default, MySQL stores its data files and databases under /var/lib/mysql on Ubuntu. Optionally, configure email alerts for daily checks to ensure that any degraded MD devices don’t go unnoticed: # echo "MAILADDR " > /etc/mdadm/nf Mount the raid drive: # mount /dev/md0 /sql_dataĬreate a lost+found directory: # cd /sql_data # mklost+foundĭon’t forget to add a record to fstab: # echo "/dev/md0 /sql_data ext4 defaults 0 0" > /etc/fstab To stop a currently running data scrub safely: # echo idle > /sys/block/md0/md/sync_actionĬreate an ext4 filesystem: # mkfs.ext4 /dev/md0 To initiate a data scrub manually: # echo check > /sys/block/md0/md/sync_action Note that it’s good practice to regularly run data scrubbing to check for and fix errors. Synchronisation is done: # cat /proc/mdstat Md0 : active raid10 xvdi1 xvdh1 xvdg1 xvdf1Ĥ189184 blocks super 1.2 512K chunks 2 near-copies Wait for the array to finish synchronising disks: # watch cat /proc/mdstat Scan and activate the array automatically on startup: # mdadm -detail -scan -verbose > /etc/mdadm/nf Mdadm: Defaulting to version 1.2 metadata dev/xvdi1 2048 4194303 2096128 fd Linux raid autodetectĬreate the RAID10 array: # mdadm -C /dev/md0 -l 10 -n 4 /dev/xvdf1 /dev/xvdg1 /dev/xvdh1 /dev/xvdi1 -v We have 4x2GB disks pre-configured for Linux raid: # fdisk -l | grep /dev/xvĭisk /dev/xvda1 doesn't contain a valid partition tableĭisk /dev/xvda1: 8589 MB, 8589934592 bytesĭisk /dev/xvdf: 2147 MB, 2147483648 bytes How to create softraid raid10 update#
Install mdadm and mysql: # apt-get update & apt-get install mdadm mysql-server Create Software RAID10 We’re using Ubuntu 13.10 (Saucy Salamander): # uname -rvģ.11.0-15-generic #23-Ubuntu SMP Mon Dec 9 18:17: We’ll be setting up a Linux software RAID10 and re-configuring MySQL to use it for data files and databases.