StratusLab Tutorial (Bordeaux, France)

Slides:



Advertisements
Similar presentations
Hands-on RAID on Moxa Computer Prepared by: (40min) Date: mm-dd-yyyy.
Advertisements

Virtual Machine Lifecycle StratusLab Tutorial (Orsay, France) 28 November 2012.
Using Storage with VMs StratusLab Tutorial (Orsay, France) 28 November 2012.
Marketplace and Appliance Management Charles (Cal) Loomis & Mohammed Airaj LAL, Univ. Paris-Sud, CNRS/IN2P October 2013.
Chien-Chung Shen Google Compute Engine Chien-Chung Shen
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 7 Configuring File Services in Windows Server 2008.
Week 10 Project 3: An Introduction to File Systems
StratusLab is co-funded by the European Community’s Seventh Framework Programme (Capacities) Grant Agreement INFSO-RI VM Lifecycle ACGRID-III (Hanoi)
Installation Overview Charles (Cal) Loomis & Mohammed Airaj LAL, Univ. Paris-Sud, CNRS/IN2P October 2013.
Customized cloud platform for computing on your terms !
Client Installation StratusLab Tutorial (Orsay, France) 28 November 2012.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Section 3.1: Operating Systems Concepts 1. A Computer Model An operating system has to deal with the fact that a computer is made up of a CPU, random.
| nectar.org.au NECTAR TRAINING Module 9 Backing up & Packing up.
| nectar.org.au NECTAR TRAINING Module 10 Beyond the Dashboard.
Chapter 3.5 Memory and I/O Systems. 2 Memory Management Memory problems are one of the leading causes of bugs in programs (60-80%) MUCH worse in languages.
Module 2: Installing and Maintaining ISA Server. Overview Installing ISA Server 2004 Choosing ISA Server Clients Installing and Configuring Firewall Clients.
StratusLab is co-funded by the European Community’s Seventh Framework Programme (Capacities) Grant Agreement INFSO-RI Storage Services ACGRID-III.
1 Interface Two most common types of interfaces –SCSI: Small Computer Systems Interface (servers and high-performance desktops) –IDE/ATA: Integrated Drive.
Advanced Topics StratusLab Tutorial (Orsay, France) 28 November 2012.
Hands On UNIX II Dorcas Muthoni. Processes A running instance of a program is called a "process" Identified by a numeric process id (pid)‏  unique while.
Storage Services Charles (Cal) Loomis & Mohammed Airaj LAL, Univ. Paris-Sud, CNRS/IN2P October 2013.
Creating and Managing File Systems. Module 5 – Creating and Managing File Systems ♦ Overview This module deals with the structure of the file system,
Linux+ Guide to Linux Certification Chapter Six Linux Filesystem Administration.
| nectar.org.au NECTAR TRAINING Module 10 Beyond the Dashboard.
| nectar.org.au NECTAR TRAINING Module 9 Backing up & Packing up.
Computing Services Charles (Cal) Loomis & Mohammed Airaj LAL, Univ. Paris-Sud, CNRS/IN2P October 2013.
StratusLab is co-funded by the European Community’s Seventh Framework Programme (Capacities) Grant Agreement INFSO-RI StratusLab: Storage Services.
StratusLab is co-funded by the European Community’s Seventh Framework Programme (Capacities) Grant Agreement INFSO-RI StratusLab: Storage Services.
Appliance Management StratusLab Tutorial (Orsay, France) 28 November 2012.
Virtual Machines Module 2. Objectives Define virtual machine Define common terminology Identify advantages and disadvantages Determine what software is.
StratusLab is co-funded by the European Community’s Seventh Framework Programme (Capacities) Grant Agreement INFSO-RI VM Lifecycle StratusLab Tutorial.
2Operating Systems  Program that runs on a computer  Manages hardware resources  Allows for execution of programs  Acts as an intermediary between.
Linux Filesystem Administration
StratusLab is co-funded by the European Community’s Seventh Framework Programme (Capacities) Grant Agreement INFSO-RI StratusLab: VM Lifecycle EGI.
Section 4 Block Storage with SES
Data Virtualization Tutorial… SSL with CIS Web Data Sources
Running a Forms Developer Application
StratusLab Cloud Distribution
Jonathan Walpole Computer Science Portland State University
File System Implementation
StratusLab Roadmap C. Loomis (CNRS/LAL) EGI TCB (Amsterdam)
...looking a bit closer under the hood
Chapter 12: File System Implementation
Enterprise Hybrid Cloud
StratusLab Tutorial (Bordeaux, France)
Hands On UNIX AfNOG 2010 Kigali, Rwanda
StratusLab Tutorial (Bordeaux, France)
StratusLab Tutorial (Bordeaux, France)
Chapter 2: System Structures
StratusLab Tutorial (Orsay, France)
Hands On UNIX AfNOG X Cairo, Egypt
Lab 1 introduction, debrief
StratusLab Tutorial (Orsay, France)
AWS COURSE DEMO BY PROFESSIONAL-GURU. Amazon History Ladder & Offering.
OpenStack Ani Bicaku 18/04/ © (SG)² Konsortium.
IB Computer Science Topic 2.1.1
Linux File Systems Partitioning Mounting File Systems
Chapter 2: System Structures
...looking a bit closer under the hood
Distributed File Systems
Distributed File Systems
CSE 451: Operating Systems Spring Module 21 Distributed File Systems
* Introduction to Cloud computing * Introduction to OpenStack * OpenStack Design & Architecture * Demonstration of OpenStack Cloud.
Different types of Linux installation
Distributed File Systems
CSE 451: Operating Systems Winter Module 22 Distributed File Systems
Distributed File Systems
Distributed File Systems
Presentation transcript:

