<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Adding an external encrypted drive with LVM to Ubuntu Linux</title>
	<atom:link href="http://earlruby.org/2010/02/adding-an-external-encrypted-drive-with-lvm-to-ubuntu-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://earlruby.org/2010/02/adding-an-external-encrypted-drive-with-lvm-to-ubuntu-linux/</link>
	<description>this must be the place</description>
	<lastBuildDate>Fri, 09 Dec 2011 00:21:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Earl Ruby</title>
		<link>http://earlruby.org/2010/02/adding-an-external-encrypted-drive-with-lvm-to-ubuntu-linux/comment-page-1/#comment-404</link>
		<dc:creator>Earl Ruby</dc:creator>
		<pubDate>Mon, 17 May 2010 00:06:05 +0000</pubDate>
		<guid isPermaLink="false">http://earlruby.org/?p=141#comment-404</guid>
		<description>In my case if my computer is powered then the external drive is powered, because I want it there for unattended backups. However, I&#039;ve also done this for drives that I want to be able to attach and detach at any time.

If you want to be able to power the drive on or off any time, do not add the drive to /etc/fstab or /etc/cryptab. Also, DO NOT USE vgremove! That deletes the volume group, destroying your data. You basically want to unmount the drive and then turn off the crypto layer in order to detach the drive.

Follow the steps above through step #14. That gives you a mounted, encrypted drive. To unmount:

sudo umount /dev/xbackup/backupvol
sudo cryptsetup luksClose /dev/xbackup/backupvol

At this point you can power off the drive and disconnect it. To start using it again, power it up, plug it back in and:

sudo cryptsetup luksOpen /dev/sdc1 backupexternal
sudo mount /dev/xbackup/backupvol /mnt/backup

After you type the luksOpen command you&#039;ll be prompted for the passphrase. The drive should appear as /mnt/backup again after you mount it.

