Backup, Booten, RAID, LVM, Virtualization



Similar documents
How To Write A Backup On A Linux Computer (For A Non-Freebie)

Setup software RAID1 array on running CentOS 6.3 using mdadm. (Multiple Device Administrator) 1. Gather information about current system.

EXPLORING LINUX KERNEL: THE EASY WAY!

Installing Debian with SATA based RAID

Advanced SUSE Linux Enterprise Server Administration (Course 3038) Chapter 5 Manage Backup and Recovery

Shared Storage Setup with System Automation

How To Set Up Software Raid In Linux (Amd64)

Red Hat Linux Administration II Installation, Configuration, Software and Troubleshooting

Total Backup Recovery Server for Linux. User s Guide

Linux Template Creation Guide. How to build your own Linux VM templates for deployment in Cloudturk.

Navigating the Rescue Mode for Linux

Typing some stupidities in text files, databases or whatever, where does it fit? why does it fit there, and how do you access there?

The Art of Virtualization with Free Software

Computer Virtualization in Practice

Comparing Virtualization Technologies

Virtualization and Other Tricks.

Professional Xen Visualization

Operating Systems Virtualization mechanisms

Linux Disaster Recovery best practices with rear

Linux Disaster Recovery best practices with rear

VMware Server 2.0 Essentials. Virtualization Deployment and Management

Deploying a Virtual Machine (Instance) using a Template via CloudStack UI in v4.5.x (procedure valid until Oct 2015)

Linux System Administration on Red Hat

Relax and Recover (rear) Workshop

RedHat (RHEL) System Administration Course Summary

Module I-7410 Advanced Linux FS-11 Part1: Virtualization with KVM

Practical Applications of Virtualization. Mike Phillips IAP 2008 SIPB IAP Series

GL-250: Red Hat Linux Systems Administration. Course Outline. Course Length: 5 days

Linux Software Raid. Aug Mark A. Davis

Linux System Administration and Shell Scripting

RH033 Red Hat Linux Essentials or equivalent experience with Red Hat Linux..

Cloning Complex Linux Servers

How To Manage Your Volume On Linux (Evms) On A Windows Box (Amd64) On A Raspberry Powerbook (Amd32) On An Ubuntu Box (Aes) On Linux

USB Bare Metal Restore: Getting Started

Support for Storage Volumes Greater than 2TB Using Standard Operating System Functionality

Virtualization in Linux

TimeIPS Server. IPS256T Virtual Machine. Installation Guide

ENTERPRISE LINUX SYSTEM ADMINISTRATION

w1r3 Network Documentation

WES 9.2 DRIVE CONFIGURATION WORKSHEET

TECHNICAL HOWTO. Imaging Linux systems with hardware changes. author:

Converting Linux and Windows Physical and Virtual Machines to Oracle VM Virtual Machines. An Oracle Technical White Paper December 2008

Virtual Hosting & Virtual Machines

Advanced Server Virtualization: Vmware and Microsoft Platforms in the Virtual Data Center

Linux Backups. Russell Adams Linux Backups p. 1

Definitions. Hardware Full virtualization Para virtualization Hosted hypervisor Type I hypervisor. Native (bare metal) hypervisor Type II hypervisor

How to Install Windows on Xen TM 3.0

Asterisk Xenified. Saúl Ibarra Corretgé

Virtualization: Know your options on Ubuntu. Nick Barcet. Ubuntu Server Product Manager

Virtualization and Performance NSRC

Virtualization analysis

13.1 Backup virtual machines running on VMware ESXi / ESX Server

Virtualization. Michael Tsai 2015/06/08

CSE 501 Monday, September 09, 2013 Kevin Cleary

Windows Template Creation Guide. How to build your own Windows VM templates for deployment in Cloudturk.

The Logical Volume Manager (LVM)

CBMR for Linux v6.2.2 User Guide

LVM and Raid. Scott Gilliland

README.TXT

9/26/2011. What is Virtualization? What are the different types of virtualization.

Installing & Using KVM with Virtual Machine Manager COSC 495

System administration basics

IOS110. Virtualization 5/27/2014 1

Restoring a Suse Linux Enterprise Server 9 64 Bit on Dissimilar Hardware with CBMR for Linux 1.02

PARA-VIRTUALIZATION IMPLEMENTATION IN UBUNTU WITH XEN HYPERVISOR Bachelor Thesis by: Gabriel IRO & Mehmet Batuhan ÖZCAN

