<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://www.linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Sat May 25, 2013 9:53 pm by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Sat May 25, 2013 9:53 pm</pubDate>
  <lastBuildDate>Sat May 25, 2013 9:53 pm</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>Linux Format forums</title>
    <url></url>
    <link>http://www.linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>Re: [SOLVED] Adding a new disk to an encrypted LVM?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=106827#106827</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=11572'&gt;daudi&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Jul 07, 2012 7:28 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Having done a complete backup I decided to have a little play with my system. I couldn't remove the new disk because there were extents in use and insufficient space on the original drive for pvmove, so I decided to try to shrink the logical volume, move it, then remove the disk from the volume group... and it worked! This is what I did (based on &lt;a href=&quot;http://www.linuxquestions.org/questions/linux-newbie-8/removing-physical-disk-from-lvm-via-pvmove-707477/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot; class=&quot;postlink&quot;&gt;http://www.linuxquestions.org/questions/linux-newbie-8/removing-physical-disk-from-lvm-via-pvmove-707477/&lt;/a&gt;):&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;e2fsck -f /dev/mapper/jua-root&lt;br /&gt;
resize2fs /dev/mapper/jua-root 100G&lt;br /&gt;
lvreduce /dev/mapper/jua-root -L 110G&lt;br /&gt;
resize2fs /dev/mapper/jua-root&lt;br /&gt;
pvmove /dev/mapper/wd &amp;#40;I think&amp;#41;&lt;br /&gt;
vgreduce jua /dev/mapper/wd&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
where jua is the volume group, wd is the luksOpened new disk.&lt;br /&gt;
&lt;br /&gt;
I rebooted, entered my password and now have my original system back again. Linux is truly amazing. &lt;br /&gt;
&lt;br /&gt;
Tomorrow I'll resize my original system back up to 250Gb and then add the new drive a /home.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=106827#106827</comments>
                                        <author>daudi</author>
                                        <pubDate>Sat Jul 07, 2012 7:28 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=106827#106827</guid>
                                      </item>
                                      <item>
                                        <title>Re: [SOLVED] Adding a new disk to an encrypted LVM?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=106820#106820</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=11572'&gt;daudi&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Jul 07, 2012 12:55 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      That sounds promising. I have it this way round because that is how it happened with the ubuntu server install. I'll read up about doing the other way around, it does sound easier to manage (and surprises me that  ubuntu doesn't do it this way).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=106820#106820</comments>
                                        <author>daudi</author>
                                        <pubDate>Sat Jul 07, 2012 12:55 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=106820#106820</guid>
                                      </item>
                                      <item>
                                        <title>Re: [SOLVED] Adding a new disk to an encrypted LVM?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=106819#106819</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=5'&gt;nelz&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Jul 07, 2012 12:15 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I prefer to do it the other way round, LVM on unencrypted devices then encrypted filesystems on the LVM volumes. It's simpler and you can save overhead by not encrypting filesystems that don't need it.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=106819#106819</comments>
                                        <author>nelz</author>
                                        <pubDate>Sat Jul 07, 2012 12:15 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=106819#106819</guid>
                                      </item>
                                      <item>
                                        <title>Re: [SOLVED] Adding a new disk to an encrypted LVM?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=106818#106818</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=11572'&gt;daudi&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Sat Jul 07, 2012 8:43 am&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Nope, adding a line to crypttab doesn't help. I still only get asked for the password to the first disk, I think because this is listed as the root in the boot parameters in grub.conf.&lt;br /&gt;