StratusLab Tutorial (Bordeaux, France) Storage Services StratusLab Tutorial (Bordeaux, France) 25-26 October 2012

Storage Services Volatile (Read-Write) Disks Static (Read-Only) Disks Useful for temporary (!) data storage Data will disappear when VM instance is destroyed Static (Read-Only) Disks Useful for distribution of quasi-static databases Handled and shared like VM images via Marketplace Persistent (Read-Write) Disks Allows the storage of service state or user data Mounted as a disk on VMs Disks are persistent and have a lifecycle independent of a single VM Can be mounted by single VM at any time Only available within a single cloud instance

Other Storage Types File-based Storage Object Storage Normal client tools can be installed in VMs Access services normally from VM (e.g. tools for SRM) May provide CDMI interface to StratusLab storage Object Storage Simple object storage, usually minimal hierarchy and chunked data StratusLab works well with Swift from OpenStack Key-value Pair Database Exposes simple API for “database” of key-value pairs (e.g. Cassandra) Can deploy VM with persistent disk to provide this service Unlikely to see StratusLab implementations, but may facilitate co-deployment of other’s services.

Volatile Storage Use: Storage of large temporary data files. Declare Volatile Disk When starting machine use option: --volatile-disk SIZE_GB Raw disk can be found using the command fdisk -l Use of Disk Disks are not formatted! Use: mkfs.ext4 /dev/xxx Mount disk: mount /dev/xxx /mnt/volatile Use normally: touch /mnt/volatile/mydata Data is Volatile! Disk and data will survive reboots of the machine instance Disk and data will be destroyed once the machine is halted or killed

Static Disk Use: Distribution and caching of fixed/versioned data Declare Static (Read-Only) Disk When starting machine use option: --readonly-disk MKTP_ID Disk will be available when machine starts Use of Disk Disks appear exactly as in reference image, formatting included Mount disk: mount /dev/xxx /mnt/readonly Use normally: touch /mnt/readonly/mydata Data is fixed! Disk and data cannot be modified Disk must be registered in the Marketplace