Oracle VM Server Recovery Guide. Version 8.2

LVM2 data recovery. Milan Brož LinuxAlt 2009, Brno

Options in Open Source Virtualization and Cloud Computing. Andrew Hadinyoto Republic Polytechnic

LSN 10 Linux Overview

PARALLELS SERVER BARE METAL 5.0 README

Intro to Virtualization

Anh Quach, Matthew Rajman, Bienvenido Rodriguez, Brian Rodriguez, Michael Roefs, Ahmed Shaikh

2. Boot using the Debian Net Install cd and when prompted to continue type "linux26", this will load the 2.6 kernel

PARALLELS SERVER 4 BARE METAL README

NI Real-Time Hypervisor for Windows

Configuring Virtual Blades

Adaptec ASR-7805/ASR-7805Q/ASR-71605/ASR-71605Q/ASR-71605E/ASR-71685/ASR SAS/SATA RAID Controllers AFM-700 Flash Backup Unit

Unix System Administration

RocketRAID 2640/2642 SAS Controller Ubuntu Linux Installation Guide

Comparing Free Virtualization Products

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD Course Outline CIS INTRODUCTION TO UNIX

These application notes are intended to be a guide to implement features or extend the features of the Elastix IP PBX system.

Make a Bootable USB Flash Drive from the Restored Edition of Hiren s Boot CD

GLS250 "Enterprise Linux Systems Administration"

How to Restore a Linux Server Using Bare Metal Restore

Quick Start - Virtual Server idataagent (Microsoft/Hyper-V)

A candidate following a programme of learning leading to this unit will be able to:

Acronis Backup & Recovery 10 Server for Linux. Command Line Reference

Installing VMware Tools on Clearswift v4 Gateways

Virtualization. Types of Interfaces

What this document covers: Physical to Virtual Migration with Portlock Storage Manager

Installation GENTOO + RAID sur VMWARE

Virtualization Technology

Transcription:

Backup, Booten,,, Linux LV, WU Wien May 9, 2014 Copyleft: This Document may be distributed under GNU GFDL or under Creative Commons CC BY-SA 3.0 Backup, Booten,,,

Table of contents 1 Backup 2 3 4 5 Backup, Booten,,,

: The Problem Backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware Metadata (Permissions, Timestamps, Symlinks, Hardlinks, Device Files) Multiple versions of Files Sparse Files Easy restore in case of an emergency In some cases: encryption Backup, Booten,,,

tar - the classic Backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware # tar cfpz dip.tgz diplomarbeit/ # tar tfvz dip.tgz # cd / ; mount /bla # tar one-filesystem -c -p -f -. \ (cd /bla/ && tar xfvp - ) # tar... ssh nachbarserver \ "cd /bla/ && tar xfvp - " # nc -l -p 7777 tar xfvlp - # tar... nc otherhost 7777 Backup, Booten,,,

tar - incremental backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware option --newer oder -N or option --files-from oder or -T and create the list of files with an other program. e.g find # find. -ctime -2 >backup.list # tar -c -T backup.list -z -f backup.tgt encrypting with gpg # tar... gpg -c > backup.tgz.gpg Backup, Booten,,,

rsync Backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware # mount /backup exit 1 # cd / # rsync -Hxa --delete. /backup # umount /backup rsync: also works remote over ssh or dedicated rsync server Backup, Booten,,,

duplicity - encrypted backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware # apt-get install duplicity # duplicity /home/anna/ \ file:///ext/duplicity/ # duplicity /home/anna \ scp://karl@woanders.at:/bla/ Do not forget your passphrase backends: local, ssh/scp, rsync, ftp # apt-get install duplicity Backup, Booten,,,

Enterprise Backup Backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware Enterprise features central backup for many hosts database of backuped files managing tape library Backup, Booten,,,

Enterprise Backup Backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware Enterprise features central backup for many hosts database of backuped files managing tape library Enterprise Backup Systems bacula... free tivoli... commercial (IBM) Backup, Booten,,,

Bacula Overview Backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware bacula-dir director controls all other daemons bacula-fd file daemon daemon that runs on each client bacula-sd storage daemon actual backup (tape handling, etc,... ) Backup, Booten,,,