&lt;br /&gt;
I tried adding a keyfile hoping that at boot it would be possible for both discs to access the same file, but again the path to the keyfile is specified in the boot parameters in grub.conf&lt;br /&gt;
&lt;br /&gt;
So then I thought about backing out of this and removing the new disk. But pvdisplay shows that all extents are in use and there is not enough space on the original disk to use pvmove (even though most of the disk is actually free, there are few files on it).&lt;br /&gt;
&lt;br /&gt;
I've sure learnt a lot over the last 24 hours about crypsetup and lvm! But I don't know what to try next, other than to wipe the drives, reinstall from scratch and restore my backup of /home. &lt;br /&gt;
&lt;br /&gt;
I think that the answer to my original question is: lvm over encryption does not work for the root filesystem. I think I'll need to use the new disk only for /home.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=106818#106818</comments>
                                        <author>daudi</author>
                                        <pubDate>Sat Jul 07, 2012 8:43 am</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=106818#106818</guid>
                                      </item>
                                      <item>
                                        <title>Re: [SOLVED] Adding a new disk to an encrypted LVM?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=106817#106817</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=11572'&gt;daudi&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Fri Jul 06, 2012 10:12 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Baby steps... I booted from a live distro, used &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;cryptsetup luksOpen &amp;lt;device&amp;gt;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt; to unlock both drives, then &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;apt-get install lvm2&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;and was able to see the physical volumes, logical volumes and volume groups. I tried to mount the main volume group and it was not recognised. Then I noticed that it was marked as &amp;quot;not available&amp;quot;. Using &lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;vgchange -a y &amp;lt;device&amp;gt;&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt; I made it available and was then able to mount it and see all the files on it.&lt;br /&gt;
&lt;br /&gt;
So the next thing to figure out is how to get a prompt at boot to open the new disk. I think I need to play with crypttab but that will have to wait until tomorrow. At least I feel I can sleep tonight.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=106817#106817</comments>
                                        <author>daudi</author>
                                        <pubDate>Fri Jul 06, 2012 10:12 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=106817#106817</guid>
                                      </item>
                                      <item>
                                        <title>Partial success: 2Tb added, then borked my system. Help?!</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=106816#106816</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=11572'&gt;daudi&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Fri Jul 06, 2012 8:28 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      I made a backup which took hours to copy, used cryptsetup with the same password as the original disk, then pvcreate etc. to create the physical volume and add the new drive. Then I used resize2fs while the system was mounted and ended up with my 2Tb added to my system. It all went completely smoothly and I started questioning myself for wasting hours doing the backup.&lt;br /&gt;
&lt;br /&gt;
Then I rebooted. Ah. I was prompted to enter the password of the original drive as usual but then got a message saying:&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;Couldn't find devive with uuid xxxxxetc&lt;br /&gt;
Found volume group &amp;quot;jua&amp;quot; using metadata type lvm2&lt;br /&gt;
Refusing activation of partial LV group root.&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Then it drops me out to busybox.&lt;br /&gt;
&lt;br /&gt;
I've clearly missed a step somewhere. I think I need a way of telling my system to prompt for the password of the second (new) disk. But I don't know where to add this from within the busybox environment. &lt;br /&gt;
&lt;br /&gt;
Can anyone help me to get started?&lt;br /&gt;
&lt;br /&gt;
Thanks.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=106816#106816</comments>
                                        <author>daudi</author>
                                        <pubDate>Fri Jul 06, 2012 8:28 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=106816#106816</guid>
                                      </item>
                                      <item>
                                        <title>[SOLVED] Adding a new disk to an encrypted LVM?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=106797#106797</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=11572'&gt;daudi&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Jul 04, 2012 10:15 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Hi,&lt;br /&gt;
&lt;br /&gt;
I have a little HP Proliant microserver running ubuntu server and when I installed it I used encrypted LVM. I now want to add a new 2TB disk. I have added the disk to the box and can see it with fdisk -l.&lt;br /&gt;
&lt;br /&gt;
The next thing I want to do is add it to the existing volume group so I have one big drive (I'll make backups on an external device using unison as not much will change each day). &lt;br /&gt;
&lt;br /&gt;
The LVM commands seem straight forward (pvcreate, followed by vgextend I think), but what I'm not sure about is how to handle encryption. Do I run cryptsetup first then the LVM commands? Do I use the same password as for the current harddrive and do they figure out they are working together or will I need to enter the password twice?&lt;br /&gt;
&lt;br /&gt;
Can someone help?&lt;br /&gt;
&lt;br /&gt;
Thanks.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=106797#106797</comments>
                                        <author>daudi</author>
                                        <pubDate>Wed Jul 04, 2012 10:15 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=106797#106797</guid>
                                      </item></channel></rss>