This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| linux:general:lvm [2019/03/11 14:56] – lunetikk | linux:general:lvm [2020/11/16 17:39] (current) – lunetikk | ||
|---|---|---|---|
| Line 35: | Line 35: | ||
| < | < | ||
| pvcreate /dev/sdb1 | pvcreate /dev/sdb1 | ||
| - | vgcreate | + | vgcreate |
| - | lvcreate -l 100%FREE -n backup data | + | lvcreate -l 100%FREE -n backuplv datavg |
| - | mkfs.ext3 -Ldata /dev/data/backup | + | mkfs.ext3 -Lbackup |
| - | #mkfs.xfs -Ldata /dev/data/backup | + | #mkfs.xfs -Lbackup |
| vi /etc/fstab | vi /etc/fstab | ||
| - | / | + | / |
| </ | </ | ||
| Line 156: | Line 156: | ||
| | lvdisplay | | lvdisplay | ||
| | vgchange -ay < | | vgchange -ay < | ||
| + | | vgextend datavg / | ||
| | lvextend -L+5G / | | lvextend -L+5G / | ||
| | lvextend -L 10G / | | lvextend -L 10G / | ||
| + | | lvcreate -L20G -n backuplv datavg | ||
| + | | lvresize -r -L+5G / | ||
| === Useful links === | === Useful links === | ||
| Line 168: | Line 171: | ||
| === Cant mount a logical volume === | === Cant mount a logical volume === | ||
| - | == Description | + | __**Description**__ |
| Mounting the device leads to the following error | Mounting the device leads to the following error | ||
| Line 181: | Line 184: | ||
| </ | </ | ||
| - | == Reason | + | __**Reason**__ |
| Its deactivated. | Its deactivated. | ||
| Line 191: | Line 194: | ||
| </ | </ | ||
| - | == Fix == | + | __**Fix**__ |
| Run the following command to activate it | Run the following command to activate it | ||
| Line 199: | Line 202: | ||
| < | < | ||
| + | |||
| \\ | \\ | ||
| + | |||
| + | === New added disk doesnt appear in / | ||
| + | |||
| + | __**Description**__ | ||
| + | |||
| + | After adding a new disk to your VM the disk doesnt appear in / | ||
| + | |||
| + | __**Reason**__ | ||
| + | |||
| + | The VM didnt rescan the scsi devices | ||
| + | |||
| + | __**Fix**__ | ||
| + | |||
| + | Run the following command rescan the scsi hosts for new devices | ||
| + | < | ||
| + | |||
| \\ | \\ | ||
| ~~DISCUSSION: | ~~DISCUSSION: | ||