cron Backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware backup periodically and automatically. e.g.: via cron. cron start processes at certain configurable times. E.g.: each sunday night at 3:17 system wide configuration is at: /etc/crontab each user can have his/her own crontab: crontab -e Backup, Booten,,,

example crontab Backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware 53 3 * * * /root/meinbackup.sh >> /var/log/backup.log 2>&1 13 07 * * 0 /root/sonntagmorgens.sh 01,21,41 * * * * /root/3malprostunde 17 */3 * * 1-4 /root/8mal_mo-do.sh # 0:17 3:17 6:17.. each monday till thursday 30 7 1-24 12 * /root/advent.sh important PATH=... in the system wide crontab there is an additional column that specifies the user. Backup, Booten,,,

- Summing up Backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware keep a backup off-site keep older versions test a restore once in a while Backup, Booten,,,

Hardware Backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware Cheap Solution - 2 External USB Disks e.g. change weekly keep one off-site costs e90/3tb keep a backup off-site keep older versions test a restore once in a while Backup, Booten,,,

Hardware Backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware Cheap Solution - 2 External USB Disks e.g. change weekly keep one off-site costs e90/3tb keep a backup off-site keep older versions test a restore once in a while Enterprise - Tape Library tape drive starting e1200 tape media (LTO5) e25/1.5tb tape library starting at e5000 Backup, Booten,,,

Possible Setup Backup The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware rsync to different server in different bilding keep old version via btrf snapshots additional regular full backup to tapes Backup, Booten,,,

Cloning your System with tar The Problem tar - the classic rsync, duplicity Enterprise Backup, Bacula cron - automatizing backup Backup - Summing up, Hardware # cd / # tar --one-filesystem -c -p -f -. \ netcat otherhost 7777 easy with above tar or with dd if=/dev/sda do not forget to change hostname ip address ssh-key persistent devices /etc/udev/rules.d/ (MAC address) Backup, Booten,,,

Software Software is not a Backup Backup, Booten,,,

Software Software is not a Backup Advantages of Software Raid compared to hardware raid no vendor dependent tools for setup, repair and monitoring on a partition by partition basis over disks on different controller cards not much overhead for 1 with todays CPU speed: even higher levels in software possible Backup, Booten,,,

Software mdadm # mdadm create /dev/md0 \ -l1 -n2 /dev/sdb7 /dev/sdc7 # mkfs.ext3 /dev/md0 After a disk failure: # mdadm --manage /dev/md0 \ --add /dev/sde5 Backup, Booten,,,

Software /proc/mdstat # cat /proc/mdstat Personalities : [raid1] md2 : active raid1 sdc3[1] sdb3[0] 146480576 blocks [2/2] [UU] md3 : active raid1 sdc4[1] sdb4[0] 159252224 blocks [2/2] [UU] config file (important for monitoring!) /etc/mdadm/mdadm.conf Backup, Booten,,,

Linux Boot Reset root password GRUB kernel auf floppy lilo grub loadlin syslinux, isolinux, pxelinux tftp, nfsroot,... Backup, Booten,,,

From: http://ilostmynotes. blogspot.co.at/2011/01/ linux-boot-process-digram. html (unkown copyright)

Linux Boot Reset root password GRUB The Linux Boot Process BIOS starts GRUB from MBR GRUB loads kernel and inittrd starts kernel with initial RAM-disk initrd loads kernel modules and mounts / with pivot root changes to / and init loaded Backup, Booten,,,

Linux Boot Reset root password GRUB SysV init vs systemd systemd: dependency handling - faster boot times systemd: better monitoring of running services sysvinit: runlevel vs. systemdb targets systemsd: cgroups sysvinit simpler Backup, Booten,,,

Linux Boot Reset root password GRUB How to set a new root password On the GRUB prompt ctrl-e and then use init=/bin/bash kernel parameter. # mount -o remount -rw -n / # passwd # mount -o remount -r -n / # sync # reboot Backup, Booten,,,

Linux Boot Reset root password GRUB Use Live CD to reset root password Use rescue or live CD (knoppix, grml,... ) or similar # sudo bash ; su - # mkdir /bla # mount -t ext3 /dev/sda7 /bla # chroot /bla /bin/bash # passwd # exit ; umount /bla Backup, Booten,,,

Linux Boot Reset root password GRUB Also use it for repair boot sector emergency backup, restore fix hanging boot scripts,... Backup, Booten,,,

