Difference between revisions of "Move Mail RAID"
From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search (Created page with "= 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, i...") |
|||
Line 4: | Line 4: | ||
# 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. | ||
## Stop KVM: "systemctl stop libvirtd" | ## Stop KVM: "systemctl stop libvirtd" | ||
## Make sure /kvm /mail /home exist, and are empty directories. | ## Make sure /kvm /mail /home exist, and are empty directories. | ||
Line 11: | Line 12: | ||
# 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. | ||
+ | # 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 | ||
+ | # Add the new drives in /etc/fstab and mount them. Check this worked. |
Revision as of 18:29, 24 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
- Take down Einstein and Roentgen. Since they both depend on /mail and /home. (Actually Roentgen is optional, Einstein is not.)
- 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.