The data disks attached to some flavors of Performance Cloud Servers are unformatted when created. Before you can use them to hold data on Linux, they have to be prepared by formatting them, determining their mount points, and adding them to the system's
The following is a guide to preparing data disks efficiently for standalone use. To configure two data disks in a software RAID, please see this guide.
List the volumes attached to your server by running the
sudo fdisk -l
In the volume list, the device
/dev/xvda is the system disk. Other volumes listed will be your data or Cloud Block Storage disks.
Format the main partition of each attached data disk with the
sudo mkfs -t ext3 /dev/xvde1
Substitute the device and partition number for
/dev/xvde1 in the example.
Create mount points for each data disk as needed.
Data disks must be assigned directories as mount points in order for the system to use them for storage. If a data disk is meant to hold a database, for example, its mount point should be the database's storage location (like
If the directory you will assign a disk to doesn't already exist, create it with the
sudo mkdir -p /path/to/directory
Assign disks to mount points by adding them to the
Edit the file with your favorite text editor, as in:
sudo nano /etc/fstab
Add a line for each disk listing its device name and partition number with the directory to mount it to, following this format:
/dev/xvde1 /var/lib/mysql ext3 defaults,noatime,nofail 0 2
Mount any new drives by running the
sudo mount -a
Confirm that the data disks are mounted by running a disk space check.
If any disks are missing, check the configuration lines in
/etc/fstab to make sure the device names and options are correct.
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License