Talk:LVM

From ArchWiki
Latest comment: 15 January by Mowley in topic New section about raid recovery?

systemd services

lvm2 has lvm2-lvmetad.service, lvm2-monitor.service, and lvm2-pvscan@.service. Those should probably be listed with explanations of what they do, and what effects there are from having or not having them running. The wiki does mention lvmetad in the context of its conf file, but not as a systemd service to consider enabling. (Could also mention use_lvmetad = 0 in conf if you don't want it.) Jamespharvey20 (talk) 21:38, 28 July 2015 (UTC)Reply[reply]

Yes, yes, YES! A million times YES. I've just spent hours figuring out why my system would hang for 90 seconds on reboot/shutdown. I had a setup with LVM on LUKS where a number of moving parts could be causing it (and were causing it for other people at one point or another) until I figured out... heh... let's leave LUKS out of the picture since it seems to be the culprit and things were working fine. Until I decided to create snapshots of my LVM volumes today before performing a system update and... TADA! It started hanging on reboot/shutdown again. Again, I had a million moving parts that could have been causing it (it's a fresh system that I'm still setting up) and it turns out all I needed was to enable lvm2-monitor... sadly I didn't scroll all the way to the bottom of this wiki page to figure out this could be a problem. I definitely vote to make this a more prominent topic... I don't know if this only affects me but it might be unsuspectingly affecting more people and both degrading their perception of their Arch install as well as getting some data loss. Tiago (talk) 19:10, 1 May 2017 (UTC)Reply[reply]
As you discovered, the issue is already documented in the Troubleshooting section - LVM#Delay on shutdown. There's no point in making it more prominent, since manually enabling lvm2-monitor.service should not be the standard practice, it should be enabled by default in lvm2. Vote on FS#50420 and hope the devs will fix it. (Or contact them directly.) -- nl6720 (talk) 07:04, 2 May 2017 (UTC)Reply[reply]
Good point, it didn't occur to me that lvm2-monitor.service should be on by default, but reading that bug report makes me really scared that unsuspecting LVM users out there are running their LVM systems without the monitor enabled... Let's just hope the bug gets fixed soon and nobody gets hurt in the process (I upvoted the bug report). --Tiago (talk) 19:57, 2 May 2017 (UTC)Reply[reply]

Logical volume types

This section says we should discuss Thin Provisioning here....

Go! Ataraxy (talk) 10:47, 28 October 2016 (UTC)AtaraxyReply[reply]

I was wondering about thin provisioned logical volumes. Just to have a feel what it is about. So I went to https://wiki.gentoo.org/wiki/LVM#Thin_provisioning by following the link to the their wiki at the LVM#See also section. I have only read the beginning of their section, and it's seems a good one. If I were to add the beginning of a LVM#Thin provisioned to this wiki, I would place it between the LVM#Snapshots and LVM#LVM cache, and write:
Thin provisoned logical volume are another way to eploits LVM ability to present a false appearence to the user as if there is more space than in reality. It can be compared to Sparse files. The thin provisioned volume is a volume where its declared disk size may be disjoined from the actual disk size it can occupy. Obviuosly, it will be disasterous when more space than what is realy available will be actually required. So the user should track the usage, and take steps to avoid that situation. In contrast to snapshots, a thin provisioned logical volume does not track any other logical volume contents. The user can write to a thin provisioned logical volume whatever data he wishes to.
Regid (talk) 01:35, 21 December 2018 (UTC)Reply[reply]
I want to integrate information about thin provisioning in the article, but due to its structure I am slightly hesitant about how to proceed.
I think we should introduce it in LVM#Background or LVM#LVM_building_blocks because it certainly pertains to LVM#Advantages, but then the question is whether we later dedicate a specific section to its operation or we integrate examples relating to thin volumes and snapshots in their respective already-existing sections. In that case, the existing LVM#Logical_volume_types should be renamed to something like "Features" or "LVM specialties".
Irrespective of thin provisioning, I find it a bit strange to introduce "Logical volume types" after examples of LV operations, so I suggest we move/rename/break apart this section to have general information closer to the beginning of the article while operation examples can stay there under a renamed "Specialties" (a bit like the current "Features" section of Gentoo's wiki).
Please share your feedback! — Neitsab (talk) 20:33, 2 June 2020 (UTC)Reply[reply]

Create physical volumes

It is written that - "If LVM has to be set on the entire disk, there is no need to create any partitions", and also "DEVICE can be a disk or a partition", but I think it is worth mentioning somewhere in this wiki that GRUB cannot be installed on a disk with LVM installed on it as a whole (see grub-install with LVM on entire disk). Any thoughts? Duduedri96 (talk) 22:57, 30 November 2016 (UTC)Reply[reply]

LVM on removable media

The provided solution LVM#Suspend/resume_with_LVM_and_removable_media for deactivating VG on sleep will not work in more complex setups like LUKS on LVM. -- Pmartycz (talk) 15:00, 5 January 2020 (UTC)Reply[reply]

Resize a btrfs filesystem

Use a mounted path to resize a btrfs filesystem,it works for LVM too,example:

btrfs filesystem resize max /home

—This unsigned comment is by Ed29 (talk) 03:30, 5 October 2021 (UTC). Please sign your posts with ~~~~!Reply[reply]

Initialising disks or disk partitions

Using the whole disk as a PV is not recommended

From The Linux Documentation Project [1] :

Using the whole disk as a PV (as opposed to a partition spanning the whole disk) is not recommended because of the management issues it can create. Any other OS that looks at the disk will not recognize the LVM metadata and display the disk as being free, so it is likely it will be overwritten. LVM itself will work fine with whole disk PVs.

Arash (talk) 14:27, 23 November 2023 (UTC)Reply[reply]

From SUSE Documentation [2] :

You can use an unpartitioned disk as a physical volume (PV) if that disk is not the one where the operating system is installed and from which it boots. As unpartitioned disks appear as unused at the system level, they can easily be overwritten or wrongly accessed.

Arash (talk) 14:36, 23 November 2023 (UTC)Reply[reply]
From RedHat Documentation [3] :

Note that although LVM supports using a non-partitioned disk as physical volume, it is recommended to create a single, whole-disk partition because creating a PV without a partition can be problematic in a mixed operating system environment. Other operating systems may interpret the device as free, and overwrite the PV label at the beginning of the drive.

Arash (talk) 15:19, 23 November 2023 (UTC)Reply[reply]

New section about raid recovery?

I've just finished writing and testing raid4/5 recovery procedure to allow the equivalent of an mdadm assemble --force. It'd probably be best as a new page. It links where relavent to kernel.org but shows how to edit the raid metadata to recover from a transient failure that leads to the most up to date metadata marked with 2/3 devices failed. md-mod.start_dirty_degraded=1 does nothing under this failure mode. Would this be of use here? —This unsigned comment is by Mowley (talk) 15:48, 15 January 2024 (UTC). Please sign your posts with ~~~~!Reply[reply]