Difference between revisions of "Talk:LVM"

From ArchWiki
Jump to: navigation, search
(Remove old question. ArchWiki Translation Team has clear instruction.)
(Create physical volumes: new section)
 
(34 intermediate revisions by 13 users not shown)
Line 1: Line 1:
== Addition for /arch/setup LVM install ==
+
== <s> Create file systems and mount logical volumes section </s> ==
  
It is possible, as of Arch 2009.08, to set up and install on LVM directly from /arch/setup.  Here is how I did it - probably this info could be merged into the main article somehow?  [[User:Redlever|Redlever]] 01:11, 17 November 2009 (EST)
+
Under {{Warning|When choosing mountpoints, just select your newly created logical volumes (use: {{ic|/dev/mapper/Volgroup00-lvolhome}}). Do '''not''' select the actual partitions on which logical volumes were created (do not use: {{ic|/dev/sda2}}).}}
  
 +
is it okay to use /dev/VolGroup00/lvolhome to mount? E.g.
  
=== (2) Manually Partition Hard Drives ===
+
  # mount /dev/VolGroup00/lvolhome /mnt/home
  
* Type 82, 100M, for /boot partition
+
If not should there be a warning against this too?
* Type 8E, the rest, for LVM physical volume
+
  
=== (3) Manage Filesystems ===
+
{{Unsigned|22 December 2014‎|Digger}}
  
82 partition gets EXT2 fs, mount at /boot
+
:If you {{ic|ls -l}} /dev/mapper and /dev/VolGroup00 you'll see that they only contain symlinks to the same devices in /dev, so yes, it should be the same. -- [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 03:35, 23 December 2014 (UTC)
  
8E partition gets lvm-pv fs.
+
== systemd services ==
This adds a new entry to the "Manage Filesystems", showing "/dev/sda3+".
+
  
