<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="https://www.stress-free.co.nz"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>stressfree - lvm</title>
 <link>https://www.stress-free.co.nz/tech/lvm</link>
 <description></description>
 <language>en</language>
<item>
 <title>Enable LVM on software-RAID during a Suse installation</title>
 <link>https://www.stress-free.co.nz/enable_lvm_on_software_raid_during_a_suse_installation</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;div class=&quot;image&quot;&gt;&lt;img src=&quot;/sites/default/files/images/news/suse.gif&quot; alt=&quot;&quot; width=&quot;160&quot; height=&quot;114&quot; /&gt;&lt;/div&gt; &lt;p&gt;If you have tried setting up &lt;a href=&quot;http://www.suse.com/en/whitepapers/lvm/lvm1.html&quot;&gt;LVM&lt;/a&gt; on top of a LVM-enabled software-RAID partition during a standard Suse installation you may have hit a brick wall where the installer tells you that there are no available LVM partitions. This is a bug in the installer, it looks as if the LVM setup tool only checks physical partitions for LVM labels and ignores software-RAID partitions that have LVM labels.&lt;/p&gt;&lt;p&gt;Steve Wray has pointed out that you can get this functionality to work by creating a small physical partition and giving it an LVM label. The LVM setup tool will see this partition and allow the configuration to continue quite happily with the software-RAID partitions available for use. I have not tested this but I think it is worth giving a spin as the data integrity of RAID-1 coupled with the flexibility of LVM is a compelling combination (though performance maybe an issue). &lt;/p&gt;&lt;p&gt;Note: From a bit of Googling it appears that this limitation is not apparent in Suse Linux Enterprise Server by the looks of this &lt;a href=&quot;http://www-128.ibm.com/developerworks/eserver/library/es-conf-swraid/index.html&quot;&gt;IBM documentation&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/suse&quot;&gt;suse&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/raid&quot;&gt;raid&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/lvm&quot;&gt;lvm&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Wed, 13 Sep 2006 22:42:35 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">310 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Adventures in LVM</title>
 <link>https://www.stress-free.co.nz/adventures_in_lvm</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    In recent times I have been using &lt;a href=&quot;http://sourceware.org/lvm2/&quot;&gt;Logical Volume Management&lt;/a&gt; (LVM) on Linux as a very flexible way of operating a flexible file system. LVM is a very powerful way of dynamically adding and removing disk from a Linux server (or desktop). Rather than mounting individual devices in different parts of the file system LVM lets you place all your physical disk drives together into virtual pools. Inside these pools you can dynamically divide the space up however your like and format each partition in any of the available Linux file formats.&lt;br /&gt;&lt;br /&gt;It is a great way to work with disk resources and is very similar to Novell&#039;s &lt;a href=&quot;http://www.novell.com/products/openenterpriseserver/storageservices.html&quot;&gt;Network Storage Services&lt;/a&gt; (NSS) volumes (minus the very useful &#039;salvage&#039; tool). To get around the lack of a salvage tool you can create regular snapshots of your data. These snapshots are like CVS branches in that rather than creating a separate copy of the data a snapshot tracks what has changed on disk from a particular time.&lt;br /&gt;For example to create a snapshot of your &#039;data&#039; volume you perform the following command &lt;span style=&quot;font-style: italic&quot;&gt;(Note: you must have the dm-snapshot module loaded into the kernel)&lt;/span&gt;:&lt;br /&gt;&lt;p style=&quot;font-weight: bold&quot;&gt;lvcreate -L10G -s -n salvage /dev/system/data&lt;/p&gt;&lt;p&gt;This creates a snapshot of a the data volume (in the system LVM group) and names it salvage. The -L10G command makes the snapshot 10gig in size which means that 10gig of changes can take place within the snapshot before it is marked invalid.&lt;br /&gt;&lt;/p&gt;The other day I was left in a bit of a predicament when one of the disks in a LVM group did not come online after a reboot, stopping the successful creation of my LVM groups and hence most of the filesystem. Fortunately in this case I had only just added the drive and no data had been copied onto it yet. To solve the problem at the command line I ran:&lt;br /&gt;&lt;p&gt;&lt;span style=&quot;font-weight: bold&quot;&gt;vgscan&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic&quot;&gt;(This identified the missing physical disk)&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-weight: bold&quot;&gt;vgreduce --removemissing --test system&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic&quot;&gt;(this tested the task of removing the disk to make sure things would go okay)&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-weight: bold&quot;&gt;vgreduce --removemissing system&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic&quot;&gt;(Remove the missing disk from the volume group)&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;After a reboot everything came back up and I was able to remove the problematic drive and replace it with a more reliable model. In this scenario I was also helped by the fact my root partition (/) was in a separate, non-LVM partition so I was able to boot into a semi-functional shell to perform maintenance. &lt;br /&gt;&lt;br /&gt;Apart from this little adventure I am having no problems running LVM and would recommend it to anyone who needs the ability to dynamically change their disks (or create snapshots for backup). There are some excellent tools out there for SuSE (Yast) and Red Hat (Disk Druid).&lt;br /&gt;&lt;br /&gt;This is a good posting on &lt;a href=&quot;http://www.lethargy.org/~jesus/archives/40-LVM2,-if-you-cant-grok-snapshots,-dont-back-them-up!.html&quot;&gt;troubleshooting LVM&lt;/a&gt;.&lt;br /&gt;Here&#039;s a link to the LVM howto which details how to &lt;a href=&quot;http://www.die.net/doc/linux/HOWTO/LVM-HOWTO-14.html&quot;&gt;create groups and snapshots&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/logical_volumes&quot;&gt;logical volumes&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/lvm&quot;&gt;lvm&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Sun, 04 Sep 2005 20:52:21 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">119 at https://www.stress-free.co.nz</guid>
</item>
</channel>
</rss>
