Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10th November 2008, 05:43 PM
LinuxTom Offline
Registered User
 
Join Date: Jul 2005
Location: Kentucky, U.S.A.
Posts: 349
Cool LUKS encryption and power outages

I have a question for the LUKS gurus. I live in an area with common power outages, but have never shelled out the money for an APC unit; that stated I have never lost data from an ext3 partition due to a power failure (fingers crossed).

Recently I decided to secure my external USB drive using LUKS aes-xts-plain with 512 key. I have been considering reformatting my ext3 /home to an LVM partition and splitting it into (/home, /tmp, /var/tmp, swap), my research into this has solved the issues regarding fstab processing order, and LUKS password entry, but I am concerned about the power outages.

From what I gather LVM volumes are in-there-self quite susceptible to bit-swap corruption during power loss (correct ?), and I have seen mention that the same could be true for LUKS.

I have not found any comprehensive material on this issue, and would like input from someone more familiar with this topic.

Basically, is this going to be a bad idea, as I would hate to be syncing data between the pc and the external during a power outage, and vaporize my file systems.
Reply With Quote
  #2  
Old 10th November 2008, 06:16 PM
brunson Offline
Registered User
 
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,304
I've never had a problem with LVM and corruption during power loss. My 2 year old son thinks it's incredibly funny to see daddy's face turn red when he pushes the reset button on my Fedora box at home, so it happens pretty regularly. But it's not really LVM that would have the problem, it's the filesystem on top of it. Ext3 uses journaling which should make it less susceptible to problems during a power failure.
__________________
Registered Linux User #4837
411th in line to get sued by Micro$oft
Quote:
Basically, to learn Unix you learn to understand and apply a small set of key ideas and achieve expertise by expanding both the set of ideas and your ability to apply them - Paul Murphy
Reply With Quote
  #3  
Old 10th November 2008, 07:50 PM
LinuxTom Offline
Registered User
 
Join Date: Jul 2005
Location: Kentucky, U.S.A.
Posts: 349
None of the power outages have ever caused any data loss on my ext3 partitions, but I have stumbled across some things while Googling this matter, mainly in Ubuntu forums that indicate that while ext3 is safe by virtue of it's journal, that LVM partitions themselves may become corrupted due to power loss. Also there seems to be some others speculating about LUKS and power outage in general, that's why I am curious. Since there is no LUKS specific journal, in the event of power loss, would this not corrupt the the LUKS partition itself, rendering it inaccessible?
Reply With Quote
  #4  
Old 10th November 2008, 08:18 PM
bee Offline
Banned
 
