A PCRE internal error occured. This might be caused by a faulty plugin
====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
tricks:mount-lvm [2016/06/08 18:36] admin [Renaming a Volume Group] |
tricks:mount-lvm [2016/06/08 18:56] admin [Activating a Volume Group] |
||
---|---|---|---|
Line 25: | Line 25: | ||
</Code> | </Code> | ||
- | ===== Activating the Volume Group ===== | + | ===== Activating a Volume Group ===== |
+ | We consider having an internal device containing the vg01 volume group, while the one on the external device is vg00. Connect the external device to the system, then use the following commands: | ||
+ | <Code:bash> | ||
+ | > sudo vgscan | ||
+ | Reading all physical volumes. This may take a while... | ||
+ | Found volume group "vg00" using metadata type lvm2 | ||
+ | Found volume group "vg01" using metadata type lvm2 | ||
+ | > sudo vgchange -a y | ||
+ | </Code> | ||
+ | Now, all the LVM partitions should have devices created in the form /dev/volumegroup/logicalvolume: | ||
+ | <Code:bash> | ||
+ | > lsblk | ||
+ | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | ||
+ | sda 8:0 0 931.5G 0 disk | ||
+ | ├─sda1 8:1 0 2G 0 part [SWAP] | ||
+ | ├─sda2 8:2 0 20G 0 part / | ||
+ | └─sda3 8:3 0 909.5G 0 part | ||
+ | ├─vg01-opt 254:2 0 20G 0 lvm /opt | ||
+ | └─vg01-home 254:3 0 889.5G 0 lvm /home | ||
+ | sdb 8:16 0 232.9G 0 disk | ||
+ | ├─sdb1 8:17 0 18G 0 part | ||
+ | ├─sdb2 8:18 0 2G 0 part | ||
+ | └─sdb3 8:19 0 212.9G 0 part | ||
+ | ├─vg00-opt 254:0 0 10G 0 lvm | ||
+ | └─vg00-home 254:1 0 202.9G 0 lvm | ||
+ | </Code> | ||
+ | |||
+ | It is now possible to mount the LVM partitions as any other partition: | ||
+ | <Code:bash> | ||
+ | > sudo mount /dev/vg00/home /mnt/mountpoint | ||
+ | </Code> | ||
===== Renaming a Volume Group ====== | ===== Renaming a Volume Group ====== | ||
In case the volume group standing on the external disk has the same name as your internal one, you won't be able to access both at the same time. In this situation first eject the external device, then rename your internal volume group (here vg00): | In case the volume group standing on the external disk has the same name as your internal one, you won't be able to access both at the same time. In this situation first eject the external device, then rename your internal volume group (here vg00): |