Home Man
Search
Today's Posts
Register

Xen, VMWare, hypervisors, Amazon Elastic Computing Cloud, EC2, virtual storage, Amazon S3 and other cloud computing topics.

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

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to grow a zfs file system? fretagi Solaris 17 03-08-2017 01:32 PM
Grow / expand a ZFS volume aixlover Solaris 6 02-01-2012 04:26 PM
Any tips to grow iSCSI LUN bbbngowc AIX 5 05-16-2011 11:12 AM
resize / and grow swap upengan78 Solaris 2 12-18-2009 10:21 PM
Cannot grow jfs file system on AIX 5.2 need2bageek AIX 3 07-30-2009 01:20 PM
grow filesystem incredible Solaris 12 03-10-2009 06:24 AM
grow /var size how upengan78 SuSE 4 01-26-2009 11:18 AM
Where to grow up? movx What is on Your Mind? 1 10-19-2006 11:12 PM
VxVM disk/lun grow pressy UNIX for Advanced & Expert Users 3 03-27-2006 03:39 AM


All times are GMT -4. The time now is 04:03 PM.

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