User Tools

Site Tools


lvm:create_a_logical_volume_using_lvm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
lvm:create_a_logical_volume_using_lvm [2019/11/30 13:49] – removed peterlvm:create_a_logical_volume_using_lvm [2020/07/26 15:48] (current) – old revision restored (2019/11/30 13:49) 192.99.5.48
Line 1: Line 1:
 +====== LVM - Create a logical volume using LVM ======
  
 +Logical volumes are created using the **lvcreate** command:
 +
 +<code bash>
 +lvcreate --size 256M --name foo /dev/vg01
 +</code>
 +
 +The volume will be accessible as either **/dev/vg01/foo** or **/dev/mapper/vg01-foo**.  It may be used in much the same way as a hard drive partition.
 +
 +
 +===== Testing =====
 +
 +Verify the existence of the logical volume using the **lvdisplay** command:
 +
 +<code bash>
 +lvdisplay /dev/vg01/foo
 +</code>
 +
 +This should give a response of the form:
 +
 +<code>
 +--- Logical volume ---
 +LV Name                /dev/vg01/foo
 +VG Name                vg0
 +LV UUID                afaHxF-nZrA-S1eo-kjsY-mt6C-p04e-IU8Bqu
 +LV Write Access        read/write
 +LV Status              available
 +# open                 0
 +LV Size                256.00 MB
 +Current LE             64
 +Segments               1
 +Allocation             inherit
 +Read ahead sectors     auto
 +- currently set to     256
 +Block device           254:64
 +</code>
 +
 +
 +===== Next steps =====
 +
 +Having created a new logical volume you may want to:
 +
 +  * Create a filesystem on it
 +  * Use it as a swap device
 +
 +===== Troubleshooting =====
 +
 +  * [[LVM:Troubleshooting LVM|Troubleshooting LVM]]
 +
 +===== See also =====
 +
 +  * [[LVM:Increase the capacity of an LVM volume group|Increase the capacity of an LVM volume group]]
 +  * [[LVM:Increase the size of an LVM logical volume|Increase the size of an LVM logical volume]]
lvm/create_a_logical_volume_using_lvm.1575121767.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki