diff options
Diffstat (limited to 'tools/lvm.html')
-rw-r--r-- | tools/lvm.html | 53 |
1 files changed, 40 insertions, 13 deletions
diff --git a/tools/lvm.html b/tools/lvm.html index 898a8d3..b6c7678 100644 --- a/tools/lvm.html +++ b/tools/lvm.html @@ -16,11 +16,6 @@ <a href="https://wiki.archlinux.org/index.php/Software_RAID_and_LVM">Arch Wiki</a> article about Sofware RAID and LVM.</p> - <p>Basic idea behind RAID is to deal with independent disks - as an array of drives. Raid 0 uses two or more disks as one, - with performance gains without fault-tolerance. From raid 1 - to 6 they offer diferent fault tolerance mechanisms.</p> - <p>LVM or Logic Volume Manager bring one more layer, read <a href="http://www.tuxradar.com/content/lvm-made-easy">Lvm made easy</a>. Partitions under lvm are easy to be resized, moved and there is @@ -28,6 +23,12 @@ disk names exp; production, development, backups...</p> + <p>Basic idea behind RAID is to deal with independent disks + as an array of drives. Raid 0 uses two or more disks as one, + with performance gains without fault-tolerance. From raid 1 + to 6 they offer diferent fault tolerance mechanisms.</p> + + <p>Until now "from install" there is only one partition, it is good idea to have a system with diferent partitions for each propos. If is a "fresh install";</p> @@ -40,17 +41,19 @@ <h2 id="lvmpart">1. LVM Partition</h2> - <p>Create a LVM partition, fdisk should - show something like this;</p> + <p>There is no need to create a partition with fdisk or parted + if all device will be used for lvm, just <a href="#pv">pvcreate</a> + against the device (pvcreate /dev/sda).</p> + + <p>Create a LVM partition with parted;</p> <pre> - # parted /dev/sda + parted --script ${DEV} \ + unit mib \ + mkpart primary 1000 4000 \ + set 1 lvm on </pre> - <p>I use defaults unless to define system partition last sector, - where in this example is size, +80G</p> - - <h2 id="pv">2. Create physical volume</h2> <pre> @@ -125,7 +128,31 @@ # </pre> - <h2 id="maint">5. Maintenance</h2> + <h2 id="fsck">5. Maintenance</h2> + + <h3 id="resize">Resize</h3> + + <p>First umount all lvm partitions;</p> + + <pre> + # pvs + </pre> + + <pre> + # pvresize /dev/sdb + </pre> + + <pre> + # vgs + </pre> + + <pre> + # lvresize --resizefs --size +25GB /dev/mapper/vg_system-lv_ports + </pre> + + <pre> + # vgs + </pre> <h2 id="encrypt">7. Encryption</h2> |