Skip to content

Instantly share code, notes, and snippets.

@kakoma
kakoma / mount_ebs.sh
Created December 1, 2017 01:53 — forked from stingh711/mount_ebs.sh
How to mount another EBS as /var on EC2 (ubuntu)
#!/bin/bash
#attach the EBS to /dev/sdf before running it
#format EBS
mkfs -t ext4 /dev/xvdf
#copy original /var to /dev/xvdf
mkdir /mnt/new
mount /dev/xvdf /mnt/new
cd /var