Join Date: Jun 2008
Posts: 1,315
Quote:
Originally Posted by LinuxTom View Post
None of the power outages have ever caused any data loss on my ext3 partitions, but I have stumbled across some things while Googling this matter, mainly in Ubuntu forums that indicate that while ext3 is safe by virtue of it's journal, that LVM partitions themselves may become corrupted due to power loss. Also there seems to be some others speculating about LUKS and power outage in general, that's why I am curious. Since there is no LUKS specific journal, in the event of power loss, would this not corrupt the the LUKS partition itself, rendering it inaccessible?
I know nothing about LVM
Anyway, LUKS is just a software that will write on your disk "aa8£g" in place of "Hello", so there are no differences between running a computer with LUKS or no. (well, except that all your data will go through your CPU before landing on your disk, so it's a bit slower...)
Of course if a power failure (not really a power loss, usually it's because of a power overload or anyhow how you call it "the opposite of a brownout" ) destroy right only the header of your disk, you'll be unable to access and recover any file

bye!!!!
Reply With Quote
  #5  
Old 11th November 2008, 01:24 PM
LinuxTom Offline
Registered User
 
Join Date: Jul 2005
Location: Kentucky, U.S.A.
Posts: 349
That's actually what I'm getting at, I guess I should have said header. I have seen mention of data corruption of both LVM & LUKS headers, from both power and kernel issues. Just kind of concerned about encapsulating LUKS partitions in LVM, seems like I might be setting up for a double whammy. I guess I could back up the LUKS metadata, but from what I gather that's going to defeat the point of securing the drive in the first place. I guess I'll give it a shot though, as the odds of power failure occuring while the external is mounted, and trashing both is minimal.
Reply With Quote
  #6  
Old 11th November 2008, 02:31 PM
sej7278 Offline
Registered User
 
Join Date: Sep 2004
Posts: 2,008
yes LUKS on LVM does seem to be doubling your chances of loss.

the problem with LUKS is that it encrypts a container or partition, not just individual files, so get some bit-rot or power loss and you don't lose a file, you lose everything. same with LVM - ext3 journaling won't help you as the ext3 partition will be unreadable anyway if the LVM that its inside gets corrupted.

i'd say LUKS on ext3 is your best bet, but the way fedora have implemented it seems to require it to be on an LVM - otherwise you get one passphrase prompt per partition at boot!
Reply With Quote
  #7  
Old 11th November 2008, 02:46 PM
bee Offline
Banned
 
Join Date: Jun 2008
Posts: 1,315
Quote:
Originally Posted by sej7278 View Post
otherwise you get one passphrase prompt per partition at boot!
it's possible to avoid it...... for some reasons it doesn't work with me if i edit the crypttab, but it work in my way: http://forums.fedoraforum.org/showpo...61&postcount=4

bye!!
Reply With Quote
  #8  
Old 11th November 2008, 11:01 PM
LinuxTom Offline
Registered User
 
Join Date: Jul 2005
Location: Kentucky, U.S.A.
Posts: 349
I am becoming more and more baffled as to how to accomplish what I wish to do. It seems there really is not an alternative that meets both my needs, plus allows me to feel safe that data may not become corrupted if my power drops. I simply do not wish to enter 4 passwords at bootup, but I want /home, /tmp, /var/tmp, swap encrypted. Anyone know of a way to make this work without LVM? Could I perhaps symlink /tmp & /var/tmp at boot, to the LUKS partition?
Reply With Quote
  #9  
Old 12th November 2008, 11:25 AM
sej7278 Offline
Registered User
 
Join Date: Sep 2004
Posts: 2,008
Quote:
Originally Posted by LinuxTom View Post
I am becoming more and more baffled as to how to accomplish what I wish to do. It seems there really is not an alternative that meets both my needs, plus allows me to feel safe that data may not become corrupted if my power drops. I simply do not wish to enter 4 passwords at bootup, but I want /home, /tmp, /var/tmp, swap encrypted. Anyone know of a way to make this work without LVM? Could I perhaps symlink /tmp & /var/tmp at boot, to the LUKS partition?
i'd like to know too, i think its the holy grail.

i'm thinking of just making a /encrypted partition and putting my sensitive stuff in there, as i don't really want my /home to get screwed and don't want to use lvm to avoid passwords, although not encrypting swap is not great
Reply With Quote
  #10  
Old 12th November 2008, 12:41 PM
bee Offline
Banned
 
Join Date: Jun 2008
Posts: 1,315
Quote:
I simply do not wish to enter 4 passwords at bootup, but I want /home, /tmp, /var/tmp, swap encrypted
It's possible with ext3 filesystems.
Read again my post #7 and its link
You can enter your password once.... and automagically decrypt all partitions (root, /home, swap, /tmp, /sexybees, etc... ). Why are you saying that it isn't possible!?!?!? i did it, so it's possible

bye!
Reply With Quote
  #11  
Old 15th November 2008, 05:49 PM
LinuxTom Offline
Registered User
 
Join Date: Jul 2005
Location: Kentucky, U.S.A.
Posts: 349
Well, I just decided on the easy method and created an encrypted LVM physical volume with logical /tmp, /var/tmp, swap, /home. I've got my backups ready, so I'll give it a shot and see how it all holds up.
Reply With Quote
Reply

Tags
encryption, luks, outages, power

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change Luks (fedora's system encryption) pasword AnimeFreak Security and Privacy 7 4th May 2012 07:38 AM
Cryptsetup and LUKS Encryption with Linux Vector Guides & Solutions (No Questions) 4 15th July 2009 12:30 PM
LUKS Encryption system slowdown/broken Places menu Unlimited Using Fedora 4 10th November 2008 09:56 AM
Power outages, now GRUB won't boot correctly lothario Installation and Live Media 1 20th February 2008 07:51 AM
dm-crypt luks & lvm Full system encryption?? any joy anybody techie-munkey Security and Privacy 1 5th March 2007 02:39 PM


Current GMT-time: 18:19 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat