Linux Lab 11 Partitioning%2c Lvm

  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Linux Lab 11 Partitioning%2c Lvm as PDF for free.

More details

  • Words: 392
  • Pages: 1
Linux Workshop

Lab 11 Partitioning, LVM Requirements

Quick Reference Objectives to learn

➢ Linux distribution with LVM support ➢ Free unpartitioned space available for extending

Partitioning

#Three example tools (as root):

fdisk /dev/hda parted /dev/hdb cfdisk /dev/sda df -h du -h fdformat /dev/fd0H1440 mkdosfs /dev/fd0 #LVM

#Partition master disk on primary channel #Partition slave disk on primary channel #Partition first serial disk #Show disk free space (-human readable) #Show disk usage (-human readable) #Low level floppy disk format #High level floppy disk format #Logical Volume Management (8e):

lvm

#Show LVM commands

pvdisplay

#Show physical volumes

vgdisplay

#Show volume groups

the volume group (such as the partition scheme of Lab 1)

lvdisplay

To Do 1. Change the IP address of your machine using vi for changing the configuration file (e.g. ifcfg-eth0). 2. Change the default runlevel from 5 to 3. 3. Create a user with your username. 4. Login to the GUI with your username and do the following exercises.

fdisk

#Show logical volumes /dev/sdb

partprobe

#Create partition type '8e', e.g. sdb2 #Reread the partition table without reboot

pvcreate

/dev/sdb2

#Create physical volume

vgcreate

system /dev/sdb2

#Create volume group 'system'

vgextend

system /dev/sdb2

#Extend volume group 'system'

lvcreate

-L 4M -n data system #Create logical volume 'data' on 'system'

mkfs.reiserfs /dev/system/data

#Format lv. Or e.g: mke2fs -j /dev/sys...

vi /etc/fstab

#Edit to survive a reboot

mount -a

#Mount all stuff from /etc/fstab

lvextend -L +2G /dev/system/lv-tmp#Resize logical volume. Resize fs: e2fsadm -L +2G /dev/system/lv-tmp#Includes an lv resize

5. Create a logical volume /dev/system/data for mounpoint /data with the reiser file system.

resize_reiserfs -s+2G /dev/system/tmp

6. Extend the /tmp file system with 2GB.

mkdir

/snapdir

mount

-o remount,ro /data

7. Create a snapshot volume of /data called snap.

lvcreate

-s -L 5M -n snap /dev/system/data

mount

-o remount,rw /data

mount

/dev/system/snap /snapdir #Backup snapdir. Run after backup:

umount

/snapdir

lvremove

/dev/system/snap

#Create and use an LVM Snapshot Volume named 'snap':

Theory Modules LPIC 1 Certification Bible, isbn 0-7645-4772-0 ➢ p. 21-27 Partitioning schemes Downloadable manual(www.novell.com/documentation) SUSE LINUX Enterprise Server – Install. and Admin. ➢ p. 22-29 Expert Partitioning with YaST ➢ p. 138-144 LVM Configuration

Extra References ➢ www.tldp.org ➢ Quick Reference 2, page 2, column 1: ● User and Group Management ● Start and Stop ➢ Lab 00 Prerequisites Installing, LVM, RAID

© October 2, 2005, wiki.novell.com/index.php/Roberts_Quick_References, author of Foundations of Linux networking

Related Documents

Lvm
June 2020 6
Lab 11
November 2019 18
Lab 11
June 2020 13
Linux Lab 21 Firewall
December 2019 21