croome.org

  • blogs
  • photos
  • contact
Home

LVM

Convert EC2 data filesystems to LVM for Drupal & MySQL

simon — Mon, 24/12/2007 - 3:40am

We're going to remove /mnt and use the "disk" to create LVM filesystems for our data. This will let us take snapshots, allowing for much quicker backups.

This script is a slightly modified version of Paul Moen's from http://blog.dbadojo.com/2007/11/making-logical-volumes-on-ec2.html.

Paste the script below into a file:

#!/bin/sh
# Name: make_mnt_LV.sh
# Script to make EC2 /mnt into a LVM volume

modprobe dm-snapshot

umount /mnt
pvcreate /dev/sda2
vgcreate vg /dev/sda2
lvcreate -L30720M -n myvmdisk1 vg
mkfs -t ext3 /dev/vg/myvmdisk1
mkdir -p /data/mysql_master

  • Drupal
  • EC2
  • Linux
  • LVM
  • simon's blog
  • 2 comments
  • Read more
Syndicate content

Navigation

  • Blogs
  • Photos
  • Recent posts
  • blogs
  • photos
  • contact