BT Cloud Compute. Adding a Volume to an existing VM running Linux. The power to build your own cloud solutions to serve your specific business needs

Similar documents
BT Cloud Compute. Adding a Volume to an existing VM running Microsoft Windows

Changing user login password on templates

7. Try shrinking / -- what happens? Why? Cannot shrink the volume since we can not umount the / logical volume.

As this method focuses on working with LVM, we will first confirm that our partition type is actually Linux LVM by running the below command.

Getting Started with Pentaho and Cloudera QuickStart VM

Cloning and Repartitioning sessionmgr Disks

Adding a block devices and extending file systems in Linux environments

An introduction to Logical Volume Management

CIS UNIX System Administration

This section describes the procedures needed to add a new disk to a VM. vmkfstools -c 4g /vmfs/volumes/datastore_name/vmname/xxxx.

Manage your disk space... for free :)

F5 BIG-IQ Centralized Management Disk Space Management. Version 5.4

File system manager. Single tool to manage your storage. Red Hat. October 24, 2011

System Administration. Storage Systems

example.com index.html # vim /etc/httpd/conf/httpd.conf NameVirtualHost :80 <VirtualHost :80> DocumentRoot /var/www/html/

Partitioning and Formatting Guide

cpouta exercises

This is sometimes necessary to free up disk space on a volume that cannot have extra disk space easily added.

Controller Installation

Disks, Filesystems Todd Kelley CST8177 Todd Kelley 1

jfield Documentation Release 1 Jason Field

This is Worksheet and Assignment 12. Disks, Partitions, and File Systems

Exam Name: Red Hat Certified Engineer on Redhat

iscsi storage is used as shared storage in Redhat cluster, VMware vsphere, Redhat Enterprise Virtualization Manager, Ovirt, etc.

Quota LVM (Logical Volume Manager)

Arch Linux with an SSD Cache using LVM on BCache. Jeremy Runyan

Installation of Fedora 12 with CD

Braindumps EX200 15q

EX200 EX200. Red Hat Certified System Administrator RHCSA

Server guides for the GIRAF project

Installing and Upgrading Cisco Network Registrar Virtual Appliance

Amazon Web Services EC2 Helix Server

How to Deploy Axon on VMware vcenter

1) Use either Chrome of Firefox to access the VMware vsphere web Client.

How to add additional disks to XenServer host

MFT / Linux Setup Documentation May 25, 2008

Intel Cache Acceleration Software (Intel CAS) for Linux* v2.8 (GA)

1) Use either Chrome of Firefox to access the VMware vsphere web Client.

FORTINET DOCUMENT LIBRARY FORTINET VIDEO GUIDE FORTINET BLOG CUSTOMER SERVICE & SUPPORT FORTIGATE COOKBOOK FORTINET TRAINING SERVICES

Linux System Administration, level 1. Lecture 4: Partitioning and Filesystems Part II: Tools & Methods

Back Up (And Restore) LVM Partitions With LVM Snapshots

RH202. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs) Exam.

Red Hat.Actualtests.EX200.v by.Dixon.22q. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator (RHCSA) Exam

SAP HANA Restore Guide (for A2040d SLES) 23 rd of January 2017 NEC SAP Global Competence Center

The Ip address / Name value should be: srvvcenter-cis

The Ip address / Name value should be: srvvcenter-cis

KVM Guest Management With Virt-Manager On Ubuntu 8.10

exacqvision Virtual Appliance User Manual

EX200.Lead2pass.Exam.24q. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator RHCSA. Version 14.0

Zadara Enterprise Storage in

Vendor: RedHat. Exam Code: EX200. Exam Name: Red Hat Certified System Administrator - RHCSA. Version: Demo

Control Center Planning Guide

Manual File System Check Linux Command Line

DUAL OS INSTALLATION

INSTALLATION. Security of Information and Communication Systems. Table of contents

Seltestengine EX200 24q

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Control Center Planning Guide

Summary of Features. Backup, recovery and copy-data enhancements. Background

