Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

147 lines (124 sloc) 3.781 kb
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Fun with LVM</title>
<!-- metadata -->
<meta name="version" content="S5 1.1" />
<meta name="presdate" content="20080229" />
<meta name="author" content="Jozef Kutej"/>
<meta name="company" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!-- configuration parameters -->
<meta name="defaultView" content="slideshow" />
<!-- <meta name="defaultView" content="outline" /> -->
<meta name="controlVis" content="hidden" />
<!-- style sheet links -->
<link rel="stylesheet" href="ui/default/slides.css" type="text/css" media="projection" id="slideProj" />
<link rel="stylesheet" href="ui/default/outline.css" type="text/css" media="screen" id="outlineStyle" />
<link rel="stylesheet" href="ui/default/print.css" type="text/css" media="print" id="slidePrint" />
<link rel="stylesheet" href="ui/default/opera.css" type="text/css" media="projection" id="operaFix" />
<!-- S5 JS -->
<script src="ui/default/slides.js" type="text/javascript"></script>
<!-- syntax highlighting -->
<link rel="stylesheet" type="text/css" href="ui/sh/sh_style.css" />
<script type="text/javascript" src="ui/sh/sh_main.js"></script>
<script type="text/javascript" src="ui/sh/sh_perl.js"></script>
<script type="text/javascript" src="ui/sh/sh_sql.js"></script>
</head>
<body><!-- onload='sh_highlightDocument();' -->
<div class="layout">
<div id="controls"><!-- DO NOT EDIT --></div>
<div id="currentSlide"><!-- DO NOT EDIT --></div>
<div id="header"></div>
<div id="footer">
<!-- added by Jozef :) -->
<div id="counter" style="float: right; margin-right: 10px;">15</div>
<span id="ignoreClicks" />
<h1>3. Mar 2007</h1>
<h2>Fun with LVM</h2>
</div>
</div>
<div class="presentation">
<div class="slide">
<h1>Fun with LVM</h1>
<h3>Jozef</h3>
<!-- <p><img src=''/></p> -->
</div>
<div class="slide">
<h1>Basics</h1>
<h2>apt-get install lvm2 dmsetup</h2>
<ul>
<li>pv - physical volume</li>
<li>vg - volume group</li>
<li>lv - logical volume</li>
</ul>
</div>
<div class="slide">
<h1>PV</h1>
<h2>Physical volume</h2>
<ul>
<li>pvcreate /dev/hdb</li>
<li>pvscan -v -u</li>
<li>pvmove -v /dev/hdb</li>
</ul>
</div>
<div class="slide">
<h1>VG</h1>
<h2>Volume group</h2>
<ul>
<li>vgcreate vg00 /dev/hdb</li>
<li>vgdisplay -v</li>
<li>vgextend vg00 /dev/hdd</li>
<li>vgreduce vg00 /dev/hdb</li>
<li>why more than one vg?</li>
</ul>
</div>
<div class="slide">
<h1>LV</h1>
<h2>Logical volume</h2>
<ul>
<li>lvcreate -n test1 -L 200M vg00</li>
<li>mkfs.ext3 -m0 /dev/mapper/vg00-test1</li>
<li>mount /dev/mapper/vg00-test1 /mnt</li>
<li>df -h</li>
<li>vgdisplay -v</li>
<li>lvextend -L 400M vg00/test1</li>
<li>resize2fs /dev/mapper/vg00-test1 400M</li>
<li># lvreduce -L 150M vg00/test1</li>
<li># lvremove vg00/test1</li>
</ul>
</div>
<div class="slide">
<h1>migrating</h1>
<h2>stop using /dev/hdd</h2>
<ul>
<li>vgdisplay -v</li>
<li>vgextend vg00 /dev/hdb</li>
<li>pvmove -v /dev/hdd</li>
<li>vgreduce vg00 /dev/hdd</li>
<li>vgdisplay -v</li>
<li>badblocks -s -v -w /dev/hdd</li>
</ul>
</div>
<div class="slide">
<h1>physical?</h1>
<h2>what can be pv</h2>
<ul>
<li>/dev/hdb</li>
<li>/dev/hdb2</li>
<li>/dev/md0</li>
<li>iSCSI</li>
<li>any other block device</li>
</ul>
<p>it's always fun with hotswap</p>
</div>
<!-- <div class="slide" style="background: url('catalyst-tricks/view.jpg') right top no-repeat;"> -->
<div class="slide">
<h1>And that's it...</h1>
<h2>Questions?</h2>
<p style="text-align: center;"><img src="catalyst-tricks/questions.jpg" alt="" title=""></p>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.