From 5928241f012f51f5a47e4c6a37a4f2b5895e937b Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 3 Dec 2013 04:29:47 +0000 Subject: [PATCH] Updates to static.o.o volume management docs * doc/source/static.rst: Stop suggesting to run commands from a root shell, and increase the recommended cinder volume size to a tebibyte. Change-Id: I1e9190d82bdf0ff232ed2b06256c9abba537d184 --- doc/source/static.rst | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/doc/source/static.rst b/doc/source/static.rst index e006010c78..c41dd87dde 100644 --- a/doc/source/static.rst +++ b/doc/source/static.rst @@ -36,10 +36,10 @@ Adding a New Device If the main volume group doesn't have enough space for what you want to do, this is how you can add a new volume. -Log into ci-puppetmaster.openstack.org, su to root and run:: +Log into ci-puppetmaster.openstack.org and run:: - . ~/cinder-venv/bin/activate - . ~/ci-launch/cinder.sh + . ~root/cinder-venv/bin/activate + . ~root/ci-launch/cinder.sh nova list cinder list @@ -47,31 +47,31 @@ Log into ci-puppetmaster.openstack.org, su to root and run:: * Add a new cinder volume (substitute the next number in series for NN):: - cinder create --display-name "static.openstack.org/mainNN" 512 + cinder create --display-name "static.openstack.org/mainNN" 1024 nova volume-attach auto * On static.openstack.org, create the partition table:: DEVICE=/dev/xvdX - parted $DEVICE mklabel msdos mkpart primary 0% 100% set 1 lvm on - pvcreate ${DEVICE}1 + sudo parted $DEVICE mklabel msdos mkpart primary 0% 100% set 1 lvm on + sudo pvcreate ${DEVICE}1 * It should show up in pvs:: - root@static:/etc/lvm# pvs - PV VG Fmt Attr PSize PFree - /dev/xvdX1 lvm2 a- 512.00g 512.00g + $ sudo pvs + PV VG Fmt Attr PSize PFree + /dev/xvdX1 lvm2 a- 1024.00g 1024.00g * Add it to the main volume group:: - vgextend main ${DEVICE}1 + sudo vgextend main ${DEVICE}1 Creating a New Logical Volume ============================= Make sure there is enough space in the volume group:: - root@static:~# vgs + $ sudo vgs VG #PV #LV #SN Attr VSize VFree main 4 2 0 wz--n- 2.00t 347.98g @@ -80,10 +80,10 @@ If not, see `Adding a New Device`_. Create the new logical volume and initialize the filesystem:: NAME=newvolumename - /sbin/lvcreate -L1500GB -n $NAME main + sudo lvcreate -L1500GB -n $NAME main - mkfs.ext4 -m 0 -j -L $NAME /dev/main/$NAME - tune2fs -i 0 -c 0 /dev/main/$NAME + sudo mkfs.ext4 -m 0 -j -L $NAME /dev/main/$NAME + sudo tune2fs -i 0 -c 0 /dev/main/$NAME Be sure to add it to ``/etc/fstab``. @@ -92,7 +92,7 @@ Expanding an Existing Logical Volume Make sure there is enough space in the volume group:: - root@static:~# vgs + $ sudo vgs VG #PV #LV #SN Attr VSize VFree main 4 2 0 wz--n- 2.00t 347.98g @@ -102,5 +102,5 @@ The following example to increase the size of a volume by 100G is untested; please confirm:: NAME=volumename - lvextend -L+100G /dev/main/$NAME - resize2fs /dev/main/$NAME + sudo lvextend -L+100G /dev/main/$NAME + sudo resize2fs /dev/main/$NAME