Eucalyptus User Console Guide

More on file systems, Booting Todd Kelley CST8177 Todd Kelley 1

Red Hat Enterprise Linux Atomic Host 7

EX200.redhat

Securing Containers Using a PNSC and a Cisco VSG

Securing Containers Using a PNSC and a Cisco VSG

Disaster Recovery Workflow

Turtles all the Way Down. Image 2013 CC-BY-NC-SA by Tony Gray

ElasterStack 3.2 User Administration Guide - Advanced Zone

Exam Actual. Higher Quality. Better Service! QUESTION & ANSWER

Configure Windows Server 2003 Release 2 Server Network File Share (NFS) as an authenticated storage repository for XenServer

Red Hat Enterprise Linux 5 Logical Volume Manager Administration. LVM Administrator's Guide Edition 1

Quick Start Guide to Compute Canada Cloud Service

Partitioning and Formatting Reference Guide

How to increase XenServer virtual machine root or swap partition

Alinto Mail Server Pro

Red Hat Enterprise Linux 7

Creating Application Containers

Booting a Galaxy Instance

OPS235. Linux File Systems Partitioning Mounting File Systems

MINI-HOWTO backup and/or restore device or partition using zsplit/unzsplit

Ellipse Support. Contents

JSA KVM SUPPORT. Theodore Jencks, CSE Juniper Networks

MULTI FACTOR AUTHENTICATION USING THE NETOP PORTAL. 31 January 2017

CST8207: GNU/Linux Operating Systems I Lab Nine Disks, Partitions, and File Systems Part 2. Disks, Partitions, and File Systems - Part 2 of 2

Bare Metal Server. User Guide. Issue 11 Date

INSTALLATION. Security of Information and Communication Systems

SAP HANA Backup Guide (for A2040d RHEL) 23 rd of January 2017 NEC SAP Global Competence Center

EX200.exam.35q. Number: EX200 Passing Score: 800 Time Limit: 120 min. EX200. Red Hat Certified System Administrator RHCSA

Creating Application Containers

UUID and R1Soft. What is a UUID and what is it used for?

FUJITSU Cloud Service S5 Connecting to a Virtual Machine (VM)

CST VMWare Documentation

FireFox. CIS 231 Windows 2012 R2 Server Install Lab #1

CIS 231 Windows 2012 R2 Server Install Lab #1

Elastic Compute Service. Quick Start for Windows

FUJITSU Software Cloud Storage Gateway V User's Guide

Installation of Informatica Services on Amazon EC2

istorage Server: High Availability iscsi SAN for Linux Server

Chapter 7. Getting Started with Boot from Volume

Version 1.26 Installation Guide for SaaS Uila Deployment

Transcription:

Adding a Volume to an existing VM running Linux BT Cloud Compute The power to build your own cloud solutions to serve your specific business needs Issue 3

Introduction This guide has been designed to walk you through the processes necessary to attach a volume to a virtual machine (VM) running a Linux operating system. A second guide has been produced to show how the same process is achieved on a VM running a Microsoft Windows Linux operating system. For the purpose of this guide it is assumed you have a VM already built and you have Root privileges on this VM. Creating a volume in the Cloud Compute Portal From the Home screen select [Manage Resources], [Cloud] Select the [Volume] tab Select [Add New] This will bring up a new window. Provide a friendly name for your volume. Select the Availability Zone you wish the volume to be created (remember it needs to be in the same as the VM you wish to attach it to), then select the size you wish the volume to be. The maximum size per volume is 2000Gb. The maximum number of additional volumes per VM is 6 with a maximum of 500 volumes per User within an Account. Once complete, agree to the Terms and Conditions, then select [OK]. British Telecommunications plc. Page 2 of 6 Issue 3

