Hot answers tagged lvm
33
LVM is designed in a way that keeps it from really getting in the way very much. From the userspace point of view, it looks like another layer of "virtual stuff" on top of the disk, and it seems natural to imagine that all of the I/O has to now pass through this before it gets to or from the real hardware.
But it's not like that. The kernel already needs to ...
9
Yes. You can create a VMDK (not a VDI — you have to use the VMware disk image format) that accesses a raw disk. You can easily use a logical volume as if it were a whole disk, but just like most virtual disks, you probably won't be able to make the host kernel interpret its partition table and mount it.
Once you create your volume, just run
VBoxManage ...
9
I think you are looking for lvconvert --merge. From the man page:
--merge
Merges a snapshot into its origin volume. To check if your kernel
supports this feature, look for snapshot-merge in the output of
dmsetup targets. If both the origin and snapshot volume are not open
the merge will start immediately. Otherwise, the merge ...
8
I think early-ssh provides what you're searching for:
Early-ssh is a simple initramfs hook, which installs Dropbear SSH server into
your initramfs, and starts it at boottime, so you will be able to do a lot of
things remotely over SSH, before your root partition gets mounted, for example:
* unlocking LUKS encrypted crypto devices -
even your root ...
8
Pro: you don't waste one disk sector on a partition table. (Yay.)
Pro: the disk can be used in an operating system that doesn't support PC-style partitions. (Like you're going to use one.)
Con: this is unusual and may confuse co-sysadmins. (See?)
Irrelevant: extending the filesystem is not easier if it's directly on the disk than if it's in a partition, ...
7
First of all the hassle with encrypted root and early userspace is typically already handled by your distribution (as far as i know Fedora, Debian, Ubuntu and OpenSUSE support encrypted root out of the box). That means you don't have to care for the setup itself.
One reason for encrypting / is just to be sure you don't leak any information at all. Think ...
7
/etc, /var, and /tmp come to mind. All can potentially have sensitive contents. All can be given separate volumes, but it's common for each of these to be on the same filesystem as the root directory. Maybe you've moved one or more off into their own volumes, but have you moved them all?
/etc contains:
hashed passwords; possibly multiple sorts, such as ...
7
-l 100%VG will try to extend the logical volume so that its total size is equal to the volume group's total size. This is not what you want - you already have another logical volume in that VG, which is taking space.
If you want the logical volume to use all the available free space in the volume group, the switch should be -l +100%FREE (i.e. make the new ...
6
Simple answer: No. If you want LVM you need an initrd.
But as others have said before: LVMs don't slow your system down or do anything bad in another way, they just allow you to create an environment that allows your kernel to load and do its job.
The initrd allows your kernel to be loaded: If your kernel is on an LVM drive the whole LVM environment has to ...
6
With lvm on top of a raid device you are flexible to create multiple virtual devices (and filesystems) on it. And you are flexible to change the size of those devices.
If you are 100% sure that you don't need that and you only need one big filesystem, then you can directly create the filesystem on your raid device. One layer of indirection and complexity is ...
6
Warning, wall of text incoming. It's as well formatted as I could make it.
If we're going to answer this, we're going to answer the whole thing. I'm not doing another answer on this, so here goes:
Let's pretend you know absolutely nothing, and I'm feeding you keystrokes.
This tells you everything you need to know to do this WHOLE thing, with a little ...
5
LVM on top of anything is probably a good idea because it gives you quite a bit of flexibility at pretty marginal cost (the extra abstraction layer is really cheap compared to disk I/O).
That said, I'd use RAID6, as RAID5 leaves you with no redundancy during a rebuild, which is precisely the time of high stress where drives are most likely to fail.
5
If this is an ext3 filesystem, you can extend it to the LV size by running:
resize2fs /dev/system/var
If this anything else than ext3, use the appropriate tool, e.g. xfs_growfs /var if it's XFS.
This is absolutely nothing to be afraid of. I have extended hundreds of filesystems in more than 10 years on several operating systems and I have never seen ...
5
Those are file descriptors left open on the device (which you were resizing).
lvm(8) says:
On invocation, lvm requires that only the standard file descriptors stdin, stdout
and stderr are available. If others are found, they get closed and messages
are issued warning about the leak.
5
A guide to do such a setup with BusyBox and Dropbear is shown in this blog post. early-ssh didn't work for me and is apparently not needed anymore.
I have summarized what you need to do in the following. For more details, have a look at the post above:
Install BusyBox and Dropbear on your server
sudo apt-get install dropbear busybox
Update your ...
5
I found the LVM HOW-TO to be very clear.
It has probably more info than you want from a first-time tutorial, but reading sections 1. to 3. and 11. to 13. should give you a comprehensive introduction to LVM concepts and its usage in live systems; these days, most Linux distribution have good LVM support out-of-the-box, so you can safely skip the ...
5
LVM, like everything else, is a mixed blessing.
With respect to performance, LVM will hinder you a little bit because it is another layer of abstraction that has to be worked out before bits hit (or can be read from) the disk. In most situations, this performance hit will be practically unmeasurable.
The advantages of LVM include the fact that you can add ...
5
Not sure about how this would apply to Linux but with native ZFS, one reason it is recommended to create pools on whole disks and not partitions is in the former case the disk write cache can be enabled.
Several other reasons also mentioned here:
http://www.solarisinternals.com/wiki/index.php/ZFS_Best_Practices_Guide#Storage_Pools
Conclusion: it works, ...
5
The worst and most likely case is that you will lose everything. If you have a single logical volume spanning both drives, and you lose one drive with no mirroring, you've essentially wiped out half the file system.
From this point, it gets mildly better depending on what file system you are running on your volume. Assuming that you are not using ...
5
On Linux, LVM is a volume management system that uses the kernel device mapper. Basically, physical volumes contain metadata that describe how blocks of data on a physical volume should be mapped to create a device mapper block device.
LVM is not the only thing that uses the device mapper, you can create mapped volumes manually with dmsetup, LUKS is another ...
5
This uuid "EFc551-(...)" probably is your 2TB disk (namely encrypted PV on it). You need to tell somehow your initramfs about this second PV. Probably update-initramfs will do it, something like (from knoppix):
(assuming you've mounted your disk in /mnt/disk)
cp -a /dev/* /mnt/disk/dev/
chroot /mnt/disk
mount /proc
mount /sys
update-initramfs -u ...
5
The two main ingredients are hdparm --fibmap file, which tells you where the file is physically located within the LV, and lvs -o +seg_pe_ranges,vg_extent_size which tells you where the LV is physically located on your device(s).
The rest is math.
So, for example:
# hdparm --fibmap linux-3.8.tar.bz2
linux-3.8.tar.bz2:
filesystem blocksize 4096, begins ...
4
In RedHat's set of administration tools, there's system-config-lvm, which is optionally installable in other distributions like Fedora and Debian.
Recent versions of gnome-disk-utility support LVM.
The newly-released KDE 4.6 gains udisks as a Solid backend, which should provide LVM support. (Out of the three, this is the only one I haven't tried.)
4
These days /dev is on tmpfs and is created from scratch each boot by udev. You can safely reboot and these links will come back.
You should also find LVM symlinks to the /dev/dm-X nodes in the /dev/<vg> directories, one directory for each volume group. However, those nodes re-created by vgscan --mknodes will also work fine, assuming they have the ...
4
I'm not aware of a way to change LUKS keys without cryptsetup. I'll edit this if I find a way. But I think I can help you with everything else.
I think you need clarity on how encryption fits into the grand scheme of things.
dm_crypt, through the cryptsetup userspace utility, works on anything that looks like a block device. This can be an entire hard ...
4
LVM does support read-write snapshots in fact that's the default. Merging a modified snapshot will delete the data on the snapshot origin volume the same way merging an unmodified snapshot would.
If you expect to discard modifications then I recommend RW snapshots and merge if you want to keep them. If you expect to keep the modifications then you should ...
4
It is basically the /dev/VGname/LVname and /dev/mapper/ ,that it is being created when you create the and LVM structure. It called device node since it is under the /dev node.
So the question is, why is the /dev node it there ? Simple answer is that it is intended to be used as a convenient why for you to specify the device in the fstab file and the like.
...
4
You're using LVM, the logical volume manager. This gives you a lot more flexibility than you would get with simple partitions, but you need to understand how everything fits together. I would start first at the LVM page on Wikipedia, paying special attention to the diagram that shows all the parts.
LVM is a stack, with your physical block devices -- ...
4
Create an extended partition spanning the new free space, and create a logical partition inside it. (You could create a primary partition, but that would reduce your options later, because of the limit of 4 primary partitions or 3 primary and one extended.) You can do this with fdisk or cfdisk or parted. Set the type of the new partition to 8e (“Linux ...
4
I'd recommend not using LVM inside your VMs. It doesn't buy you much flexibility that you couldn't get at the hypervisor level.
Remember, the hypervisor is already effectively performing these tasks. If you want to be able to arbitrarily resize file systems (a fine idea), just create a separate virtual disk for each filesystem.
One thing you might think ...
Only top voted, non community-wiki answers of a minimum length are eligible
