Josh-D. S. Davis

Xaminmo / Omnimax / Max Omni / Mad Scientist / Midnight Shadow / Radiation Master

Previous Entry Share Next Entry
Debian on Amazon Web Services Elastic Cloud (AWS EC2)
Josh 201604 KWP
joshdavis
I'm using Ubuntu Precise, which is linux 3.2.0, and various DebUntu packages.

The Amazon Machine ID is ami-82fa58eb. The root device is an 8g block on EBS (required for free tier).

It runs fine under a micro image (also required for free tier).

But I like JFS, and it doesn't have JFS.
Also, I wanted /home to be separate from the jumbo root filesystem.

So, I did this:
* Add the new device (22GB to stay within 30G free tier) as /dev/sdf (first free slot)
root@aws:/root# dmesg | tail
[161800.993075] blkfront device/vbd/2128 num-ring-pages 1 nr_ents 32.
[161801.895396] blkfront: xvdf: barrier or flush: disabled
[161801.905416]  xvdf: unknown partition table

* Create the volume group:
root@aws:/root# apt-get update
root@aws:/root# apt-get install lvm2
root@aws:/root# pvcreate /dev/xvdf
  Physical volume "/dev/xvdf" successfully created
root@aws:/root# vgcreate -Ay -M2 -p32 -s256M rootvg /dev/xvdf
  Volume group "rootvg" successfully created
root@aws:/root# lvcreate -Ay -L 20G -n hd1 -prw -rauto rootvg
  Logical volume "hd1" created

* Create the filesystem
root@aws:/root# apt-get install jfsutils
root@aws:/root# mkfs.jfs -L /home /dev/rootvg/hd1
mkfs.jfs version 1.1.15, 04-Mar-2011
Warning!  All data on device /dev/rootvg/hd1 will be lost!

Continue? (Y/N) y
   -

Format completed successfully.

20971520 kilobytes total disk space.
root@aws:/root# cp -p /etc/fstab /etc/fstab.bak
root@aws:/root# vi /etc/fstab
echo 'LABEL=cloudimg-rootfs   /        ext4   defaults        1 1
LABEL=/home             /home    jfs    defaults,nofail 0 2
' > /etc/fstab

* Update the kernel to support JFS
root@aws:/root# aptitude safe-upgrade
root@aws:/root# apt-get install linux-image-extra-virtual jfsutils 
root@aws:/root# reboot

?

Log in

No account? Create an account