I&#039;m using the same drive letter (/dev/sdc1) and volume group name (xbackup) that I used in the article. You should use the drive letters and names appropriate for your setup.</description>
		<content:encoded><![CDATA[<p>In my case if my computer is powered then the external drive is powered, because I want it there for unattended backups. However, I&#8217;ve also done this for drives that I want to be able to attach and detach at any time.</p>
<p>If you want to be able to power the drive on or off any time, do not add the drive to /etc/fstab or /etc/cryptab. Also, DO NOT USE vgremove! That deletes the volume group, destroying your data. You basically want to unmount the drive and then turn off the crypto layer in order to detach the drive.</p>
<p>Follow the steps above through step #14. That gives you a mounted, encrypted drive. To unmount:</p>
<p>sudo umount /dev/xbackup/backupvol<br />
sudo cryptsetup luksClose /dev/xbackup/backupvol</p>
<p>At this point you can power off the drive and disconnect it. To start using it again, power it up, plug it back in and:</p>
<p>sudo cryptsetup luksOpen /dev/sdc1 backupexternal<br />
sudo mount /dev/xbackup/backupvol /mnt/backup</p>
<p>After you type the luksOpen command you&#8217;ll be prompted for the passphrase. The drive should appear as /mnt/backup again after you mount it.</p>
<p>I&#8217;m using the same drive letter (/dev/sdc1) and volume group name (xbackup) that I used in the article. You should use the drive letters and names appropriate for your setup.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Cummings</title>
		<link>http://earlruby.org/2010/02/adding-an-external-encrypted-drive-with-lvm-to-ubuntu-linux/comment-page-1/#comment-402</link>
		<dc:creator>Craig Cummings</dc:creator>
		<pubDate>Sun, 16 May 2010 21:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://earlruby.org/?p=141#comment-402</guid>
		<description>to elaboarte...here is what I&#039;m seeing in the output of pvs after turning the drive off and back on...If I reboot with the drive on....all will be well, but I&#039;d like to be able to turn it off an on without rebooting if possible...

Note: I think the issue may have to do with the fact that the hd dev name changes from sdh to sdi when i turn it off and back on...but then I suspect there may be more too it as well...

  /dev/mapper/ext_bak: read failed after 0 of 2048 at 0: Input/output error
  /dev/mapper/ext_bak: read failed after 0 of 1024 at 1000201584640: Input/output error
  /dev/mapper/ext_bak: read failed after 0 of 1024 at 1000201703424: Input/output error
  /dev/mapper/ext_bak: read failed after 0 of 1024 at 0: Input/output error
  /dev/mapper/ext_bak: read failed after 0 of 1024 at 4096: Input/output error
  /dev/mapper/ext_bak: read failed after 0 of 2048 at 0: Input/output error</description>
		<content:encoded><![CDATA[<p>to elaboarte&#8230;here is what I&#8217;m seeing in the output of pvs after turning the drive off and back on&#8230;If I reboot with the drive on&#8230;.all will be well, but I&#8217;d like to be able to turn it off an on without rebooting if possible&#8230;</p>
<p>Note: I think the issue may have to do with the fact that the hd dev name changes from sdh to sdi when i turn it off and back on&#8230;but then I suspect there may be more too it as well&#8230;</p>
<p>  /dev/mapper/ext_bak: read failed after 0 of 2048 at 0: Input/output error<br />
  /dev/mapper/ext_bak: read failed after 0 of 1024 at 1000201584640: Input/output error<br />
  /dev/mapper/ext_bak: read failed after 0 of 1024 at 1000201703424: Input/output error<br />
  /dev/mapper/ext_bak: read failed after 0 of 1024 at 0: Input/output error<br />
  /dev/mapper/ext_bak: read failed after 0 of 1024 at 4096: Input/output error<br />
  /dev/mapper/ext_bak: read failed after 0 of 2048 at 0: Input/output error</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Cummings</title>
		<link>http://earlruby.org/2010/02/adding-an-external-encrypted-drive-with-lvm-to-ubuntu-linux/comment-page-1/#comment-401</link>
		<dc:creator>Craig Cummings</dc:creator>
		<pubDate>Sun, 16 May 2010 21:14:10 +0000</pubDate>
		<guid isPermaLink="false">http://earlruby.org/?p=141#comment-401</guid>
		<description>Sorry, that was the following 2 commands to remove the vg mapping:

sudo vgchange -a n vg_bak_crypt
sudo vgremove vg_bak_crypt</description>
		<content:encoded><![CDATA[<p>Sorry, that was the following 2 commands to remove the vg mapping:</p>
<p>sudo vgchange -a n vg_bak_crypt<br />
sudo vgremove vg_bak_crypt</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Cummings</title>
		<link>http://earlruby.org/2010/02/adding-an-external-encrypted-drive-with-lvm-to-ubuntu-linux/comment-page-1/#comment-400</link>
		<dc:creator>Craig Cummings</dc:creator>
		<pubDate>Sun, 16 May 2010 21:11:21 +0000</pubDate>
		<guid isPermaLink="false">http://earlruby.org/?p=141#comment-400</guid>
		<description>Thanks for the write up.  Very helpful.  

Everything is working as expected.  However, if i turn my external drive off while the OS is running, I&#039;m left with a stale vg and crypt mapping.

I finally figured out how to get rid of the stale lvm mapping (sudo vgchange -a n vg_bak_crypt, sudo vgchange -a n vg_bak_crypt), but the mapping that was setup via crypttab is still lingering (/dev/mapper/ext_bak).  Is there anyway to get ride of that?

More to the point, what else do I need to do/change in order to allow turning the drive off and one while the OS is running and having it remap everything correctly?</description>
		<content:encoded><![CDATA[<p>Thanks for the write up.  Very helpful.  </p>
<p>Everything is working as expected.  However, if i turn my external drive off while the OS is running, I&#8217;m left with a stale vg and crypt mapping.</p>
<p>I finally figured out how to get rid of the stale lvm mapping (sudo vgchange -a n vg_bak_crypt, sudo vgchange -a n vg_bak_crypt), but the mapping that was setup via crypttab is still lingering (/dev/mapper/ext_bak).  Is there anyway to get ride of that?</p>
<p>More to the point, what else do I need to do/change in order to allow turning the drive off and one while the OS is running and having it remap everything correctly?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.257 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2011-12-20 16:56:12 -->

