Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sudo aptitude install mdadm install lvm2 xfsprogs gsmartcontrol ssmtp
- sudo gdisk /dev/sdb ( n 1 <Enter> <Enter> fd00 w )
- # -p f2 means use far stripe locations to optimize for sequential read (multi GB sequence data)
- # missing here indicates that I intend to grow the array when the other two disks arrive
- sudo mdadm --create /dev/md0 --level=10 --name=ilmatar --raid-devices=4 -p f2 /dev/sdb1 missing /dev/sdc1 missing
- sudo mdadm --detail --scan
- #echo DEVICE /dev/sdb1 /dev/sdc1 /dev/sde1 /dev/sdf1 | sudo tee /etc/mdadm/mdadm.conf
- #sudo mdadm --detail --scan | sudo tee -a /etc/mdadm/mdadm.conf
- #lets do this manually:
- sudo nano /etc/mdadm/mdadm.conf
- -------------------------------------------------------------------------------
- # mdadm.conf
- #
- # Please refer to mdadm.conf(5) for information about this file.
- #
- # by default (built-in), scan all partitions (/proc/partitions) and all
- # containers for MD superblocks. alternatively, specify devices to scan, using
- # wildcards if desired.
- #DEVICE partitions containers
- DEVICE /dev/sd[bcef]1
- # auto-create devices with Debian standard permissions
- CREATE owner=root group=disk mode=0660 auto=yes
- # automatically tag new arrays as belonging to the local system
- HOMEHOST <system>
- # instruct the monitoring daemon where to send mail alerts
- MAILADDR root
- # definitions of existing MD arrays
- ARRAY /dev/md0 name=ilmatar:0 UUID=a341fae4:bd10b7b3:8f2fa2a3:b754fb39 metadata=1.2 level=10 num-devices=4 devices=/dev/sdb1,missing,/dev/sdc1,missing
- # This file was auto-generated on Tue, 25 Sep 2018 12:30:53 +0300
- # by mkconf $Id$
- -------------------------------------------------------------------------------
- # reboot to test auto-regeneration
- sudo mdadm --detail /dev/md0
- # with a single large XFS device these don't really help us and really just complicate management
- #sudo pvcreate /dev/md0
- #sudo vgcreate mongodb /dev/md0
- #sudo lvcreate -L 100G -n data mongodb
- #sudo lvcreate -l 100%FREE -n log mongodb
- sudo mkfs.xfs /dev/md0
- sudo mkdir /media/ilmatar
- sudo mount /dev/md0 /media/ilmatar
- sudo usermod -aG staff aubreybailey
- sudo chown -R root:staff /media/ilmatar/NGSRawData/
- sudo chmod 775 /media/ilmatar/NGSRawData/
- sudo blkid /dev/md0
- sudo nano /etc/fstab
- -------------------------------------------------------------------------------
- UUID=dcab9074-ba55-4917-a488-6edccb7730a3 /media/ilmatar xfs errors=remount-ro 0 1
- -------------------------------------------------------------------------------
- #test before rebooting or you will be sorry!
- sudo mount -a
- -------Bonus "sleep well at night" security------------
- gsmartmoncontrol
- sudo nano /etc/ssmtp/ssmtp.conf
- -------------------------------------------------------------------------------
- # Config file for sSMTP sendmail
- #
- # The person who gets all mail for userids < 1000
- # Make this empty to disable rewriting.
- root=postmaster
- # The place where the mail goes. The actual machine name is required no
- # MX records are consulted. Commonly mailhosts are named mail.domain.com
- mailhub=smtp.gmail.com:587
- AuthUser=aubrey.bailey@kct.fi
- AuthPass=TheGmailPassword
- UseSTARTTLS=YES
- # Where will the mail seem to come from?
- #rewriteDomain=
- # The full hostname
- hostname=ikuturso.kct.fi
- # Are users allowed to set their own From: address?
- # YES - Allow the user to specify their own From: address
- # NO - Use the system generated From: address
- FromLineOverride=YES
- -------------------------------------------------------------------------------
- sudo nano /etc/ssmtp/revaliases
- -------------------------------------------------------------------------------
- # sSMTP aliases
- #
- # Format: local_account:outgoing_address:mailhub
- #
- # Example: root:your_login@your.domain:mailhub.your.domain[:port]
- # where [:port] is an optional port number that defaults to 25.
- root:aubreybailey@kct.fi
- aubreybailey:aubreybailey@kct.fi
- postmaster:aubreybailey@kct.fi
- -------------------------------------------------------------------------------
- revaliases: root aubrey.bailey@kct.fi
- sudo mdadm --monitor --scan --test --oneshot
Add Comment
Please, Sign In to add comment