The Volume will now be created. Once a volume is created a conformation message will be displayed. Attaching the volume to a VM in the Cloud Compute Portal On the portal Click on the edit button in the top right hand corner and select [Attach Volume], this will open a new window. The Edit button can be identified as a cog wheel On the Attach Volume window using the drop down menu select the VM you wish to attach the volume followed by [OK]. The portal will now attach the volume to your chosen VM. Followed by a affirmative message of completion. Your volume is now attached to your VM however it is currently not recognised by your operating system therefore you are now required to access the VM to mount the attached volume into the operating system. British Telecommunications plc. Page 3 of 6 Issue 3

Mounting the new volume in the operating system Using the Console or SSH, access the VM. For the purposes of this guide we will use the console provided within the Portal. Select the VM followed by [View Console]. A new windows will popup, using your Root credentials login to the VM. For the purpose of this example we are using a Linux VM running the CentOS operating system. The VM already has a disk attached with two volumes therefore the new volume we have attached will show up as a second disk. Enter ls /dev/sd* this will display all the disks and volumes that are currently attached to your VM. We see the following output. As we already knew the VM has a disk with two volumes theses are visible as sda (the disk) with sda1 and sda2 as the volumes. That means that sdb is our new disk we have just attached. To enable the new disk, there are different ways to do this. The classical way is to partition the disk, format the disk and then mount the disk. For CentOS the following commands are used. These may vary depending upon the Linux OS you are using. Partition the disk Format the disk # fdisk /dev/sdb Mount the disk # mkfs.ext3 /dev/sdb1 Note we have given the volume a name - sbd1 # mkdir /disk1 # mount /dev/sdb1 /disk1 # df H British Telecommunications plc. Page 4 of 6 Issue 3

Logical Volume Manager More and more Linux distributions are using LVM (Logical Volume Manager) these days to manage the underlying disk storage. With LVM you get more flexibility in extending your disk storage plus some other benefits e.g. built-in snapshots or thin provisioning. The downside is, you have to learn a new concept and some new tools to manage LVM. Before we start with extending or adding storage, here is a little explanation and some terms used with LVM: PVs (physical volumes) - A PV is a disk partition, that is already prepared for use with LVM. VGs (volume groups) - A VG is built-up of one or more PVs. The VG acts as a container where you will find the LVs, that can be formatted with any standard Linux file system. LVs (logical volumes) The first step will be to create a partition from our newly provisioned disk and prepare it for LVM, so it can be used as a PV. Partition the disk # fdisk /dev/sdb Initialise the disk for LVM # pvcreate /dev/sdb1 To list all PVs on the system, you can simply type pvs on the console. Next step is to add this PV to a VG. You can list your VGs with the command vgs. The output should look similar to the following: # vgs VG #PV #LV #SN Attr VSize VFree vg_centos64x64v10 1 2 0 wz--n- 19.51g 0 In this example, our VG is named vg_centos64x64v10. To extend it with our new PV at /dev/sdb1, we will be using the vgextend command: # vgextend vg_centos64x64v10 /dev/sdb1 Using the vgs command again, you should see, that #PV, VSize and VFree have changed. After extending our VG, we can now extend any LV inside this VG. To list all available LVs in the system, you can use the lvs command: # lvs LV VG Attr LSize Pool Origin Data% Move Log Cpy%Sync Convert lv_root vg_centos64x64v10 -wi-ao---- 18.54g lv_swap vg_centos64x64v10 -wi-ao---- 992.00m To extend the lv_root LV by 5GB, you have to use the lvextend command with the full path of the LV. All LVs are located under /dev/mapper/ : # lvextend L +5G /dev/mapper/lv_root IMPORTANT: Without the + in front of the size, you would set the absolute size of the LV. British Telecommunications plc. Page 5 of 6 Issue 3

The last step is now resizing the file system to the new volume size. For ext3/4-filesystems this can be done online by issuing the resize2fs command: # resize2fs p /dev/mapper/lv_root For other file systems e.g. XFS oder ReiserFS you should consult the appropriate man-pages. You can also create new LVs in the extended VG by using the lvcreate command. British Telecommunications plc. Page 6 of 6 Issue 3