General :: Encrypting Existing Logical Volumes
Jan 8, 2011How would I go about encrypting my lvm2 logical volumes on Debian Squeeze? Is it possible without backing everything up to a different drive and restoring afterwards?
View 3 RepliesHow would I go about encrypting my lvm2 logical volumes on Debian Squeeze? Is it possible without backing everything up to a different drive and restoring afterwards?
View 3 RepliesI've read the first 40% of the RHEL 5 Logical Volume Manager Administrator's Guide, but still have one outstanding, burning question.
During the installation of Centos 5.6, I set up LVM physical volumes, volume groups and logical volumes. I can list these using pvdisplay, vgdisplay and lvdisplay commands.
How would I list what filesystems I have that are using my logical volumes?
I have done a recent install of Debian squeeze on a laptop. I set up LVM with 3 LV's, one for the root filesystem, one for /home, and another for swap. I then used lvextend to increase the size of the LV's. This additional space is shown if I enter lvdisplay (shortened for clarity):
- Logical volume -
LV Name /dev/auriga/swap
LV Size 4.66 GiB
- Logical volume -
LV Name /dev/auriga/root
LV Size 15.97 GiB
- Logical volume -
LV Name /dev/auriga/home
LV Size 169.01 GiB
However, if I use df, it still shows the previous size.
/dev/mapper/auriga-root 14G 8.0G 5.2G 61% /
/dev/sda1 221M 16M 193M 8% /boot
/dev/mapper/auriga-home 147G 421M 139G 1% /home
I have even tried restarting as well. I do not understand why df would still show that /home is 147GB, when I extended it to 169GB using lvextend. Similarly for the root, which was extended by 2GB from 14GB to 16GB.
I have a system where the logical volumes are not being detected on boot and would like some guidance as to how to cure this. The box is a Proliant DL385 G5p with a pair of 146 GB mirrored disks. The mirroring is done in hardware by an HP Smart Array P400 controller. The mirrored disk (/dev/cciss/c0d0) has 4 partitions: boot, root, swap and an LVM physical volume in one volume group with several logical volumes, including /var, /home and /opt.
The OS is a 64-bit RHEL 5.3 basic install with a kernel upgrade to 2.6.18-164.6.1.el5.x86_64 (to cure a problem with bonded NICs) plus quite a few extras for stuff like Oracle, EMC PowerPath and HP's Proliant Support Pack. The basic install is OK and the box can still be rebooted OK after the kernel upgrade. However, after the other stuff goes on it fails to reboot.
The problem is that the boot fails during file system check of the logical volume file systems but the failure is due to these volumes not being found. Specifically the boot goes through the following steps:
Red Hat nash version 5.1.19.6 starting
setting clock
starting udev
loading default keymap (us)
setting hostname
No devices found <--- suspicious?
Setting up Logical Volume Management:
fsck.ext3 checks then fail with messages: No such file or directory while trying to open /dev/<volume group>/<logical volume> There are also messages about not being able to find the superblock but this is clearly due to the device itself not being found. If I boot from a rescue CD all of the logical volumes are present, with correct sizes; dmsetup shows them all to be active and I can access the files within. Fdisk also shows all the partitions to be OK and of the right type. I am therefore very sure that there is nothing wrong with the disk or logical volumes....
I have let the debian installer set up with separate partions forrootusrvarhometmpIt ended up with a huge home partition and little place for the others.So I wanted to give some of home's space to the others and didlvreduce on homelvextend on the others.Following some info on the net it tells you toe2fsck -f partition1 followed by aresize2fs partition1But when I try to fsck the reduced home partition I got the following error:The filesystem size (according to the superblock) is 73113600 blocksThe physical size of the device is 20447332 blocksEither the superblock or the partition table is likely to be corrupt!Abort? yesIs there any way to save this?
View 5 Replies View RelatedAre there any maximum amount of logical volumes a LVM2 volume group can contain?
View 1 Replies View RelatedI upgraded aaa_elflibs as per Eric's advice here:URL..Now I can't access anything.it boots into tty1 and won't mount any of my logical volumes.
View 14 Replies View RelatedI am trying to use e2label to label one of my Logical Volumes. the labeling is done successfully. but my findfs output is like this:
/dev/mapper/VolGroup00-TEST
i cannot resize mounted lvm volumes with reiserfs by using yast like in a previous version 10.x !?
View 6 Replies View RelatedI would like to ask if is it possible to boot Slackware with the installation CD when in a pinch with a system on logical volumes? For the usual fdisk partitions the procedure is known:
Code:
boot: root=/dev/sda1 noinitrd ro or something like that. This way, the system boots with mounted basic partitions. My question is whether there is an option to achieve the same if the system is installed on logical volumes? I need to do this on a machine with dual booting Windows + Linux. The Windows needs to be reinstalled, but as is well known, the boot sector will then be overwritten. So after the Windows reinstallation I will need to boot Slackware with the installation CD and run lilo.
Does everybody do major upgrades in place on production servers?Am I over-engineering by creating a new logical volume, syncing my working root volume to it and upgrading the new volume to test services? Then, after a week or 2 or 4, removing the old LV...
View 3 Replies View RelatedI inherited a 3ware 9550SX running a version of gentoo with a2.6.28.something kernel. I started over with CentOS 5.6 x86_64.tw_cli informs me that the 9-disk RAID 5 is healthy.The previous admin used lvm (?) to carve up the RAID into a zilliontiny pieces and one big piece. My main interest is the big piece.Some of the small pieces refused to mount until I installed theCentOS plus kernel (they are reiserfs).The remainder seem to be ext3; however, they are not mounted at boot("refusing activation"). lvs tells me they are not active. If I try tomake one active, for example:root> lvchange -ay vg01/usrI get:Refusing activation of partial LV usr. Use --partial to override.If I use --partial, I get:Partial mode. Incomplete logical volumes will be processed.and then I can then mount the partition, but not everything seems tobe there.
Some of the directory entries look like this:?--------- ? ? ? ? ? logfilesIs it possible that the versions of the kernel and lvm that wereon the gentoo system are causing grief for an older kernel (andpossibly older lvm) on CentOS 5.6 and that I might have greaterfortunes with CentOS 6.x ?Or am I missing something fundamental? This is my first experiencewith lvm, so it's more than a little probable.
So today I needed to switch from openSolaris to a viable OS on my workstation and decided to install openSUSE after having good experiences with it on my personal laptop. I ran into some problems partitioning one of the two hard disks installed on the system. I was limited on the amount of time I could spend at the office doing the install so I decided to use LVM on the one hard disk that seemed to work okay.
I picked LVM because although I don't know much at all about LVM, I at least know enough that it would allow me to expand the root and home partitions once I get the 2nd hard drive working correctly. So now that I've gotten the 2nd disk working okay, I've created two physical volumes on the 2nd drive, one to expand the root partition and one to expand the home partition. So, my question is, can I expand the root an home partitions while they are mounted or should I boot into a live CD environment before I expand the partitions? If I could expand them without booting into a different environment, that would be so great as I don't want to have to drive out to the office again before Monday. BTW, I am a new openSUSE user and an ex Ubuntu user. I loved the Ubuntu forums but had to switch because I do not agree with the direction that Ubuntu is taking.
I have a setup that looks like this
[Code]....
and I'm dumped into recovery mode. However, if I remove these mounts from /etc/fstab via comments, I can wait for the system to boot (which it does very quickly) then mount the mapper devices myself. So what is going on? Has something changed wrt logical volumes, or is this just systemd? I can live with manual mounting, but any advice on resolving the automatic mounting situation would be great.
[Code]....
what the maximum number of logical volumes is for a volume group in LVM ? Is there any known performance hit for creating a large number of small logical volumes vs a small number of large volumes ?
View 1 Replies View RelatedI have Fedora Core 8 installed. I would like to reinstall it so as to get back commands that have been lost. To preserve my user data that has been stored in logical volumes, what selections should I make in the installation process? Are these selections essentially the same for Fedora Core 10?
View 5 Replies View Relatedi have a fedora 11 server which can't access the ext4 partitions on lvm logical volumes on a raid array during boot-up. the problem manifested itself after a failed preupgrade to fedora 12; however, i think the attempt at upgrading to fc12 might not have anything to do with the problem, since i last rebooted the server over 250 days ago (sometime soon after the last fedora 11 kernel update). prior to the last reboot, i had successfully rebooted many times (usually after kernel updates) without any problems. i'm pretty sure the fc12 upgrade attempt didn't touch any of the existing files, since it hung on the dependency checking of the fc12 packages. when i try to reboot into my existing fedora 11 installation, though, i get the following screen: (click for full size) a description of the server filesystem (partitions may be different sizes now due to the growing of logical volumes):
Code:
- 250GB system drive
250MB/dev/sdh1/bootext3
lvm partition rest of driveVolGroup_System
10240VolGroup_System-LogVol_root/ext4
[code]....
except he's talking about fake raid and dmraid, whereas my raid is linux software raid using mdadm. this machine is a headless server which acts as my home file, mail, and web server. it also runs mythtv with four hd tuners. i connect remotely to the server using nx or vnc to run applications directly on the server. i also run an xp professional desktop in a qemu virtual machine on the server for times when i need to use windows. so needless to say, it's a major inconvenience to have the machine down.
Is there a limit to the number of partitions/logical volumes you can create using the partman-auto recipes? If not, any thoughts on why my preseed using the values included below results in only a /boot partition and logical volumes root, swap, and user? Is there another way to achieve putting /, /tmp, /var, /usr, /usr_local /opt, etc on their own logical volumes with preseeding?
View 1 Replies View RelatedI have a system with a 2TB RAID level 1 installed (2 x 2TB drives, configured as RAID1 through the BIOS). I installed Centos 5.5 and it runs fine. I now added another 2x2TB drives and configured them as RAID1 through the BIOS.
How do I add this new RAID volume to the existing logical volume?
After fixing drive partition numbers, I got the following error from cfdisk: Code: FATAL ERROR: Bad logical partition 6: enlarged logical partitions overlap Press any key to exit cfdisk However, I can see all my partitions with fdisk and gparted, I can mount and use all of them.I used the following guide to fix the drive numbers order: Reorder partition drive numbers in linux | LinkedBits Does somebody know whet is cfdisks problem and how can I fix it?
View 6 Replies View RelatedFrom previous post I have a netbook from work that I have Debian Squeeze running on and did a full disk encryption (minus the minimal boot loader in /boot) in case it gets stolen. However, with a laptop/netbook it has a battery and I believe the encryption protocol (LUKS - correct me if I'm wrong) uses RAM to store the decrypt key. So if someone is quick they can dump RAM and analyze it until they get the key. Or even if the key is not stored there they could dump RAM which would have recent files cached unecrypted.
Is there an easy process of encrypting RAM while still using as RAM? What I mean by that is I know you could make a ramdisk sort of like how Live CDs do and encrypt that, but at best (that I know of) I can only mount it as swap space.
Is it possible to encrypt the Entire root file system using LUKS.I am currently using Ubuntu 10.4 LUCID.After several hours of Google ,most of the articles were focusing to "Encrypting a drive/removable media ".. My aim is to encrypt whole File system which is currently using.
My Concerns, How to Encrypt a running file system? Will it lead to data loss?
On my laptop (Dell Studio 1745) w/500GB HD, I have a common data partition shared by openSUSE. Fedora, FreeBSD, and windoze 7 currently. I would like to encrypt this partition (/Common) and have it accessible from all distros either with a passphrase key in /root or on a flash key. I've been researching on the web and there seem to be several possibilities using eCryptfs, Luks, cryptosetup, or any of several methods.
My question is, what have people here used and how well did it work? Also, what was required for setup (I'll probably have to explain/teach it to my wife who is technology challenged-but I still love her anyway) and my daughter who's just getting into linux. I would like to be able to keep the entire directory on the hard drive but also have the ability to copy it to external USB device for transport.
I've recently brought a Western Digital Elements 2TB external hard disk and have been planning to encrypt it for use as a backup drive. However, it seems that these 2TB disks use the new 4K sector sizes and thus need to be handled more carefully than the older 512K ones.
After spending a week looking on Google, I have to admit I'm pretty confused and hope somebody here might be able to verify my conclusions
The drive reports that it's a 512-sector drive which is probably false. Using fdisk -uc, the original partition starts at sector 2048 so I assume that is a valid sector also to start a dm-crypt partition overwriting the previous one?
I've also read that every layer that is added to these drives must support the 4k layer. That means both dm-crypt and the ext3 filesystem I intend to put it on have to do so also.
Looking through the cryptsetup document, it states under the option "--align-payload" the following:
"Align payload at a boundary of value 512-byte sectors. This option is relevant for luksFormat. If your block device lives on a RAID, it is useful to align the filesystem at full stripe boundaries so it can take advantage of the RAIDs geometry. See for instance the sunit and swidth options in the mkfs.xfs manual page. By default, the payload is aligned at an 8 sector (4096 byte) boundary."
The fact that the payload is aligned at 4096 seems to indicate to me that it should be fine using default settings. Does everybody agree with this? Or do I need to take special measures due to the dm-crypt headers?
When I later finish up the dm-crypt layer, then I need to put ext3 on it. I understand adding -b 4096 to the mkfs.ext3 command will resolve that. Is that also correct and will it work well in combination with the dm-crypt layer?
I want to encrypt Full partition instead of creating a file and encrypting it, and also want to move this disk to another server. do i need some files also (that hold keys) with my self on new server. i am using FC11.
View 2 Replies View RelatedWhat is the difference between a Partition and a Volume in Redhat Linux 5?
View 2 Replies View Relatedi want to map my novell server volume in my linux EL-4 system.
View 1 Replies View RelatedI want to perform an e2fsck with the y switch (so I dont have to answer yes to every question) on two volumes on a server the next time I restart it. I don't want to do a shutdown -rF because 1) I dont want to check the other volumes and 2) it seems when I do that, the e2fsck doesn't keep restarting itself over and over to fix all the problems. Seems like it runs once, then if it fails it drops you to the repair console in single user mode. I'd rather just have it start the check that will keep repeating over and over right away, because I know it'll take more than one pass.
View 5 Replies View RelatedHow kernel/OS recognizes the LVM volumes when the system bootes up ?
View 4 Replies View Relatediam trying to map novell net ware volumes in redhat EL-4
View 2 Replies View Related