Linux Boot Reset root password GRUB GRUB Setup initial install: grub-install /dev/sda directory /boot/grub debian settings /etc/default/grub update-grub to update configuration Sample from the generated /boot/grub/grub.cfg menuentry Debian GNU/Linux, with Linux 2.6.26-1-686 { set root= (mduuid/9c28e79e20828a716cd5a85366beffb2) linux /vmlinuz-2.6.26-1-686 root=uuid=d69d1d3a-4f49-447d-8cd4-b3b56884458c ro s initrd /initrd.img-2.6.26-1-686 } Backup, Booten,,,

Linux Boot Reset root password GRUB example serial console in /etc/default/grub GRUB_CMDLINE_LINUX="console=tty0 console=ttys1,115200n8" GRUB_TERMINAL=serial # for both use: = serial console GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=1 --word= --parity=no --stop=1" in /etc/inittab T1:23:respawn:/sbin/getty -L ttys1 115200 vt100 Backup, Booten,,,

Examples Logical Volume Management - Flexibilty with Disk Layout Snapshots based on device-mapper Terminology: PV (physcial volume) LV (logical volume) VG (volume group) Backup, Booten,,,

Examples Example # pvcreate /dev/sda2 # pvcreate /dev/md1 # vgcreate meinvg /dev/hda2\ /dev/sda2 /dev/md1 # lvcreate -L20G -nmp3lv meinvg # mkfs.ext3 /dev/meinvg/mp3lv # pvscan # lvdisplay Backup, Booten,,,

Examples advanced Snapshots: # lvcreate -L22G -s -n dbbackup \ /dev/meinvg/datenbank Remove Disk: # pvmove /dev/sda2 # vgreduce meingv /dev/sda2 Resize: # lvresize -L +30G /dev/meinvg/mp3lv # resize2fs... Backup, Booten,,,

Definition of virtualization In computing, virtualization is the creation of a virtual (rather than actual) version of something, such as a hardware platform, operating system (OS), storage device, or network resources. While a physical computer in the classical sense is clearly a complete and actual machine, both subjectively (from the user s point of view) and objectively (from the hardware system administrator s point of view), a virtual machine is subjectively a complete machine (or very close), but objectively merely a set of files and running programs on an actual, physical machine (which the user need not necessarily be aware of). Backup, Booten,,,

Types of Backup CPU Emulation - e.g.: VICE (C64 Emulator), QEMU Hardware - e.g.: on native CPU (e.g. KVM, VMware, UML) Containers (Shared Kernel) - e.g: chroot, BSD Jails, OpenVZ, Linux-VServer (Operating system-level virtualization) Cool Feature: using QEMU to work with chroots of different CPU types. Backup, Booten,,,

Type1 vs. Type2 Hypervisor Type 1 (or native) runs directly on hardware - e.g. Xen, KVM, VMware ESX/ESXi, Hyper-V Type2 (hosted) runs under OS:- e.g. VMware Workstation and VirtualBox, all CPU emulators Backup, Booten,,,

Emulation Microsoft Virtual PC x86 to x86, powerpc to x86 only runs on windows and osx, limited number of guest OS QEMU Host CPU: x86, x86-64, IA-64, PowerPC, SPARC 32/64, ARM, S/390, MIPS Target CPU: x86, x86-64, ARM, CRIS, LM32, MicroBlaze, MIPS, SPARC 32/64, PowerPC, M68k, Alpha, S/390, Unicore32, SH4, xtensa Backup, Booten,,,

KVM, Xen, VMware compared Xen Dedicated small Hypervisor, Most Hardware Emulation with support from Dom0 KVM Fullblown Linux Kernel as Hypervisor, needs assitance from the CPU (only newer CPUs), uses the QEMU Framwork for handling of virtual machines and hardware VMware-Server ESX as Hypervisor, Dom0 Linux just for maintenance, Most Hardware drivers integrated in ESX. Backup, Booten,,,

Paravirtualization The guest operating system is aware of the fact that it is running virtualized and helps the host system in its tasks. e.g.: adding device drivers that are optimized for virtualization. Backup, Booten,,,

Why are we using virtualization anyways? Efficient hardware utilization: many small servers do not need 100% of CPU all the time Administrative isolation Secruity barriers Redundancy, protection against hardware failure Backup, Booten,,,

more topics KVM/QEMU hands on libvirt handson pacemaker simulation of networking shared storage disk formats Backup, Booten,,,