This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| deb610:gemlvm [2020/06/21 18:21] – Bernard Condrau | deb610:gemlvm [2026/10/11 02:01] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Install logical volumes (LVM) ===== | ||
| - | |||
| - | ==== Prepare and install volumes ==== | ||
| - | |||
| - | Prepare a single disk or a disk raid: | ||
| - | mkfs.ext3 < | ||
| - | lvm | ||
| - | lvm> pvcreate < | ||
| - | lvm> vgcreate < | ||
| - | lvm> lvcreate < | ||
| - | lvm> quit | ||
| - | mkfs.ext3 / | ||
| - | mount / | ||
| - | |||
| - | Auto-mount during boot: | ||
| - | vim /etc/fstab | ||
| - | / | ||
| - | |||
| - | ==== Install LVM manually ==== | ||
| - | |||
| - | If you need to install LVM after having setup the base system, note that there is a bug in Edgy and Feisty where the executable files will not be found. To fix it, execute the 2nd instruction below: | ||
| - | |||
| - | apt-get install lvm2 | ||
| - | ln -s / | ||
| - | |||
| - | ==== Install LVM volumes ==== | ||
| - | |||
| - | - lvm > pvcreate /dev/sde1 > pvcreate /dev/md2 | ||
| - | - lvm > vgcreate vg_backup /dev/sde1 > vgcreate vg_data /dev/md2 | ||
| - | - lvm > vgdisplay vg_backup to check ### of free extents (following steps same for vg_data, but 2 logical volumes) | ||
| - | - lvm > lvcreate -l### vg_backup (do not use -LxxGB, use size with -l### which is number of extents) | ||
| - | - lvm > lvrename vg_backup lvol0 lv_backup | ||
| - | - lvm > vgcfgbackup to backup volume group configurations | ||
| - | - lvm > exit | ||
| - | - umount /home > umount /srv | ||
| - | - mkfs -t ext3 / | ||
| - | - mkdir /backup | ||
| - | - mount / | ||
| - | |||
| - | * As I use this machine as a server I did not consider to upgrade Edgy to Feisty, but I would expect that this can be done without problems. I'm not sure this is the best way or the fastest, but it worked for me. | ||
| - | |||
| - | ==== Check wether all volumes get mounted during system boot ==== | ||
| - | |||
| - | For whatever reason, my swap volume which resides on raid1 was not mounted during system boot. After some searching I found that the uuid where not matching between / | ||
| - | |||
| - | to check wether root and swap are mounted, enter: | ||
| - | mount | ||
| - | free -m -t | ||
| - | |||
| - | to check mismatching uuid' | ||
| - | ls -la / | ||
| - | cat /etc/fstab | ||
| - | |||
| - | to fix, do: | ||
| - | vim /etc/fstab | ||
| - | replace the uuid's found in fstab with the ones found in /dev/disk. Make sure you copy the correct uuid (md0, md1) to the respective entry in fstab. | ||