How to grow an EBS Array at AWS

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 07-18-2011
Java How to grow an EBS Array at AWS

This process was collected by trial and error (mostly error) since most of the documents I found on the 'net were incomplete.

The cookbook/walkthrough on how to grow an Array on EBS at AWS...
Code:
# walkthrough by John Jones (jjones at cirrhus9 dot com)

umount /dev/md0
mdadm --stop /dev/md0
REM out the last line in /etc/fstab
# /dev/md0 /mnt/data-files xfs defaults 0 0
REM out the last line of /etc/mdadm/mdadm.conf
# ARRAY /dev/md0 level=raid0 num-devices=2 UUID=31a281bd:50deafca:edf6a245:a7933c25

Stop the instance.
Create new snapshot from existing volumes.
detach "current" sd[xx] volumes.
Create new volume from snapshots at higher capacity.
Attach to same /dev/sdX mount points while the instance is stopped.
Start the instance.
Assign EIP.
Login to the instance.
mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sdb /dev/sdc
mdadm --examine --scan --config=/etc/mdadm/mdadm.conf >> /etc/mdadm/mdadm.conf
mkdir -v /mnt/data-files
Remove comment in /etc/fstab
/dev/md0 /mnt/data-files xfs defaults 0 0

# check the mount for errors:
xfs_check /dev/md0

# mount it
mount /dev/md0
/dev/md0               40G   49M   40G   1% /mnt/data-files

# Verify new capacity...
mdadm --detail /dev/md0 | grep "Array Size"
     Array Size : 83885952 (80.00 GiB 85.90 GB)

# grow the new volumes
xfs_growfs -d /dev/md0

df -h | tail -1
/dev/md0               80G   49M   80G   1% /mnt/data-files

# reboot
reboot

# verify larger capacity
df -h | tail -1
/dev/md0               80G   49M   80G   1% /mnt/data-files

# Verify contents came across
ls -1 /mnt/data-files/

# Done.
Cleanup/delete "old" volumes.

Enjoy!
Login to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Similar Threads More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
AWS S3 with Bash Script krux_rap Shell Programming and Scripting 3 03-02-2015 08:44 AM
AWS Cloud EBS limit script! amar0000 Shell Programming and Scripting 2 01-01-2014 08:18 PM
Mod_proxy_html on Oracle EBS arumon UNIX and Linux Applications 0 10-01-2013 05:29 AM
Installing EBS 12.1.1 on RHEL 6.1 x86_64‏ rehantayyab82 Red Hat 3 01-24-2013 06:55 AM
Computing in the Clouds with AWS Linux Bot Virtualization and Cloud Computing 3 01-08-2010 06:30 AM
Sun EBS Networker 7.3 djembeplayer UNIX and Linux Applications 4 05-20-2008 04:44 PM
find: 0652-019 The status on /interfaces/eu3/hmsl/EBS/20070722 is not valid. vishal_ranjan UNIX for Advanced & Expert Users 0 09-04-2007 01:31 PM
Where to grow up? movx What is on Your Mind? 1 10-20-2006 12:12 AM
All times are GMT -4. The time now is 02:46 PM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?