Difference between revisions of "Talk:LVM"

From ArchWiki
Jump to: navigation, search
(Remove old question. ArchWiki Translation Team has clear instruction.)
(Create file systems and mount logical volumes section: Close.)
 
(31 intermediate revisions by 11 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@.serviceThose 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.
+
 
+
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").
+
 
+
Repeat these steps (select "/dev/mapper/vg0", then "empty NEW", etc.) for each logical volume you want.
+
 
+
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 desiredProbably 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.
+
 
+
 
+
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):
+
 
+
/dev/sda1            raw->no_fs
+
/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 ==
+
 
+
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)
+
 
+
: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 01:17, 12 June 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)