<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>lvm &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/lvm/</link>
	<description>Feed of posts on WordPress.com tagged "lvm"</description>
	<pubDate>Sun, 29 Nov 2009 14:15:55 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Logical Volume Manager (LVM)]]></title>
<link>http://sanhom.wordpress.com/2009/11/27/logical-volume-manager-lvm/</link>
<pubDate>Fri, 27 Nov 2009 03:25:11 +0000</pubDate>
<dc:creator>sanhom</dc:creator>
<guid>http://sanhom.wordpress.com/2009/11/27/logical-volume-manager-lvm/</guid>
<description><![CDATA[Title:  Logical Volume Manager (LVM) download Logical Volume Manager]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Title:  Logical Volume Manager (LVM)</p>
<div id="attachment_326" class="wp-caption alignnone" style="width: 32px"><a href="http://sanhom.wordpress.com/files/2009/11/go-bottom.png"><img class="size-full wp-image-326" title="download" src="http://sanhom.wordpress.com/files/2009/11/go-bottom.png" alt="download" width="22" height="22" /></a><p class="wp-caption-text">download</p></div>
<p><a href="http://sanhom.wordpress.com/files/2009/11/logical-volume-manager.doc">Logical Volume Manager</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Att ta ansvar för sina beslut]]></title>
<link>http://cattasbubbla.wordpress.com/2009/11/17/att-ta-ansvar-for-sina-beslut/</link>
<pubDate>Tue, 17 Nov 2009 14:05:40 +0000</pubDate>
<dc:creator>cattasbubbla</dc:creator>
<guid>http://cattasbubbla.wordpress.com/2009/11/17/att-ta-ansvar-for-sina-beslut/</guid>
<description><![CDATA[En av de tjänstemän (Enhetschefen) som åtalats för tjänstefel i samband med en ung killes död, då ha]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>En av de tjänstemän (Enhetschefen) </strong>som åtalats för tjänstefel i samband med en <a href="http://cattasbubbla.wordpress.com/2009/10/28/bra-att-dom-far-sta-till-svars/" target="_blank">ung killes död</a>, då han inte tvångsomhändertogs enligt LVM trots att han uppfyllde alla kriterier, har <a href="http://www.dn.se/nyheter/sverige/tjansteman-domd-efter-missbrukardod-1.996272" target="_blank"><a href="http://www.dn.se/nyheter/sverige/tjansteman-domd-efter-missbrukardod-1.996272" target="_blank">nu </a></a>dömts<a href="http://www.dn.se/nyheter/sverige/tjansteman-domd-efter-missbrukardod-1.996272" target="_blank"> </a><a href="http://www.svd.se/nyheter/inrikes/artikel_3810485.svd" target="_blank">till </a>80 dagsböter. Socialsekreteraren däremot friades helt. Jag kan ju tycka att det är en klen dom, men samtidigt så tycker jag det är jävligt bra att man markerade att han misskött sitt arbete på ett grovt sätt, det är ju inte allt för ofta socialtjänstemän behöver stå till svars för de fel de gör trots att det sannolikt sker i stort sett dagligen runt om i landet att man nonchalerar tex föräldrars rop på hjälp med missbrukande ungdomar/unga vuxna, något som är helt emot den <a href="http://www.google.se/url?sa=t&#38;source=web&#38;ct=res&#38;cd=3&#38;ved=0CBAQFjAC&#38;url=http%3A%2F%2Fwww.notisum.se%2Frnp%2FSLS%2Flag%2F20010453.HTM&#38;ei=aq0CS8DHO8Xd-QbR3az6Dw&#38;usg=AFQjCNFbgDDUFzVW2jIl44EJcUsVyi-bSw&#38;sig2=xuMb5uzbiy4pWhPz5Si-Rw" target="_blank">socialtjänstlag </a>som finns.</p>
<p><strong>Sen får man tycka vad man vill om</strong> att det var grabbens val att missbruka osv, men dessa lagar är till för att följas, och finns just för att många som är inne i ett missbruk inte klarar att hjälpa sig själv. Jag skulle önska att fler var tvungen att ta större ansvar för sina beslut, inte bara inom socialtjänsten utan också inom andra områden som tex rättspsykiatrin. Då kanske vi skulle få ett lite bättre samhälle både för de sjuka, anhöriga och behövande. All heder åt grabbens <a href="http://www.aftonbladet.se/senastenytt/ttnyheter/inrikes/article6138292.ab" target="_blank">föräldrar </a>som drev det vidare, det är inte alla som orkar gå hela vägen då det är så extremt segt att strida mot myndigheter. Den här grabben dog 2004, är det rimligt att det ska ta 5 år att konstatera att ett fel begåtts när det enda man behöver göra är att läsa på vilka kriterier som ska ligga till grund för ett LVM? Det är så uppenbart att man begått ett fel, det finns inga tveksamheter alls om det, så varför ska det ta sån tid?</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[On resizing filesystems and LVM2 logical volumes]]></title>
<link>http://nareshov.wordpress.com/2009/11/13/on-resizing-filesystems-and-lvm2-logical-volumes/</link>
<pubDate>Fri, 13 Nov 2009 07:11:19 +0000</pubDate>
<dc:creator>Naresh</dc:creator>
<guid>http://nareshov.wordpress.com/2009/11/13/on-resizing-filesystems-and-lvm2-logical-volumes/</guid>
<description><![CDATA[I&#8217;ve been using Debian squeeze/sid for a while now (with apt-pinning) and for the past few day]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I&#8217;ve been using Debian squeeze/sid for a while now (with apt-pinning) and for the past few days I&#8217;ve been facing the &#8220;no space left to write&#8221; problem. I used the default LVM2-based disk partitioning scheme offered by the Debian installer. I thought it was okay to have a 6.5G root partition and the rest for the swap and my home partitions. Looks like 6.5G wasn&#8217;t enough for me. And the root and home partitions used the ext4(!) file-systems.</p>
<p>Now, here&#8217;s how you go about reducing your home&#8217;s size and increasing your root&#8217;s size.</p>
<ol>
<li><em>Reduce</em> the <em>filesystem</em> size of the partition which has enough free space to spare using <code>resize2fs</code>.</li>
<li>Then reduce the logical volume in which this filesystem resides using <code>lvreduce</code>.</li>
<li>Now extend the logical volume in which the &#8220;starving&#8221; filesystem resides  using <code>lvextend</code> by the same amount you used in step 2.</li>
<li>Then simply issue <code>resize2fs /dev/VGNAME/LVNAME</code> which should simply fill up the unallocated space in the logical volume it resides.</li>
<li>(optional), if your reduced filesystem doesn&#8217;t mount due to a block-size mismatch, <code>e2fsck</code> it and apply step 4. to it.</li>
</ol>
<p>Glad that it all worked out fine. I didn&#8217;t have to use a live cd to do this (was too lazy for that anyway). I dropped into a vt, unmounted my home (which has the &#8220;important&#8221; data) and performed steps 1 and 2 on it. My root was still mounted while I did steps 3 and 4 on it.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Changing LVM volume group name on RHEL 5.4 ]]></title>
<link>http://adventuresintech.com/2009/11/03/changing-lvm-volume-group-name/</link>
<pubDate>Tue, 03 Nov 2009 21:51:20 +0000</pubDate>
<dc:creator>Ross</dc:creator>
<guid>http://adventuresintech.com/2009/11/03/changing-lvm-volume-group-name/</guid>
<description><![CDATA[I have on occasion wanted to change the name of an LVM volume group (vg) name.  This is not so hard,]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have on occasion wanted to change the name of an LVM volume group (vg) name.  This is not so hard, but if the logical volumes are mounted as system filesystems (/ /var /usr etc)  then it&#8217;s a bit more trouble.  The following was performed on a Redhat Enterprise Linux 5.4 server, but similar steps could be followed on other systems</p>
<p>If the logical volumes could just be deactivated then &#8216;vgrename&#8217; could be run on the live system.  Since / (or /var, /usr) cannot just be unmounted the system has to be rebooted in rescue mode.  The first install disk of RHEL will allow you to do this.  Make sure that you tell it not to detect any installs of RHEL so that the LVM stuff is not activated.  Once you get a shell prompt verify that the volume group is detected (vgscan) and that none of it&#8217;s logical volumes are active (lvscan).  vgrename can now be run:</p>
<pre>vgrename &#60;current vg name&#62; &#60;new vg name&#62;</pre>
<p>Before rebooting a little cleanup needs to be done.  Entries in /etc/fstab have to be changed to reflect the new volume group name and a new initial ramdisk has to be created.   The easisest way to do this is to reboot into rescue mode and let it detect the install of your RHEL system.  Once the shell comes up chroot into the mounted root (assuming the RHEL install was detected).  This should be:</p>
<pre>chroot /mnt/sysinstall</pre>
<p>Now edit /etc/fstab.  Then run:</p>
<p>mkinitrd &#8211;fstab=/etc/fstab &#60;image name&#62; &#60;kernel version&#62;</p>
<p>You should also edit your grub menu.ls to reflect the new name of the volume group that the root file systems is in.</p>
<p>That&#8217;s it!  Now reboot and the new volume group name will be in effect.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[LVM]]></title>
<link>http://gurjotsingh52.wordpress.com/2009/11/01/lvm-2/</link>
<pubDate>Sun, 01 Nov 2009 16:39:17 +0000</pubDate>
<dc:creator>gurjotsingh52</dc:creator>
<guid>http://gurjotsingh52.wordpress.com/2009/11/01/lvm-2/</guid>
<description><![CDATA[LVM (LOGICAL VOLUME MANAGEMENT) LVM stands for Logical Volume Management. Used to manage data on mul]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong><em><span style="text-decoration:underline;">LVM (LOGICAL VOLUME MANAGEMENT)</span></em></strong></p>
<p>LVM stands for Logical Volume Management.</p>
<p>Used to manage data on multiple disks.</p>
<p>Basically it is a file system.</p>
<p>Mainly used to manage database.</p>
<p>ID of LVM is   “8e”</p>
<p>Used where large storage space required.</p>
<p>Increased on line without data loss.</p>
<p>LVM configured in three layers:-</p>
<p>Layer 1 : Physical volume layer</p>
<p>Layer 2 : Volume group  layer</p>
<p>Layer 3 : Logical volume layer</p>
<p><strong><em><span style="text-decoration:underline;">LVM CONFIGURING STEPS</span></em></strong></p>
<p>Create three partitions .(5GB each)</p>
<p>Refresh partition table.</p>
<p>Create physical volume layer of partitions.</p>
<p>Check physical volume layer.</p>
<p>Create volume group layer of partitions.</p>
<p>Check volume group layer and  size.</p>
<p>Create logical volume layer.</p>
<p>Check logical volume layer and size.</p>
<p>Format logical volume in ext3 file system.</p>
<p>Create any directory under /lvm (any name) and mount LVM  permanent in /etc/fstab file.</p>
<p>Refresh mounting table and check mounted lvm and size.</p>
<p><strong><em><span style="text-decoration:underline;">LVM CONFIGURING COMMANDS</span></em></strong></p>
<p>]# fdisk /dev/sda        (Create three partitions)</p>
<p>~]# partprobe /dev/sda</p>
<p>~]# pvcreate /dev/sda5 /dev/sda6 /dev/sda7</p>
<p>~]# pvdisplay</p>
<p>~]# vgcreate vg /dev/sda5 /dev/sda6 /dev/sda7</p>
<p>~]# vgdisplay</p>
<p>~]# lvcreate -L 12GB -n data vg</p>
<p>~]# lvdisplay</p>
<p>~]# mke2fs -j /dev/vg/data</p>
<p>~]# mkdir /lvm</p>
<p>~]# vim /etc/fstab</p>
<p>/dev/vg/data               /lvm                  ext3      defaults   0 0</p>
<p>:wq!</p>
<p>~]# mount -a</p>
<p>~]#df -TH</p>
<p>~]# cd /lvm</p>
<p>~]# ll</p>
<p><strong><em><span style="text-decoration:underline;">LVM EXTEND STEPS</span></em></strong></p>
<p>Create new partition.                    (Size 10GB)</p>
<p>Refresh partition table.</p>
<p>Create physical volume layer of new partition.</p>
<p>Check physical volume layer.</p>
<p>Check volume group layer name and size.</p>
<p>Add new partition in volume group layer.</p>
<p>Check volume group layer.</p>
<p>Check logical volume layer name and size.</p>
<p>Extend logical volume layer.</p>
<p>Check logical volume layer name and size.</p>
<p>On line format logical volume layer.</p>
<p>Check size of mounted LVM.</p>
<p><strong><em><span style="text-decoration:underline;">LVM ENTEND COMANDS</span></em></strong></p>
<p>]# fdisk /dev/sda</p>
<p>~]# partprobe /dev/sda</p>
<p>~]# pvcreate /dev/sda8</p>
<p>~]# pvdisplay</p>
<p>~]# lvdisplay</p>
<p>~]# vgextend vg /dev/sda8</p>
<p>~]# vgdisplay</p>
<p>~]# lvdisplay</p>
<p>~]# lvextend -L+10GB -n /dev/vg/data</p>
<p>~]# lvdisplay</p>
<p>~]# resize2fs /dev/vg/data</p>
<p>~]# df -TH</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Venta de libros usados en la UFM]]></title>
<link>http://homohominilupus.wordpress.com/2009/10/25/venta-de-libros-usados-en-la-ufm/</link>
<pubDate>Sun, 25 Oct 2009 18:15:22 +0000</pubDate>
<dc:creator>condottiero</dc:creator>
<guid>http://homohominilupus.wordpress.com/2009/10/25/venta-de-libros-usados-en-la-ufm/</guid>
<description><![CDATA[El grupo de Amigos de la Biblioteca Ludwig von Mises (perfil en FB) ha organizado una venta de libro]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;"><a href="http://homohominilupus.wordpress.com/files/2008/06/08-de-junio-de-2008-prestar-libros.jpg"><img class="aligncenter" title="bazar de libros usados en la UFM" src="http://noticias.ufm.edu/images/d/d4/091020_Amigos_Biblioteca.jpg" alt="" width="480" height="360" /></a></p>
<p>El grupo de Amigos de la <a title="sitio web de la biblioteca de la UFM" href="http://www.biblioteca.ufm.edu/" target="_self">Biblioteca Ludwig von Mises</a> (<a title="LvM profile - FB" href="http://www.facebook.es/people/Biblioteca-Ludwig-Von-Mises/1059929001" target="_self">perfil en FB</a>) ha organizado una <a title="bazar de libros usados" href="http://noticias.ufm.edu/index.php/Gran_bazar_de_libros_usados" target="_self">venta de libros usados </a>a precios fantásticos.  La actividad inició el lunes pasado y estará abierta hasta el día jueves, 29 de octubre.</p>
<p>Los libros están en venta en el lobby de la Biblioteca Ludwig von Mises de la <a title="sitio web de la universidad" href="https://www.ufm.edu/" target="_self">Universidad Francisco Marroquín</a> (6 Calle final, zona 10. Guatemala).</p>
<p>Yo compré 15 libros (novelas en inglés, filosofía y arte) y sólo pagué 100 quetzales.  Además, si les interesan novelas en inglés en paperback (esta es la mejor oferta) hay cientos de opciones para elegir y podrán llevarse 4 a tan sólo Q10.00</p>
<p style="text-align:center;">¡Espero que puedan visitar la venta de libros!<a href="http://homohominilupus.wordpress.com/files/2008/06/08-de-junio-de-2008-prestar-libros.jpg"><img class="aligncenter size-full wp-image-1059" title="08-de-junio-de-2008-prestar-libros" src="http://homohominilupus.wordpress.com/files/2008/06/08-de-junio-de-2008-prestar-libros.jpg" alt="08-de-junio-de-2008-prestar-libros" width="468" height="157" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Особенности LVM  в Linux и AIX]]></title>
<link>http://rigid.wordpress.com/2009/10/13/%d0%be%d1%81%d0%be%d0%b1%d0%b5%d0%bd%d0%bd%d0%be%d1%81%d1%82%d0%b8-lvm-%d0%b2-linux-%d0%b8-aix/</link>
<pubDate>Tue, 13 Oct 2009 07:34:06 +0000</pubDate>
<dc:creator>rigid</dc:creator>
<guid>http://rigid.wordpress.com/2009/10/13/%d0%be%d1%81%d0%be%d0%b1%d0%b5%d0%bd%d0%bd%d0%be%d1%81%d1%82%d0%b8-lvm-%d0%b2-linux-%d0%b8-aix/</guid>
<description><![CDATA[Никогда до прошлой зимы не сталкивлся с необходимостью поднимать софтовый рейд в линуксе. Когда дела]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Никогда до прошлой зимы не сталкивлся с необходимостью поднимать софтовый рейд в линуксе. Когда делали оракловый сервер под КИС, изучали ОС IBM AIX 5L. Так вот  там в составе ОС, есть такое замечательное средство &#8211; LVM, позволяющее управлять томами, в том числе создавать программные зеркала, страйпы и т.п. Другое дело, что при использовании внешних хранилищ, вроде DS4700, надобность в софтовом рейде отпадает. Зеркалирование настраивается средствами системы хранения.<br />
И вот той зимой понадобилось создать сервер для резервных копий. В качестве ОС был выбран Debian GNU/Linux 5.0, только вышедший. Задачка в общем то казалась не очень сложной, тем более, что в линуксе тоже есть LVM. Но не тут то было. Создал группу томов, добавил физические тома, начал создавать логические с зеркалированием. Тут то и оказалось, что LVM для использования зеркал требуется журнал.Для этих нужд LVM в AIX выделяет область внутри самого зеркального тома, а линуксовая версия предлагает создать отдельный логический том. Это мне не понравилось. Ставить эксперимент не стал, но предполагаю, что в случае смерти одного из винтов, LVM не сумел бы подняться.<br />
На помощь пришел программный рейд на базе mdraid. С помощью этой программы, я создал программные зеркала из четырех пар винтов. Программа создает виртуальные диски /dev/md0, /dev/md1 и так далее. А эти устройства уже можно использовать в качестве физических томов для LVM.<br />
Кстати, еще одна особеннось. В AIX в качестве физического тома может выступать сам винт. В Linux LVM требует наличие на винте раздела и использует уже этот раздел. С чем связано, не знаю.</p>
<p>В итоге всех этих махинаций я имею на севере зеркальный софтрейд на базе mdraid и гибкий LVM поверх этого рейда. Проводил испытания &#8211; все отлично работает при выдергивании винта и добавлеении резервного вместо него.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[En bra start]]></title>
<link>http://greenjessica.wordpress.com/2009/10/10/en-bra-start/</link>
<pubDate>Sat, 10 Oct 2009 20:15:03 +0000</pubDate>
<dc:creator>greenjessica</dc:creator>
<guid>http://greenjessica.wordpress.com/2009/10/10/en-bra-start/</guid>
<description><![CDATA[Socialdemokraterna lägger nu ett förslag om att satsa 90 miljoner på missbruksvården. Det handlar om]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Socialdemokraterna lägger nu ett förslag om att <a href="http://www.svd.se/nyheter/inrikes/artikel_3633243.svd">satsa 90 miljoner på missbruksvården</a>. Det handlar om ett långsiktigt åtagande kallat ett kontrakt för livet som är ett samarbete mellan den enskilde, socialtjänsten och statens institutionstyrelse. Kontraktet ska hjälpa till efter en LVM-placering.</p>
<p>Jag hoppas att mitt parti också är med på detta förslag. Ska vi kunna hjälp missbrukare till ett drägligt liv så behövs långsiktiga helhetslösningar. Idag är det ändå alldeles för ofta så att missbruksvården är för svår att få eftersom många kommuner försöker undvika institutionskostnader så länge som möjligt. Detta kan i värsta fall leda till dyra kostnader för samhället fast på andra konton än socialens, men framför allt kan det leda till onödigt lidande för den som missbrukar och dennes omgivning.</p>
<p>Men ska MP vara med på detta förslag hoppas jag även på en viss modifiering. Jag vill ha incitament för helhetssyn även för dem som inte börjar sina försök till ett annat liv med LVM. Det är bra om det finns fler möjligheter att välja att självmant sluta än att bara satsa på dem som är en fara för sitt eget liv. </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Deplacer Linux Volume Group]]></title>
<link>http://rattyboy.wordpress.com/2009/10/03/deplacer-linux-volume-group/</link>
<pubDate>Fri, 02 Oct 2009 12:50:15 +0000</pubDate>
<dc:creator>rattyboy</dc:creator>
<guid>http://rattyboy.wordpress.com/2009/10/03/deplacer-linux-volume-group/</guid>
<description><![CDATA[C&#8217;est vraiment simple: 1. Desactiver avec vgchange -a n. 2. vgexport le volume 3. Sur le nouve]]></description>
<content:encoded><![CDATA[C&#8217;est vraiment simple: 1. Desactiver avec vgchange -a n. 2. vgexport le volume 3. Sur le nouve]]></content:encoded>
</item>
<item>
<title><![CDATA[How to extend an LVM disk on a VMware virtual machine running a Linux OS]]></title>
<link>http://itbod.wordpress.com/2009/09/29/how-to-extend-an-lvm-disk-on-a-vmware-virtual-machine-running-a-linux-os/</link>
<pubDate>Tue, 29 Sep 2009 21:14:35 +0000</pubDate>
<dc:creator>itbod</dc:creator>
<guid>http://itbod.wordpress.com/2009/09/29/how-to-extend-an-lvm-disk-on-a-vmware-virtual-machine-running-a-linux-os/</guid>
<description><![CDATA[I have had a number of virtual linux machines that have run out of disk space and have found it diff]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have had a number of virtual linux machines that have run out of disk space and have found it difficult in the past to find one solution to increasing the virtual disk and expanding free space into a logical volume.</p>
<p>The most recent example was when I needed to extend from 8GB to 20GB and using the Gnome Partition Editor, Gparted, would not work as it doesn&#8217;t currently have LVM support.</p>
<p>There are some linux commands that get around this problem so first I extended the VMware virtual disk.</p>
<p><u></u> </p>
<p><u>Expand the disk</u></p>
<p>Turn off the virtual machine that you wish to administer.</p>
<p>Open a command prompt and change directory to C:&#8217;Program Files&#8217;VMWare&#8217;VMWare Server or C:&#8217;Program Files&#8217;VMware&#8217;VMware Workstation depending upon what product you are running.</p>
<p>Run this command to expand the virtual disk: <em>vmware-vdiskmanager -x 20GB &#34;My harddisk.vmdk&#34;</em></p>
<p>In my case I would like to increase the disk to 20GB so substitute your value. Include the full file location for the vmdk file and use quotes if there are spaces in the folder and/or filename</p>
<p> <img src="http://itbod.files.wordpress.com/2009/09/image0014.jpg?w=480&#038;h=267" border="0" alt="image001" width="480" height="267" /></p>
<p>The disk expansion should complete successfully</p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0023.jpg?w=480&#038;h=267" border="0" alt="image002" width="480" height="267" /></p>
<p>Restart the VMware virtual machine and open a terminal session</p>
<p>Issue the <em>df -k</em> command which here shows us that the logical volume is at 100% usage</p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0033.jpg?w=553&#038;h=178" border="0" alt="image003" width="553" height="178" /></p>
<p>We need to create a partition on /dev/sda</p>
<p>Type <em>ls -al /dev/sda*</em> which lists the existing partitions</p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0042.jpg?w=554&#038;h=88" border="0" alt="image004" width="554" height="88" /></p>
<p>Our new partition will be /dev/sda3</p>
<p>Type <em>fdisk /dev/sda</em> then type&#8217;<em>n</em>&#8217; for new partition</p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0052.jpg?w=554&#038;h=163" border="0" alt="image005" width="554" height="163" /></p>
<p>Enter ‘p&#8217; and 3 for the partition number (in this instance..obviously enter the partition number that matches your environment)</p>
<p>Also accept the default First and Last cylinders</p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0062.jpg?w=554&#038;h=155" border="0" alt="image006" width="554" height="155" /></p>
<p>Finally type ‘<em>w</em>&#8217; to write table to disk and exit</p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0072.jpg?w=553&#038;h=152" border="0" alt="image007" width="553" height="152" /></p>
<p>If prompted to reboot then do so to ensure that the new partition table is written.</p>
<p>After a restart, type <em>ls -al /dev/sda*</em> to verify whether the new partition was created</p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0082.jpg?w=554&#038;h=75" border="0" alt="image008" width="554" height="75" /></p>
<p>Now that the partition has been created we need to create a physical volume and add it to the volume group</p>
<p>Type <em>pvcreate /dev/sda3</em></p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0092.jpg?w=554&#038;h=57" border="0" alt="image009" width="554" height="57" /></p>
<p>Type <em>vgextend VolGroup00 /dev/sda3</em></p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0101.jpg?w=554&#038;h=53" border="0" alt="image010" width="554" height="53" /></p>
<p>We need to extend the logical volume </p>
<p>Type <em>vgdisplay</em></p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0111.jpg?w=550&#038;h=366" border="0" alt="image011" width="550" height="366" /></p>
<p>Which shows that there is 11.97GB free that we can add to the volume group</p>
<p>To extend the volume type <em>lvextend -L+11.97G /dev/VolGroup00/LogVol00</em></p>
<p>I then had an error message that stated that there was ‘Insufficient free space: 384 extents needed but only 383 available&#8217;</p>
<p>After a quick search:</p>
<p><a href="http://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/nofreeext.html">http://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/nofreeext.html</a></p>
<p>It seems that I needed to select a slightly smaller size. I selected 11GB rather than 11.97GB which solved this problem.</p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0121.jpg?w=554&#038;h=56" border="0" alt="image012" width="554" height="56" /></p>
<p>Finally we need to resize the file system by typing <em>resize2fs /dev/VolGroup00/LogVol00</em></p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0131.jpg?w=553&#038;h=90" border="0" alt="image013" width="553" height="90" /></p>
<p>Type <em>df -k</em> to see if the new space is available to the logical volume</p>
<p><img src="http://itbod.files.wordpress.com/2009/09/image0141.jpg?w=553&#038;h=102" border="0" alt="image014" width="553" height="102" /></p>
<p>The logical volume has now been resized and now has used space of just 35%!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ubuntu Live CD with LVM capability]]></title>
<link>http://balau82.wordpress.com/2009/09/26/ubuntu-live-cd-with-lvm-capability/</link>
<pubDate>Sat, 26 Sep 2009 19:19:06 +0000</pubDate>
<dc:creator>Balau</dc:creator>
<guid>http://balau82.wordpress.com/2009/09/26/ubuntu-live-cd-with-lvm-capability/</guid>
<description><![CDATA[I recently bought a new 1TeraByte hard disk, and tried to understand the possible ways to add it to ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I recently bought a new 1TeraByte hard disk, and tried to understand the possible ways to add it to my existing Ubuntu Linux system.  On a default system, even with separate home and root partitions, it is quite difficult to exploit the added space of a new drive: one could migrate the home partition to the new drive and expand the root partition to cover the whole old drive, but it is not a flexible nor scalable solution. On a Linux system with Logical Volume Management (LVM) instead, all I should do is add the new drive into the volume group to have the possibility to expand both partitions. LVM is a system that stays between the filesystems and the physical drives, and simplifies the management of separate physical volumes by adding abstraction layers (Volume Groups and Logical Volumes). All the information you might need on LVM can be found here: <a href="http://tldp.org/HOWTO/html_single/LVM-HOWTO/">http://tldp.org/HOWTO/html_single/LVM-HOWTO/</a></p>
<p>One problem with LVM is that in order to resize the root partition, the root partition must be unmounted. The easiest way is to boot a Live CD and manage the partitions from there. The Ubuntu Live CD does not support LVM: in order to install an Ubuntu system with LVM, the <a href="http://www.ubuntu.com/getubuntu/downloadmirrors#alternate">alternate installer CD</a> must be used. This CD lacks the live graphical environment of the default Ubuntu desktop CD, and instead offers a text-based installer; the alternate CD lacks also an easy way to manage partition without reinstalling. What I need is a CD that enables both LVM installation and LVM managing, and this tutorial will show how to create it.</p>
<p>There is a very handy and complete guide here to customize Ubuntu Live CD:</p>
<p id="How to Customise the Ubuntu Desktop CD"><a href="https://help.ubuntu.com/community/LiveCDCustomization">How to Customise the Ubuntu Desktop CD</a></p>
<p>In order to build the CD I used a <a href="http://www.virtualbox.org/wiki/Linux_Downloads">VirtualBox </a>virtual machine, but it is not necessary: you just need an Ubuntu machine and administration privileges. The hard disk occupation of the whole process, including the ISO images of the original Live CD and the custom Live CD, is around 3.5GB, so organize your hard disk space accordingly. I downloaded an Ubuntu Jaunty Jackalope desktop CD iso <a href="http://www.ubuntu.com/getubuntu/download">from the official site</a>, and  I followed the guide literally for the sections:</p>
<ul>
<li><a href="https://help.ubuntu.com/community/LiveCDCustomization#Extracting%20the%20CD%20contents">Extracting the CD content</a></li>
<li><a href="https://help.ubuntu.com/community/LiveCDCustomization#Extracting%20the%20Desktop%20system">Extracting the Desktop system</a></li>
<li><a href="https://help.ubuntu.com/community/LiveCDCustomization#Prepare%20and%20chroot">Prepare and chroot</a></li>
</ul>
<p>Then, for the <a href="https://help.ubuntu.com/community/LiveCDCustomization#Customizations">Customizations section</a>, I uninstalled some secondary packages to free space for &#8220;lvm2&#8243; package and then I installed it:</p>
<p><code># apt-get purge gimp gimp-data<br />
# apt-get purge gnome-games gnome-games-data<br />
# apt-get install lvm2</code></p>
<p>I then wanted to install the graphical and user-friendly tool &#8220;system-config-lvm&#8221; package; the package is included under the &#8220;universe&#8221; section that is disabled by default. For this reason I opened the configuration file of the &#8220;apt&#8221; repositories with the command &#8220;nano /etc/apt/sources.list&#8221;, uncommented the deb lines of the &#8220;universe&#8221; section and saved. To have a glimpse of the functionalities of this GUI front-end for LVM you can take a look at the <a href="http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Deployment_Guide-en-US/s1-system-config-lvm.html">relative section in the redhat enterprise manual</a>.</p>
<p><code># apt-get update<br />
# apt-get install system-config-lvm<br />
# apt-get autoremove<br />
# apt-get clean<br />
# apt-get autoclean</code></p>
<p>I then recreate the filesystem image. Since I used Ubuntu Jaunty Jackalope, the kernel release version is 2.6.28-11-generic. You can discover your release using &#8220;ls /lib/modules&#8221;, because the name of that directory corresponds to the kernel version of the original Live CD;<br />
change the following &#8220;mkinitramfs&#8221; command accordingly.</p>
<p><code># mkinitramfs -o /initrd.gz 2.6.28-11-generic</code></p>
<p>Some commands to cleanup the Live CD&#8230;</p>
<p><code># rm -rf /tmp/* ~/.bash_history<br />
# rm /etc/resolv.conf<br />
# proc "&#62;umount /proc &#124;&#124; umount -lf /proc<br />
# umount /sys<br />
# umount /dev/pts<br />
# exit<br />
</code></p>
<p>Then, in the normal command prompt, I moved the filesystem image (initrd.gz) into the casper directory like the tutorial says:</p>
<p><code>$ sudo umount edit/dev &#124;&#124; sudo umount -lf edit/dev<br />
$ sudo mv edit/initrd.gz extract-cd/casper/<br />
</code></p>
<p>I then followed literally the <a href="https://help.ubuntu.com/community/LiveCDCustomization#Putting%20the%20CD%20together">&#8220;Putting the CD together&#8221; section</a>, and at the end I had an iso image of a complete Ubuntu Live CD with LVM support.</p>
<p>I hope to find the time to do a screencast on how to install Ubuntu with this custom CD and how to modify an already installed LVM system.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[mkinitrd: ativar módulo usb durante boot]]></title>
<link>http://vosiro.wordpress.com/2009/09/20/mkinitrd-ativar-modulo-usb-durante-boot/</link>
<pubDate>Sun, 20 Sep 2009 05:34:25 +0000</pubDate>
<dc:creator>Vinícius Osiro</dc:creator>
<guid>http://vosiro.wordpress.com/2009/09/20/mkinitrd-ativar-modulo-usb-durante-boot/</guid>
<description><![CDATA[Caso seu Slackware Linux seja todo criptografado e você tenha que colocar a senha para descriptograf]]></description>
<content:encoded><![CDATA[Caso seu Slackware Linux seja todo criptografado e você tenha que colocar a senha para descriptograf]]></content:encoded>
</item>
<item>
<title><![CDATA[On Reinstalls -- Or "Nirik, what does -i do?"]]></title>
<link>http://hackersramblings.wordpress.com/2009/08/30/on-reinstalls-or-nirik-what-does-i-do/</link>
<pubDate>Sun, 30 Aug 2009 05:24:05 +0000</pubDate>
<dc:creator>Ryan Rix</dc:creator>
<guid>http://hackersramblings.wordpress.com/2009/08/30/on-reinstalls-or-nirik-what-does-i-do/</guid>
<description><![CDATA[So, after I got my laptop back, I decided to put that 500GiB hdd to good use, and opened up my lapto]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>So, after I got my laptop back, I decided to put that 500GiB hdd to good use, and opened up my laptop and swapped the drives (YOU DIDNT READ THAT!), and proceeded to reinstall my system from the backup 160GiB hdd (which Asus ended up not erasing at all&#8230; heh) Talking in IRC got me a few different methods of doing this. The easiest and final decision thanks to Ben (aka mathstuf of #fedora-kde) was:</p>
<p>Run on the source:<br />
rpm -qa &#8211;qf &#8220;%{name}&#8221; &#62; packagelist.txt</p>
<p>And on the target:<br />
cat packagelist.txt &#124; xargs yum install</p>
<p>Because the yum install of some 1700 packages took about an hour to setup of the download, and it took me three tries before I gave up due to dependancy hell, I decided to add just a tiny little &#8211;max-args 10 to the xargs, giving me a final command of `cat packagelist.txt &#124; xargs &#8211;max-args 10 yum install` which worked beautifully after about two hours of installs.</p>
<p>After that getting /home off the device was fairly trivial, though it took me two runs because I missed the DOT dirs the first time around, I ended up with the following command:</p>
<p>/bin/cp -arvf /media/home/* /home/</p>
<p>The command references /bin/cp to get around Fedora&#8217;s default alias which is to include -i, which makes overwriting many files utter hell. After that I simply rebooted and started KDE, just like it&#8217;d been before <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To mount the LVM Fedora creates on first install (HAL doesn&#8217;t detect LVMs):<br />
su -<br />
lvscan<br />
vgchange -a y<br />
mount /dev/vg_hostname/lv_root</p>
<p>The post is brought to you by <a href="http://fedorahosted.org/lekhonee">lekhonee</a> v0.7</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[החלפת דיסקים עם LVM]]></title>
<link>http://kaplanopensource.wordpress.com/2009/08/21/%d7%94%d7%97%d7%9c%d7%a4%d7%aa-%d7%93%d7%99%d7%a1%d7%a7%d7%99%d7%9d-%d7%a2%d7%9d-lvm/</link>
<pubDate>Fri, 21 Aug 2009 19:39:43 +0000</pubDate>
<dc:creator>Lior Kaplan</dc:creator>
<guid>http://kaplanopensource.wordpress.com/2009/08/21/%d7%94%d7%97%d7%9c%d7%a4%d7%aa-%d7%93%d7%99%d7%a1%d7%a7%d7%99%d7%9d-%d7%a2%d7%9d-lvm/</guid>
<description><![CDATA[את המערכת שלי העברתי ל-LVM לפני כשנה, בתקופה שהתעסקתי הרבה עם LVM על שרתים. כעת, אחרי שנה שלמה שלא נ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>את המערכת שלי <a href="http://kaplanopensource.wordpress.com/2008/08/09/%D7%9E%D7%A2%D7%91%D7%A8-%D7%9C-lvm/">העברתי ל-LVM</a> לפני כשנה, בתקופה שהתעסקתי הרבה עם LVM על שרתים. כעת, אחרי שנה שלמה שלא נגעתי ב-LVM של לינוקס (התעסקתי עם מנגנונים דומים של חברות מסחריות), עלה אצלי הצורך להעביר את כל המידע מהדיסק שלי לדיסק חדש.</p>
<p>הבעיות:</p>
<ul>
<li>אני דיי חלוד עם LVM</li>
<li>שני הדיסקים שלי (ישן+חדש) מכילים PV על כל שטח הדיסק.</li>
<li>יש VG שונה על כל אחד מהדיסקים.</li>
<li>אני צריך את המידע על הדיסק החדש, ולא יכול למחוק אותו.</li>
</ul>
<p>תיאורטית, המצב אמור להיות פשוט &#8211; מזהים את הדיסק החדש, יוצרים עליו PV, מגדילים את ה-VG ומשתמשים ב-pvmove כדי להעביר את המידע בין הדיסקים. אך בגלל שעל הדיסק החדש כבר יש PV  בכל שטח הדיסק שעליו יושב VG נפרד, המצב הרבה יותר מסובך.</p>
<p>עם קצת בירורים, מסתבר שיש את הפקודה vgmerge שמאפשר למזג VG אחד לתוך VG אחר. רק צריך לוודא שיש מספיק מקום פנוי ושאין LVים באותו השם (ואם כן אז לשנות להם את השם). פשוט מאוד, אך מסתבר שבשביל זה צריך שהיה אותו גודל PE (גדול בלוק של ה-PV) בשני ה-VGים. מאחר וברירת המחדל עבור גודל ה-PE השתנתה מ-2M ל-4M, נתקעתי עם הגדרות שונות לכל VG.</p>
<p>כאן פחות או יותר התחיל סרט רע שכלל הרבה שינוי גודל ל-FSים, LVים ו-PVים כדי לאפשר את שינוי הגודל מ-2M ל-4M. כל המשחקים הובילו אותי להודעות שגיאה מעצבנות בזמן ניסיון לשנות את גדול הבלוק. ההודעות טענו שהגודל החדש אינו כפולה של גדול הבלוק, ולכן לא ניתן לבצע את השינוי. כנראה שמדובר בבאג, כי אין סיכוי ש-PV בגודל של מספר G עגולים, לא יתחלק ב-4M, אבל נשאיר את זה לפעם אחרת.</p>
<p>לאחר הרבה משחקים, שבהם בעיקר דאגתי לעצמי לתרגול פקודות LVM ו-FSים, פתרתי את הבעיה ע&#8221;י שינוי גודל הבלוק של ה-PV בדיסק החדש מ-4M ל-2M. השינוי היה קל ומהיר. לאחר שהתגברתי על הבעיה הזאת, נשאר להעביר את המידע עצמו עם pvmove.</p>
<p>אז כמה טיפים על pvmove (<a href="http://liorkaplan.wordpress.com/2008/01/17/who-moved-my-pes-or-why-does-pvmove-sucks-on-linux/">בעקבות בעיות בעבר</a>). הראשון הוא שמומלץ להשתמש באופציה ה-verbose של הפקודה כדי לקבל דיווח על ההתקדמות, אחרת יש הרגשה שהכל תקוע. דבר שני, ביטול הפקודה לא נעשה עם CTRL+C אלא עם הרצת pvmove &#8211;abort ממסוף אחר (קצת בעייתי ב-Single User). ולבסוף, פקודות LVM אחרת יתקעו לכם בזמן הריצה של pvmove כתוצאה מנעילות.</p>
<p>הפקודה עובדת בצורה מסודרת, ומבטיחה כי גם בזמן תקלה, המידע לא ילך לאיבוד. תחילה מבוצע שיריון של שטח היעד כולו, כדי לראות שאפשר לבצע את המעבר. לאחר מכן ננעל שטח יעודי עבור ה-PE שרוצים להעביר והוא משוכפל לשטח החדש. לאחר השכפול מבוצעת מחיקה של השטח הישן. סה&#8221;כ העברתי כ-60G עם הפקודה ללא שום בעיות.</p>
<p>לסיום התהליך נשאר להעיף את ה-PV הישן, לשנות את גודל ה-PE חזרה ל-4M (הפעם עבר ללא בעיות) וזהו.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[3. Creating a file system on a logical volume]]></title>
<link>http://voxnix.wordpress.com/2009/07/30/3-creating-a-file-system-on-a-logical-volume/</link>
<pubDate>Thu, 30 Jul 2009 07:41:31 +0000</pubDate>
<dc:creator>voxware</dc:creator>
<guid>http://voxnix.wordpress.com/2009/07/30/3-creating-a-file-system-on-a-logical-volume/</guid>
<description><![CDATA[lvcreate -L 16 -n datavol vg01 &#8212;&gt; 16mb lvdisplay /dev/vg01/datavol ls -l /dev/vg01 &#8212;]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>lvcreate -L 16 -n datavol vg01 &#8212;&#62; 16mb</p>
<p>lvdisplay /dev/vg01/datavol</p>
<p>ls -l /dev/vg01 &#8212;&#62; verify DSF</p>
<p>newfs -F vxfs /dev/vg01/rdatavol</p>
<p>mkdir /data</p>
<p>mount /dev/vg01/datavol /data</p>
<p>echo &#8220;/dev/vg01/datavol /data vxfs defaults 0 2&#8243; &#62;&#62; /etc/fstab</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[2. Creating new volume group]]></title>
<link>http://voxnix.wordpress.com/2009/07/30/2-creating-new-volume-group/</link>
<pubDate>Thu, 30 Jul 2009 07:38:45 +0000</pubDate>
<dc:creator>voxware</dc:creator>
<guid>http://voxnix.wordpress.com/2009/07/30/2-creating-new-volume-group/</guid>
<description><![CDATA[pvcreate /dev/rdisk/disk40 mkdir /dev/vg01 chown root:root /dev/vg01 chmod 755 /dev/vg01 mknod /dev/]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>pvcreate /dev/rdisk/disk40</p>
<p>mkdir /dev/vg01</p>
<p>chown root:root /dev/vg01</p>
<p>chmod 755 /dev/vg01</p>
<p>mknod /dev/vg01/group c 64 0&#215;010000</p>
<p>chown root:sys /dev/vg01/group</p>
<p>chmod 640 /dev/vg01/group</p>
<p>vgcreate -s 16 /dev/vg01/group &#8212;&#62;16mb</p>
<p>vgdisplay -v vg01</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[1. Getting Information]]></title>
<link>http://voxnix.wordpress.com/2009/07/30/identify-available-disks/</link>
<pubDate>Thu, 30 Jul 2009 07:13:42 +0000</pubDate>
<dc:creator>voxware</dc:creator>
<guid>http://voxnix.wordpress.com/2009/07/30/identify-available-disks/</guid>
<description><![CDATA[Identify Available disks on system ioscan -fnkNC disk ioscan -m dsf ioscan -P health Getting informa]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Identify Available disks on system</strong></p>
<p>ioscan -fnkNC disk</p>
<p>ioscan -m dsf</p>
<p>ioscan -P health</p>
<p><strong>Getting information about LVM volumes on the system</strong></p>
<p>mount</p>
<p>strings /etc/lvmtab</p>
<p>bdf</p>
<p><strong>Getting information abount the current LVM Objects</strong></p>
<p>vgdisplay vg00</p>
<p>vgdisplay -v vg00 &#124;grep &#8220;LV Name&#8221;</p>
<p>lvdisplay -v /dev/vg00/lvol1</p>
<p><strong>Verify disk belongs to volume group which is inactive or not imported</strong></p>
<p>pvdisplay -l /dev/disk/disk*</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Crypted-LVM-Disc mounten]]></title>
<link>http://rushead.wordpress.com/2009/07/02/crypted-lvm-disc-mounten/</link>
<pubDate>Thu, 02 Jul 2009 10:52:51 +0000</pubDate>
<dc:creator>rushead</dc:creator>
<guid>http://rushead.wordpress.com/2009/07/02/crypted-lvm-disc-mounten/</guid>
<description><![CDATA[Da meine gesamte Festplatte mit LVM verschlüsselt ist, ist es bei einem Problem etwas komplizierter ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Da meine gesamte Festplatte mit LVM verschlüsselt ist, ist es bei einem Problem etwas komplizierter auf die Festplatte zuzugreifen.<br />
Als Live-CD habe ich die Ubuntu 9.04 Desktop (alle Versionen abwärts haben Probleme mit dem X-Server) verwendet.</p>
<ol>
<li>sudo apt-get install cryptsetup lvm2</li>
<li><span style="font-size:85%;"><span style="font-family:arial;">sudo cryptsetup luksOpen /dev/sda1 root</span></span></li>
<li><span style="font-size:85%;"><span style="font-family:arial;">sudo lvmdiskscan</span></span></li>
<li><span style="font-size:85%;"><span style="font-family:arial;">sudo vgchange -ay</span></span></li>
<li><span style="font-size:85%;"><span style="font-family:arial;">ls -l /dev/mapper</span><br />
<span style="font-family:arial;">crw-rw&#8212;- 1 root root  10, 63 May  2 11:43 control</span><br />
<span style="font-family:arial;">brw-rw&#8212;- 1 root disk 254,  0 May  2 11:50 DEVICENAME</span><br />
<span style="font-family:arial;">brw-rw&#8212;- 1 root disk 254,  3 May  2 11:58 vgcrypt-lvhome</span><br />
<span style="font-family:arial;">brw-rw&#8212;- 1 root disk 254,  1 May  2 11:58 vgcrypt-lvroot</span><br />
<span style="font-family:arial;">brw-rw&#8212;- 1 root disk 254,  2 May  2 11:58 vgcrypt-lvscratch</span></span></li>
<li>sudo mkdir /media/root-laptop/</li>
<li><span style="font-size:85%;"><span style="font-family:arial;">sudo mount /dev/mapper/itrasha-root /media/root-laptop</span></span></li>
<li><span style="font-size:85%;"><span style="font-family:arial;">Fertig!</span></span></li>
</ol>
<p>Quelle: http://ragnermagalhaes.blogspot.com/2007/05/mounting-lvm-crypt-filesystem.html</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Partitioning: A Different Perspective with Encryption and RAIDs]]></title>
<link>http://linuxcritic.wordpress.com/2009/06/16/partitioning-a-different-perspective-with-encryption-and-raids/</link>
<pubDate>Tue, 16 Jun 2009 15:51:40 +0000</pubDate>
<dc:creator>Patrick</dc:creator>
<guid>http://linuxcritic.wordpress.com/2009/06/16/partitioning-a-different-perspective-with-encryption-and-raids/</guid>
<description><![CDATA[Introduction Everybody’s got an opinion, and I’m no different. After reading Trent&#8217;s piece yes]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h3>Introduction</h3>
<p>Everybody’s got an opinion, and I’m no different.  After reading <a href="http://linuxcritic.wordpress.com/2009/06/14/how-i-do-my-partitioning-in-slackware/">Trent&#8217;s piece</a> yesterday, I thought I’d add my two cents as my partitioning scheme is quite complex (though I can think of several ways to make it worse). For newbies, some of this is unlikely something to try, but you might want to read anyway to get an idea of what can be done.</p>
<p>For starters, I have 1GB of physical RAM, and 4GB of swap space split over two drives. I have two 120GB drives that I use for my primary system that are split into 8 partitions (and a logical ninth). Most of these partitions mirror (RAID-1) each other so that if one drive fails, the other maintains the system until I can replace it. You may note that the swaps are not mirrored, but both swaps and the md08 array are encrypted. Like Trent, I intended a dual boot with Windows, so the first partition on sda is NTFS. (Of course, I haven’t actually had a Windows OS on that partition in about two years, but it’s nice to know I have it if I find a game that won’t play nice in Wine.) Also note that /boot is a mirrored partition, which keeps the data safe, but upon bootup the boot loader (LILO/GRUB) accesses only one of the two drives (i.e., sda3, not md3).</p>
<p><!--more--></p>
<table border="0" width="98%">
<thead align="left">
<tr><TD># cfdisk /dev/sda</TD></tr>
<tr>
<th>Name</th>
<th>Flags</th>
<th>Part Type</th>
<th>FS Type</th>
<th>Size (MB)</th>
</tr>
</thead>
<tbody>
<tr>
<td>sda1</td>
<td>Boot</td>
<td>Primary</td>
<td>NTFS</td>
<td>10001.95</td>
</tr>
<tr>
<td>sda2</td>
<td></td>
<td>Primary</td>
<td>Linux swap</td>
<td>1998.75</td>
</tr>
<tr>
<td>sda3</td>
<td>Boot</td>
<td>Primary</td>
<td>Linux raid autodetect</td>
<td>254.99</td>
</tr>
<tr>
<td>sda5</td>
<td>Boot</td>
<td>Logical</td>
<td>Linux raid autodetect</td>
<td>12000.69</td>
</tr>
<tr>
<td>sda6</td>
<td></td>
<td>Logical</td>
<td>Linux raid autodetect</td>
<td>501.75</td>
</tr>
<tr>
<td>sda7</td>
<td></td>
<td>Logical</td>
<td>Linux raid autodetect</td>
<td>13999.43</td>
</tr>
<tr>
<td>sda8</td>
<td></td>
<td>Logical</td>
<td>Linux raid autodetect</td>
<td>1497.01</td>
</tr>
<tr>
<td>sda9</td>
<td></td>
<td>Logical</td>
<td>Linux raid autodetect</td>
<td>79777.00</td>
</tr>
</tbody>
</table>
<p></p>
<table border="0" width="98%">
<thead align="left">
<tr><TD># cfdisk /dev/sdb</TD></tr>
<tr>
<th>Name</th>
<th>Flags</th>
<th>Part Type</th>
<th>FS Type</th>
<th>Size (MB)</th>
</tr>
</thead>
<tbody>
<tr>
<td>sdb1</td>
<td>Boot</td>
<td>Primary</td>
<td>Linux ReiserFS</td>
<td>10001.95</td>
</tr>
<tr>
<td>sdb2</td>
<td></td>
<td>Primary</td>
<td>Linux swap</td>
<td>1998.75</td>
</tr>
<tr>
<td>sdb3</td>
<td>Boot</td>
<td>Primary</td>
<td>Linux raid autodetect</td>
<td>254.99</td>
</tr>
<tr>
<td>sdb5</td>
<td>Boot</td>
<td>Logical</td>
<td>Linux raid autodetect</td>
<td>12000.69</td>
</tr>
<tr>
<td>sdb6</td>
<td></td>
<td>Logical</td>
<td>Linux raid autodetect</td>
<td>501.75</td>
</tr>
<tr>
<td>sdb7</td>
<td></td>
<td>Logical</td>
<td>Linux raid autodetect</td>
<td>13999.43</td>
</tr>
<tr>
<td>sdb8</td>
<td></td>
<td>Logical</td>
<td>Linux raid autodetect</td>
<td>1497.01</td>
</tr>
<tr>
<td>sdb9</td>
<td></td>
<td>Logical</td>
<td>Linux raid autodetect</td>
<td>79777.00</td>
</tr>
</tbody>
</table>
<p></p>
<table border="0" width="98%">
<thead align="left">
<tr><TD># df -h</TD></tr>
<tr>
<th>Filesystem</th>
<th>Size</th>
<th>Used</th>
<th>Avail</th>
<th>Use%</th>
<th>Mounted on</th>
</tr>
</thead>
<tbody>
<tr>
<td>/dev/root</td>
<td>479M</td>
<td>111M</td>
<td>368M</td>
<td>24%</td>
<td>/</td>
</tr>
<tr>
<td>/dev/md3</td>
<td>244M</td>
<td>45M</td>
<td>199M</td>
<td>19%</td>
<td>/mnt/md03_boot</td>
</tr>
<tr>
<td>/dev/md5</td>
<td>12G</td>
<td>9.9G</td>
<td>1.3G</td>
<td>89%</td>
<td>/mnt/md05_alt</td>
</tr>
<tr>
<td>/dev/md7</td>
<td>14G</td>
<td>7.3G</td>
<td>5.8G</td>
<td>56%</td>
<td>/mnt/md07_apps</td>
</tr>
<tr>
<td>/dev/mapper/cryptvar</td>
<td>1.4G</td>
<td>1.1G</td>
<td>344M</td>
<td>76%</td>
<td>/mnt/md08_var</td>
</tr>
<tr>
<td>/dev/md9</td>
<td>75G</td>
<td>72G</td>
<td>2.7G</td>
<td>97%</td>
<td>/mnt/md09_home</td>
</tr>
</tbody>
</table>
<p></p>
<table border="0" width="98%">
<thead align="left">
<tr><TD># cat /proc/swaps</TD></tr>
<tr>
<th>Filename</th>
<th>Type</th>
<th>Size</th>
<th>Used</th>
<th>Priority</th>
</tr>
</thead>
<tbody>
<tr>
<td>/dev/mapper/cryptswapa</td>
<td>partition</td>
<td>1951888</td>
<td>52340</td>
<td>-1</td>
</tr>
<tr>
<td>/dev/mapper/cryptswapb</td>
<td>partition</td>
<td>1951888</td>
<td>0</td>
<td>-2</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p></p>
<h3>Some Explanations</h3>
<p>My computer uses its swap space greedily despite my setting swappiness at 20. I often have a lot of memory intensive apps and commands going at once, so I use a lot of swap space. I also expect an upgrade in the future, so the large size is in preparation for that. The general rule of thumb is to have at least as much swap as your physical memory, if not double. This, however, is really geared towards laptops. Many use the suspend-to-disc feature which copies the contents of the physical memory to swap, then turns off the RAM to save battery life. This obviously requires as much unused swap space as used memory. So if you have nearly a full amount of RAM being used, and if that’s the case you’re probably using almost as much swap, you need nearly double the amount of physical memory in swap to accommodate the RAM’s data in order to suspend.</p>
<p style="margin-right:10%;margin-left:10%;">Author&#8217;s Note: A commenter has brought to my attention a rather serious error in the following paragraph that I dragged through to other parts of the article, including the conclusion. To fix it, I&#8217;ve opted for leaving the original paragraphs in place in their entirety though struck out, with revisions, where necessary, following the originals. I apologize profusely for the error, and my humiliation is profound. I considered a lengthy explanation of where that all came from, but it would sound too much like making excuses and backpedaling. So suffice it to say it&#8217;s not a bad idea to keep swap on a separate hard disk from the rest of your system, and also that when something doesn&#8217;t ring quite true, you should heed your inner voice and double check it before making notes, much less use those notes as a basis for published work. =D Again, terribly sorry, and please ignore the following struck passages.</p>
<p style="margin-right:10%;margin-left:10%;"><strike>With regards to location, it is best to keep your swap space at the beginning of your drive, but this isn’t so much about being at the beginning of the drive, as at the beginning of a platter, and being on a platter alone. Swap inevitably has far more read/writes than typical storage and operations, so you want the seek arm to travel the least amount of distance from rest to swap space and back. More importantly, you want the first seek arm working on swap while the others below it have access to the rest of your data. Otherwise, you would frequently have a situation where one arm is reading data from one side of the disc, and then because the computer wants to store it in swap for a while, writes to another part of the disc, this process would simply be repeated over and over for the whole size of the file. It’s much preferable to have the reads coming from one arm, and the writes going with another. For similar reasons, you don’t want your swap split onto two platters which is why the beginning of a platter is suggested. One could choose to create a swap partition at the beginning of the second platter of one’s hard drive and have the same results, but that takes a certain level of knowledge about the exact starting point of the second platter which most people won’t bother to find. It’s easiest to keep swap at or near the beginning of the drive so you can be fairly confident you’re in good shape. What isn’t suggested often, however, is to keep any rarely used partitions near the beginning as well to avoid read/writes with the same arm.</strike></p>
<p style="margin-right:10%;margin-left:10%;"><strike>For example, my dual HDDs have four platters (each) which makes each platter about 30GB, and this works out to swap being on the first platter by itself most of the time as my first partitions are Windows/spare (which are generally unused), the swaps, /boot (which is only used at boot time), and a partition I call slackalt that serves as a nearly complete copy of my working Slackware system. I use the alternate for when I break something on my primary system, and booting into a system nearly identical to my own to do repairs is much preferable to using a live CD of a foreign system. (This partition can also serve as a location for installing alternate Linux distros when the mood takes me to experiment.)</strike></p>
<p><a href="http://linuxcritic.wordpress.com/2009/06/16/partitioning-a-different-perspective-with-encryption-and-raids/2/"><b>Next page: My Partitions</b></a><br />
<!--nextpage--></p>
<h3>My Partitions</h3>
<p style="margin-right:10%;margin-left:10%;"><strike>I have explained the sda/b1 as being Windows/spare, sda/b2 as two swap partitions, and the mirrored sda/b5 as an alternate OS. The extended partition mentioned by Trent which is annoying, but basically unseen, is sda/b4.</strike></p>
<p>My first partitions are Windows/spare (which are generally unused), the swaps, /boot (which is only used at boot time), and a partition I call slackalt that serves as a nearly complete copy of my working Slackware system. I use the alternate for when I break something on my primary system, and booting into a system nearly identical to my own to do repairs is much preferable to using a live CD of a foreign system. (This partition can also serve as a location for installing alternate Linux distros when the mood takes me to experiment.)  So the sda/b1 are for Windows/spare, sda/b2 are the two swap partitions, and the mirrored sda/b5 are an alternate OS. The extended partition mentioned by Trent which is annoying, but basically unseen, is sda/b4.</p>
<p>Now for the tricky part. My actual Slackware OS I have split into mirrored partitions I name boot (/boot), root (/, /bin, /dev, /etc, /lib, /media, /mnt, /proc, /root, /sbin, /sys), apps or applications (/opt, /srv, /usr), var or variable (/tmp, /var), and home (/home). It is fairly common to put /home and /boot on different partitions/drives. It is not so common to do as much as I have. What I have essentially done is separate out the top-level directories that change frequently from those that do not.</p>
<p>There is also a cryptographic element at work, so here seems an opportune time to explain. Frequently, when you enter some passwords into your system, they are transferred to, and stored, in physical memory. They can remain there until your computer is turned off, and even then, using some techniques, someone could get to them. There is little you can do about RAM itself, but because your computer swaps memory onto your hard drive, sometimes those passwords can be stored in swap. This would allow anyone who has access to your drive to take a picture of it at any time, then go about trying to find your passwords in the swap partition. It is for this reason that it is a good idea to encrypt swap. Similarly, passwords can end up in /tmp and even /var, and likewise it is also not a bad idea to encrypt them as well.</p>
<p>Usually, swap is encrypted each time at bootup with a random key and erases what was there from last time. But because we care about getting the contents of /tmp and /var back from session to session, we must use the same key(password) to get access to them each time. It is possible to have put them each on their own partition, but then I’d have to use two passwords to get to them. Thus, it was easiest to use a single partition for the two top-level directories I wanted encrypted, and encrypt the whole thing using one password.</p>
<h3>Going Further</h3>
<p>You may ask why I didn’t just encrypt the whole OS? I only have 1GB of RAM at the moment and I use it pretty well already. I simply wasn’t willing to encrypt a lot of stuff that doesn’t really need it and suffer a performance hit that extensively.</p>
<p>Now this is the really interesting part and it affects partitioning directly. How you set up your system will depend on how much encryption you want to use.</p>
<ol>
<li>Swap will pretty much always get its own partition because you want to use a randomly generated key each time. But! you might not want people knowing that that part of the hard drive is swap because then they can go to work on it trying to decrypt passwords there as compared to searching through the whole drive. So if you’re going to encrypt the whole drive, you might want that encryption done first, and then potentially encrypt swap with its random key within the first (though this would double the encryption on it and really hurt performance). More, suspend to disk on laptops can have issues with encrypted swap. I am by no means an expert in this particular, so I’ll refer you to Google and more knowledgeable hands.</li>
<li>/boot is almost essentially unencrypted as the computer has to access it before it knows how to start decrypting anything. But! you might put the kernel image and other necessary files in a ramdisk and store it on a CD or flash drive, and then boot from there, allowing you to completely encrypt your system drive.</li>
<li>/tmp and /var are security holes. Many programs don’t think twice about storing potentially dangerous information there; sometimes even unencrypted passwords, but more often recent document lists and such that you would prefer no one know existed at all.</li>
<li>/opt can sometimes have similar security holes.</li>
</ol>
<p>Ultimately, how many passwords you want to enter is going to determine how many partitions you wish to use. Potentially, you could encrypt each partition with a different password, and then have to enter all of them each time you reboot. Most people are only going to want to enter one password so most people will make two partitions, one for /boot and one for the rest of the system. What you do is create a single partition, encrypt it, and then use LVM (Logical Volume Management) to make all the logical partitions you want within the encrypted physical partition.</p>
<p>This is all independent of RAID arrays/mirrors (which also happen to be logical volumes of a sort). In the example above you would simply create the raid mirror first, then encrypt it, partition that crypto device into logical volumes via LVM, then format those with your file system of choice (e.g., ext3), mount each, and use. In other words, the mirror is transferring encrypted data to the second disk. It doesn’t care that there are partitions within or not, it’s mirroring the encrypted bits exactly as they are.</p>
<p>It’s pretty crazy (and cool), but they’re all just imaginary devices pointing to other imaginary devices pointing to real devices. Which means they’re all basically links at the device mapper layer of the kernel, and you can link however many times you like. Taking this further, you could mirror two sets of drives -&#62; encrypt each mirror -&#62; LVM partitions each mirror -&#62; raid stripe one partition from one mirror with another partition from the second.</p>
<p><a href="http://linuxcritic.wordpress.com/2009/06/16/partitioning-a-different-perspective-with-encryption-and-raids/3/"><b>Next page: Back To Me</b></a><br />
<!--nextpage--></p>
<h3>Back To Me</h3>
<p style="margin-right:10%;margin-left:10%;"><strike>So back on my computer, I decided encrypting swap, /tmp, and /var was enough security for me given my hardware limitations.  The /boot was separated for safety&#8217;s sake, and in anticipation of that future memory upgrade, at which time I will encrypt the whole thing and /boot will need to remain separate from that encryption.  Why then did I decide to separate /opt, /srv, and /usr to a different partition?  Well, it&#8217;s because those are the three top-level directories that change frequently (and take up the most space) on a system.  The other partition is essentially static so for one, it makes security checking for changes (that someone else might have made) that much easier.  And second, splitting the two sets of directories means that the active partition is physically separated from the inactive.  This makes the hard drive&#8217;s seek arm(s) stay within a smaller area, having less distance to travel most of the time.  My home/data directory has its own partition for the same reasons.  Many would argue that the performance gain is minimal, and I agree, but more than the slight performance gain is the diminished wear and tear on the drive.  Everyone eventually has failed drives.  The most basic cause for this is moving parts.  Any extra time I can get out of them by causing less stress on those parts is worth it in my book.</strike></p>
<p>So back on my computer, I decided encrypting swap, /tmp, and /var was enough security for me given my hardware limitations.  The /boot was separated for safety&#8217;s sake, and in anticipation of that future memory upgrade, at which time I will encrypt the whole thing and /boot will need to remain separate from that encryption.  Why then did I decide to separate /opt, /srv, and /usr to a different partition?  Well, it&#8217;s because those are the three top-level directories that change frequently (and take up the most space) on a system.  The other partition is essentially static so it makes security checking for changes (that someone else might have made) that much easier.  And over almost everything there is the redundancy of a RAID mirror so that if one drive dies, the system can live on.</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