Persistent Disk (Volume) Use: Persistent storage of data with lifecycle independent of a single virtual machine instance. Workflow Create a disk with a given size via command line or web interface Launch a machine instance referencing that image Format (mkfs) the disk via the running VM Store data to the disk as usual Unmount the disk Halt the machine instance or detach disk from machine Disk with persistent data is available for use by another VM Only format disk the first time it is used!

Persistent Storage Architecture

Using a Persistent Disk Client Configuration Persistent disk service endpoint defaults to VMM endpoint If on another machine, the service endpoint must be given explicitly For LAL use: pdisk.lal.stratuslab.eu

Create Persistent Disk (CLI) Provide size for disk and other options to create: stratus-create-volume --size=SIZE --tag=TAG All volumes have a unique identifier (UUID) associated with them UUID is used to control the given volume Get information about volume(s) stratus-describe-volumes [UUID] Command works just like stratus-describe-instance does $ stratus-create-volume --size=2 --tag=mydisk DISK 9682962d-4082-47df-bfe7-4e41a2fd0463 $ stratus-describe-volumes 9682962d-4082-47df-bfe7-4e41a2fd0463 :: DISK 9682962d-4082-47df-bfe7-4e41a2fd0463 count: 0 owner: cal tag: mydisk size: 2

Disk Access Restrictions Primitive Access Control: Volume can only be mounted on one machine at a time Volume cannot be deleted when in use Primitive Access Control: By default, created disks are “private” (--private option), with only the owner able to read, write and delete the volume. Disks marked as “public” (use --public option) can be read and written by anyone; only owner can delete it More elaborate (and useful) access control will appear when general groups and roles are implemented for all services

Create Persistent Disk (Web) Log into interface with your username/password. Cancel requests for a certificate! Create new volumes List of available volumes https://pdisk.lal.stratuslab.eu/pswd/disks/

Disk Detail (Web) Mount info. Volume info. Control volume

Delete Persistent Disk Note Volume cannot be deleted when in use! Web interface: Click the delete button for the disk Caution: there is no “Confirm?” dialog! CLI: Use: stratus-delete-volume UUID $ stratus-delete-volume bf1169ac-164e-4af3-b6eb-54d12b7ddb99 DELETED bf1169ac-164e-4af3-b6eb-54d12b7ddb99

Persistent Disks with VMs You’ve seen the full persistent disk lifecycle, but it isn’t very interesting unless you can use the disk with a VM! Create a disk and start a machine with it: $ stratus-create-volume --size=5 --tag=with-vm DISK d862e974-d785-47bd-b814-d27269eb610a $ export TTYLINUX_ID=BN1EEkPiBx87_uLj2-sdybSI-Xb $ stratus-run-instance \ --persistent-disk=d862e974-d785-47bd-b814-d27269eb610a \ ${TTYLINUX_ID} ::::::::::::::::::::::::: :: Starting machine(s) :: :: Starting 1 machine :: Machine 1 (vm ID: 183) Public ip: 134.158.75.219 :: Done!

Mount Information (Web) Disk UUID Manual mount Active mount Disks mounted at deployment time will be marked as “static”. Dynamically mounted disks will have device ID (to be taken with a bit of skepticism!).

Prepare Persistent Disk for Use Log into the VM and find disk: Use fdisk to find the unformatted volume with correct size. Format disk: Disk can also be partitioned, but this isn’t necessary. $ ssh root@vm-219.lal.stratuslab.eu # # fdisk -l ... Disk /dev/hdc: 5368 MB, 5368709120 bytes 255 heads, 63 sectors/track, 652 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/hdc doesn't contain a valid partition table # mkfs.ext4 /dev/hdc mke2fs 1.42.1 (17-Feb-2012) ... Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done

