public:iscsi:lvm
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
public:iscsi:lvm [2015/11/29 15:33] – [LVM devices] wiki.manager | public:iscsi:lvm [2024/06/07 07:55] (current) – [LVM devices on virtual host] Thomas Kornack | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== LVM devices ===== | ||
+ | The Logical Volume Manager (LVM) is used to create logical partitions on top of local hard disks or iSCSI disks. The use of LVM offers the following advantages: | ||
+ | * Isolated partitions for hard disk images and user data can be created on common storage devices. | ||
+ | * LVM partitons allow the creation of snapshots. | ||
+ | * LVM partitions are easier to resize than physical partitions. | ||
+ | * Access to LVM devices on distributed file systems is limited to one client only by LVM. | ||
+ | |||
+ | The use of LVM always involves the following devices: | ||
+ | * LVM physical volumes: the underlying hard disks or block devices | ||
+ | * LVM volume groups: they can combine physical volumes to one bigger device | ||
+ | * LVM logical volumes: they are created inside volume groups and are used as block devices | ||
+ | ==== LVM devices on KVM hosts ==== | ||
+ | Information to LVM devices can be displayed with the short commands '' | ||
+ | root@kvm55: | ||
+ | PV | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | root@kvm55: | ||
+ | VG #PV #LV #SN Attr | ||
+ | vg | ||
+ | vg3_dbserver | ||
+ | vg3_nas | ||
+ | root@kvm55: | ||
+ | LV VG | ||
+ | images | ||
+ | lv_dbslave5501 | ||
+ | lv_dbserver5501 vg3_dbserver -wi-ao | ||
+ | lv_nas5501 | ||
+ | Some information are especially important and are related to information displayed also by other tools: | ||
+ | |||
+ | '' | ||
+ | The device sizes are almost identical with the sizes displayed by '' | ||
+ | |||
+ | '' | ||
+ | These DM devices are used to access the iSCSI storage. They have to be identical to the DM devices displayed by '' | ||
+ | |||
+ | '' | ||
+ | The attributes of the logical volumes provide information about the state of the volumes. A complete overview over the attributes is delivered by the man page of '' | ||
+ | |||
+ | If in doubt about the state of devices the scan commands can be used. They are also helpful to activate LVM devices created on other hosts like e.g. LVM partitions on iSCSI devices: | ||
+ | root@kvm55: | ||
+ | PV / | ||
+ | PV / | ||
+ | PV / | ||
+ | Total: 3 [2.28 TiB] / in use: 3 [2.28 TiB] / in no VG: 0 [0 ] | ||
+ | root@kvm55: | ||
+ | Reading all physical volumes. | ||
+ | Found volume group " | ||
+ | Found volume group " | ||
+ | Found volume group " | ||
+ | root@kvm55: | ||
+ | ACTIVE | ||
+ | ACTIVE | ||
+ | ACTIVE | ||
+ | ACTIVE | ||
+ | The LVM configuration currently active in the kernel can be got with the following command: | ||
+ | root@kvm55: | ||
+ | In case the LVM configuration file '/ | ||
+ | root@kvm55: | ||
+ | It is important, to adapt the configuration file before the first LVM devices are created in order to prevent problems with the mapping of LVM devices to multipath devices. | ||
+ | ==== LVM devices on virtual host ==== | ||
+ | Normally DM devices are exclusively managed on KVM hosts. LVM partitions or partition images stored on LVM partitions are then used inside the virtual hosts. | ||
+ | |||
+ | But sometimes it is also necessary, to create further LVM partitions inside virtual hosts. The additional use of LVM inside virtual hosts is no problem. It has only to be noted, that LVM partitions defined inside virtual hosts could also be visible from the KVM host. The commands '' | ||
+ | |||
+ | It should be avoided to operate on LVM devices defined inside virtual hosts from the KVM host. The virtual host is often not able to recognize status changes of his LVM devices caused from the outside. Prevent outside access reliably if necessary. | ||
+ | |||
+ | |||
+ | [[public: | ||