Select that entry, say "YES", it has only one possible value, "lvm-vg", and you can label your volume group (e.g., "vg0").
+
{{pkg|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.)  [[User:Jamespharvey20|Jamespharvey20]] ([[User talk:Jamespharvey20|talk]]) 21:38, 28 July 2015 (UTC)
This adds a new entry to "Manage Filesystems", showing "/dev/mapper/vg0".
+
  
Select that entry, which brings up a new "Manage LV's on this VG" menu.  Be careful here, as it is confusing to try to edit / delete logical volumes.
+
== Move physical extents ==
  
Select "empty NEW", then select "YES" to creat the filesystem. It will select lvm-lv for you, and then you can enter a label (e.g., "root", "home", "whatever").
+
Ok, I'm confused. This section mentions 92468, 92467 and 92466 PEs. There may be more than one off-by-one error going on here.
  
Repeat these steps (select "/dev/mapper/vg0", then "empty NEW", etc.) for each logical volume you want.
+
Which of these is correct? [[User:Ataraxy|Ataraxy]] ([[User talk:Ataraxy|talk]]) 10:35, 28 October 2016 (UTC)Ataraxy
  
Each logical volume you create will be added to the "Manage Filesystems" menu, like "/dev/mapper/vg0-LABEL".  Select each one of those, and create a filesystem on it as desired.  Probably you want to choose mount points and labels that match each other (e.g., mount /dev/mapper/vg0-root on /), but this is up to you.  You should have at least "/" and "swap" logical volumes.
+
== Volume operations ==
  
 +
This section says we should discuss Thin Provisioning here....
  
Here is a complete example from my recent simple setup.  I have one disk, /dev/sda.  sda1 is an NTFS partition, sda2 is /boot, and sda3 is my LVM physical volume.  I have a single volume group, called vg0.  On that volume group, i have logical volumes for root, swap, var and home.  This is what I see on "Manage filesystems" (copied from the screen, so I can't see the end of the lines):
+
Go! [[User:Ataraxy|Ataraxy]] ([[User talk:Ataraxy|talk]]) 10:47, 28 October 2016 (UTC)Ataraxy
  
/dev/sda1            raw->no_fs
+
== Create physical volumes ==
/dev/sda2            raw->ext2;yes;/boot;no_opts;no_label;no_params
+
/dev/sda3            raw->lvm-pv;yes;no_mountpoint;no_opts;no_label;no_
+
/dev/sda3+            lvm-pv->lvm-vg;yes;no_mountpoint;no_opts;vg0;/dev/
+
/dev/mapper/vg0      lvm-vg(vg0)->lvm-lv;yes;no_mountpoint;no_opts;root
+
/dev/mapper/vg0-root  lvm-lv(root)->ext4;yes;/;no_opts;no_label;no_param
+
/dev/mapper/vg0-swap  lvm-lv(swap)->swap;yes;no_mountpoint;no_opts;no_la
+
/dev/mapper/vg0-var  lvm-lv(var)->ext4;yes;/var;no_opts;no_label;no_par
+
/dev/mapper/vg0-home  lvm-lv(home)->ext4;yes;/home;no_opts_no_label;no_p
+
  
== Templates ==
+
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",
I notice this article has several areas marked with '''Attention:''', '''Information:''', '''Hint:''', etc. Before I go on an editing frenzy, are templates (like <nowiki>{{Warning|...}}</nowiki>) the preferred format? If so, I will quite happily go through and change all of them. I'm new to this wiki, so I thought I'd ask before stirring up dust. :-) [[User:Infiniteh|Infiniteh]] 16:56, 27 August 2010 (EDT)
+
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 [https://bbs.archlinux.org/viewtopic.php?id=214315 grub-install with LVM on entire disk]). Any thoughts?
 
+
[[User:Duduedri96|Duduedri96]] ([[User talk:Duduedri96|talk]]) 22:57, 30 November 2016 (UTC)
:I went ahead and added templates to the first few sections and did some minor restructuring. However, I may revert my changes (or rethink them). All these colored text boxes seem to make the page less readable... Any thoughts? [[User:Infiniteh|Infiniteh]] 21:11, 28 August 2010 (EDT)
+
 
+
::The page looks nicer with new templates :). I think a few colored text boxes could be removed. For example: "Note: You may need to load the device-mapper kernel module (modprobe dm-mod) for the above commands to succeed" could be easily removed, because that info is stated at the begining of the article. I think that warnings should stay though. [[User:Billy|billy]] 04:46, 5 September 2010 (EDT)
+
 
+
== LVM-recovery section ==
+
 
+
Would a section on LVM un-borkage be useful and/or within the scope of this article? [[User:Buhman|Buhman]] 13:45, 29 April 2012 (UTC)
+
:All constructive contributions are welcome. However if you're going to simply rewrite some existing and well maintained documentation, it'd be better to just write an introduction and link to it; if instead you want to write an Arch-oriented section or something more original in general, then go for it :) -- [[User:Kynikos|Kynikos]] 09:53, 30 April 2012 (UTC)
+
 
+
 
+
== PROS and CONS (citing needed) ==
+
 
+
Can anybody please come up with and elaborate on some of the cons as to what the drawbacks in performance and wear and tear would be when having multple LVM partitions spread and intertwined across several hard drives? (vs. keeping partitions spread evenly and limited to one drive only)
+
 
+
Cons should be clearly listed on the main 'page' ("cons", or "disadvantages", maybe near "advantages")
+
 
+
In fact, upon reading the 'advantages' section is what had me anticipating there would be something on disadvantages.  I'm concerned about hard performance testing results.  Has anyone seen any good data on this?
+

Latest revision as of 22:57, 30 November 2016

Create file systems and mount logical volumes section

Under
Warning: When choosing mountpoints, just select your newly created logical volumes (use: /dev/mapper/Volgroup00-lvolhome). Do not select the actual partitions on which logical volumes were created (do not use: /dev/sda2).

is it okay to use /dev/VolGroup00/lvolhome to mount? E.g.

 # mount /dev/VolGroup00/lvolhome /mnt/home

If not should there be a warning against this too?

—This unsigned comment is by Digger (talk) 22 December 2014‎. Please sign your posts with ~~~~!

If you ls -l /dev/mapper and /dev/VolGroup00 you'll see that they only contain symlinks to the same devices in /dev, so yes, it should be the same. -- Kynikos (talk) 03:35, 23 December 2014 (UTC)

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)

Move physical extents

Ok, I'm confused. This section mentions 92468, 92467 and 92466 PEs. There may be more than one off-by-one error going on here.

Which of these is correct? Ataraxy (talk) 10:35, 28 October 2016 (UTC)Ataraxy

Volume operations

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

Go! Ataraxy (talk) 10:47, 28 October 2016 (UTC)Ataraxy

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)