Difference between revisions of "Move Mail RAID"
From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
OK, this can be done relatively risk free, but the order of the steps are important. | OK, this can be done relatively risk free, but the order of the steps are important. | ||
− | # Prep the receiving system, in this case Gourd. | + | # Prep the receiving system, in this case Gourd. |
## Make sure Gourd '''does not have a degraded RAID''', if it does, the new disk will become a hot-spare and immediately get overwritten. | ## Make sure Gourd '''does not have a degraded RAID''', if it does, the new disk will become a hot-spare and immediately get overwritten. | ||
## Stop KVM: "systemctl stop libvirtd" | ## Stop KVM: "systemctl stop libvirtd" | ||
Line 9: | Line 9: | ||
## Make sure mdadm works (i.e. is installed.) | ## Make sure mdadm works (i.e. is installed.) | ||
## '''Make sure all systems mount from "npghome" and some sysadmin idiot didn't hardwire 10.0.0.100''' or another ip. Check /etc/hosts and /etc/fstab | ## '''Make sure all systems mount from "npghome" and some sysadmin idiot didn't hardwire 10.0.0.100''' or another ip. Check /etc/hosts and /etc/fstab | ||
+ | ## Setup a bridge for the 10.0.0.240 (npghome) IP, called farmbr:1. Don't start it. | ||
+ | ## Make sure there is an nfs server installed | ||
# Take down Einstein and Roentgen. Since they both depend on /mail and /home. (Actually Roentgen is optional, Einstein is not.) | # Take down Einstein and Roentgen. Since they both depend on /mail and /home. (Actually Roentgen is optional, Einstein is not.) | ||
+ | # Stop the npghome (10.0.0.240) on Endeavour | ||
# Unmount /home, /mail from Endeavour. You may need to kill all users who are accessing the drives (not literally! Their process!) | # Unmount /home, /mail from Endeavour. You may need to kill all users who are accessing the drives (not literally! Their process!) | ||
# Move the physical drive from Endeavour to Gourd. Yup, on a running system. It's OK. You need to take the drive out of the caddy and mount it in a Gourd caddy. | # Move the physical drive from Endeavour to Gourd. Yup, on a running system. It's OK. You need to take the drive out of the caddy and mount it in a Gourd caddy. | ||
Line 24: | Line 27: | ||
#### mdadm --assemble --verbose /dev/md2 /dev/sdd3 --run | #### mdadm --assemble --verbose /dev/md2 /dev/sdd3 --run | ||
# Add the new drives in /etc/fstab and mount them. Check this worked. | # Add the new drives in /etc/fstab and mount them. Check this worked. | ||
+ | # Move the npghome (10.0.0.240) to the new system: Gourd (i.e. bring up farmbr:1) | ||
+ | # Export the drives on NFS, i.e. add to /etc/exports and export them. Check that other systems can mount them. | ||
+ | # Start Einstein. | ||
+ | ## Immediately log in and | ||
+ | ### check the system date. | ||
+ | ### check the /var/log/maillog for anything funny | ||
+ | ## Check that you are now receiving mail, and the old mail still exists. | ||
+ | ## Check from other systems that /net/home is available. | ||
+ | # Now, your moved RAID is still degraded, and the old RAID still runs on Endeavour as well. | ||
+ | ## |
Latest revision as of 15:14, 25 May 2016
Move the Mail RAID drive from Endeavour back to Gourd
OK, this can be done relatively risk free, but the order of the steps are important.
- Prep the receiving system, in this case Gourd.
- Make sure Gourd does not have a degraded RAID, if it does, the new disk will become a hot-spare and immediately get overwritten.
- Stop KVM: "systemctl stop libvirtd"
- Make sure /kvm /mail /home exist, and are empty directories.
- Make sure mdadm works (i.e. is installed.)
- Make sure all systems mount from "npghome" and some sysadmin idiot didn't hardwire 10.0.0.100 or another ip. Check /etc/hosts and /etc/fstab
- Setup a bridge for the 10.0.0.240 (npghome) IP, called farmbr:1. Don't start it.
- Make sure there is an nfs server installed
- Take down Einstein and Roentgen. Since they both depend on /mail and /home. (Actually Roentgen is optional, Einstein is not.)
- Stop the npghome (10.0.0.240) on Endeavour
- Unmount /home, /mail from Endeavour. You may need to kill all users who are accessing the drives (not literally! Their process!)
- Move the physical drive from Endeavour to Gourd. Yup, on a running system. It's OK. You need to take the drive out of the caddy and mount it in a Gourd caddy.
- Log into the RAID controller for Gourd.
- Delete the newly create "hot spare" (immediately, before it gets used!!!!)
- Create a pass-through drive for the newly inserted RAID disk.
- Manipulate the RAID on Gourd:
- Linux on Gourd will recognize the drive and make a /dev/md125 etc out of it. SO:
- Stop these raids: mdadm --manage /dev/md125 --stop
- Check what the new drive is named: Get the SCSI lun from the RAID http page, map it to the correct drive with: ls -ld /sys/block/sd*/device
- If you find the new disk is /dev/sdd, then reassemble:
- mdadm --assemble --verbose /dev/md0 /dev/sdd1 --run
- mdadm --assemble --verbose /dev/md1 /dev/sdd2 --run
- mdadm --assemble --verbose /dev/md2 /dev/sdd3 --run
- Linux on Gourd will recognize the drive and make a /dev/md125 etc out of it. SO:
- Add the new drives in /etc/fstab and mount them. Check this worked.
- Move the npghome (10.0.0.240) to the new system: Gourd (i.e. bring up farmbr:1)
- Export the drives on NFS, i.e. add to /etc/exports and export them. Check that other systems can mount them.
- Start Einstein.
- Immediately log in and
- check the system date.
- check the /var/log/maillog for anything funny
- Check that you are now receiving mail, and the old mail still exists.
- Check from other systems that /net/home is available.
- Immediately log in and
- Now, your moved RAID is still degraded, and the old RAID still runs on Endeavour as well.