I will create two volumes, a really fast one and a very secure one. The enclosure comes with hardware RAID that is currently configured to RAID 1. So each enclose provides 1TB of disc space right now.
The fast volume will be made of 2 x 700GB and then secure one, for backups, utilizing the rest.
Keep the yum repos updated
- yum install -y yum-cron
- chkconfig yum-cron on
I need Vim enhanced
A bunch of tools I always install
Let's look at the USB drives
Check disk configuration again
- yum install -y vim-enhanced
- echo "alias vi=vim" >> ~/.bashrc
- source ~/.bashrc
- yum install -y bind-utils net-tools traceroute nmap dhclient
- yum install -y system-storage-manager
- yum install -y nano bash-completion wget curl lsof deltarpm rpm-build yum-utils attr screen git
- yum groupinstall -y "Development Tools"
Let's look at the USB drives
- yum whatprovides lsusb
- yum install -y usbutils libusb
- libusb actually enabled the USB 3 ports
Install software RAID support
- yum whatprovides mdadm
- yum install -y mdadm
Check disk configuration
- Using lsblk this is how I have all my disks configured
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 111.8G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 110.8G 0 part ├─cl-root 253:0 0 50G 0 lvm / ├─cl-swap 253:1 0 1.5G 0 lvm [SWAP] └─cl-home 253:2 0 59.3G 0 lvm /home sdb 8:16 0 931.5G 0 disk ├─sdb1 8:17 0 700G 0 part └─sdb2 8:18 0 231.4G 0 part sdc 8:32 0 931.5G 0 disk ├─sdc1 8:33 0 700G 0 part └─sdc2 8:34 0 231.4G 0 part
Configure RAID
- Edit /etc/mdadm.conf
DEVICE /dev/sd[bc]1 ARRAY /dev/md0 devices=/dev/sdb1,/dev/sdc1 DEVICE /dev/sd[bc]2 ARRAY /dev/md1 devices=/dev/sdb2,/dev/sdc2
- mdadm -C /dev/md0 --level=raid0 --raid-devices=2 /dev/sdb1 /dev/sdc1
- mdadm -C /dev/md1 --level=raid1 --raid-devices=2 /dev/sdb2 /dev/sdc2
Formatting & mounting
- mkfs.xfs /dev/md0
- mkfs.xfs /dev/md1 -f
- mkdir /mnt/fastvol
- mkdir /mnt/safevol
- added lines to /etc/fstab
/dev/md0 /mnt/fastvol xfs defaults 0 0 /dev/md1 /mnt/safevol xfs defaults 0 0
- mount -a
- Using lsblk this is how I have all my disks configured
[root@giz-node-1 ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 111.8G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 110.8G 0 part ├─cl-root 253:0 0 50G 0 lvm / ├─cl-swap 253:1 0 1.5G 0 lvm [SWAP] └─cl-home 253:2 0 59.3G 0 lvm /home sdb 8:16 0 931.5G 0 disk ├─sdb1 8:17 0 700G 0 part │ └─md0 9:0 0 1.4T 0 raid0 /mnt/fastvol └─sdb2 8:18 0 231.4G 0 part └─md1 9:1 0 231.3G 0 raid1 /mnt/safevol sdc 8:32 0 931.5G 0 disk ├─sdc1 8:33 0 700G 0 part │ └─md0 9:0 0 1.4T 0 raid0 /mnt/fastvol └─sdc2 8:34 0 231.4G 0 part └─md1 9:1 0 231.3G 0 raid1 /mnt/safevol
Source for RAID using mdadm
No comments:
Post a Comment