Mount Disk and Store Data Mount the disk: Create directory for mount point and mount the disk there Store some data on the disk: We will check later that the data is preserved. Unmount disk afterwards # mkdir /mnt/pdisk # mount /dev/hdc /mnt/pdisk # ls /mnt/pdisk lost+found # echo "TESTING PERSISTENT DATA" > /mnt/pdisk/my-persistent-data # cat /mnt/pdisk/my-persistent-data TESTING PERSISTENT DATA # umount /mnt/pdisk/ # ls /mnt/pdisk/ #

Second VM with Same Disk? Start a new machine with same disk: Why did this fail? Disk is unmounted in first machine, but… The machine is still active and the disk is still allocated to it! It cannot be allocated to more than one machine. Kill first machine, then retry. $ stratus-run-instance --quiet \ --persistent-disk=d862e974-d785-47bd-b814-d27269eb610a \ ${TTYLINUX_ID} 184, 134.158.75.220 $ stratus-describe-instance -v 184 ... id state vcpu memory cpu% host/ip name 184 Failed 1 0 0 vm-220.lal.stratuslab.eu one-184 Error deploying virtual machine: Could not create domain from /var/lib/one//184/images/deployment.0

Validate Data in New Instance Start a new machine with same disk: Check that the data is still on the disk: $ stratus-run-instance --quiet \ --persistent-disk=d862e974-d785-47bd-b814-d27269eb610a \ ${TTYLINUX_ID} 190, 134.158.75.226 $ stratus-describe-instance id state vcpu memory cpu% host/ip name 190 Running 1 131072 5 vm-226.lal.stratuslab.eu one-190 # mkdir /mnt/pdisk # mount /dev/hdc /mnt/pdisk # ls /mnt/pdisk lost+found my-persistent-data # cat /mnt/pdisk/my-persistent-data TESTING PERSISTENT DATA

Hot-Plug Disks Dynamic mounting of persistent disks: Volumes can be attached and detached from virtual machines while the machine is running. This can be accomplished with both the command line or web interfaces. Commands are: stratus-{attach/detach}-volume Feature needs OS support: OS must have the acpiphp kernel module available and loaded. The ttylinux does not support this! All other StratusLab maintained images have this enabled by default.

Attach Disk to Ubuntu VM Deploy VM and check kernel module: UBUNTU_ID=HZTKYZgX7XzSokCHMB60lS0wsiv Attach a disk to a machine Use the client on your laptop You need the VM and disk identifiers $ stratus-run-instance --quiet ${UBUNTU_ID} 192, 134.158.75.228 $ ssh root@vm-228.lal.stratuslab.eu Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-24-generic x86_64) ... # lsmod Module Size Used by acpiphp 24231 0 $ stratus-attach-volume --instance 192 d862e974-d785-47bd-b814-d27269eb610a ATTACHED d862e974-d785-47bd-b814-d27269eb610a in VM 192 on /dev/vda

Mount Information (Web) Disk UUID Manual mount Active mount Mounts are visible on the web interface. Mounts can be made via the web interface as well.

Mount Information (Web) Mount details

Detach Disk from Ubuntu VM Unmount the disk inside machine: To avoid corruption, unmount file systems before detaching disk To detach: stratus-detach-volume --instance VM_ID DISK_ID # umount /mnt/pdisk # exit logout Connection to vm-228.lal.stratuslab.eu closed. $ stratus-detach-volume --instance 192 d862e974-d785-47bd-b814-d27269eb610a DETACHED d862e974-d785-47bd-b814-d27269eb610a from VM 192 on /dev/vda

Questions and Discussion

Exercises: Storage Volatile Disks Persistent Disk Lifecycle Create VM with volatile disk. Verify that disk space is present and usable. Persistent Disk Lifecycle Run through entire lifecycle without using a VM Do this both via the command line interface and via the browser Use persistent disk with a virtual machine Verify that disk can be remounted on another machine Verify that data on disk is preserved Verify that disk can be mounted/unmounted from running VM (warning: use Ubuntu or CentOS, ensure acpiphp module is loaded!)