User Tools

Site Tools


Writing /app/www/public/data/meta/databaseandnetworkmanagement/partitioning_a_server_with_lvm.meta failed
databaseandnetworkmanagement:partitioning_a_server_with_lvm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
databaseandnetworkmanagement:partitioning_a_server_with_lvm [2017/06/30 11:45] 1carew1databaseandnetworkmanagement:partitioning_a_server_with_lvm [2021/06/25 10:09] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Partitioning Logical Volumes on a Server ======
 +
 +<code>
 +# View the partitions
 +lvdisplay
 +# Set the parition size - https://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/LV_create.html
 +lvresize --size 0.5T -r /dev/vg_hpeproliant/lv_home
 +# This leave 0.4T left
 +# Create the volume
 +lvcreate -L 1T -n lv_mysql_data  vg_hpeproliant
 +lvcreate -L 1T -n lv_backup  vg_hpeproliant
 +# Create the file system - https://unix.stackexchange.com/questions/275129/cannot-mount-newly-created-logical-volume
 +mkfs.ext4 /dev/vg_hpeproliant/lv_mysql_data
 +mkfs.ext4 /dev/vg_hpeproliant/lv_backup
 +# Make Directory to Mount
 +mkdir -p /var/lib/mysql
 +mkdir /backup
 +# Mount the volume
 +mount /dev/vg_hpeproliant/lv_mysql_data /var/lib/mysql
 +mount /dev/vg_hpeproliant/lv_backup /backup
 +# Edit file to specify default mounts - /etc/fstab
 +/dev/mapper/vg_hpeproliant-lv_mysql_data /var/lib/mysql                    ext4    defaults        1 2
 +/dev/mapper/vg_hpeproliant-lv_backup /backup                    ext4    defaults        1 2
 +</code>