4,461
edits
mNo edit summary |
→Adding a new disk to a LVM: separating out /srv to a dedicated LVM |
||
Line 364: | Line 364: | ||
tmpfs 1.6G 4.0K 1.6G 1% /run/user/1000 | tmpfs 1.6G 4.0K 1.6G 1% /run/user/1000 | ||
[root@chara mhan]# | [root@chara mhan]# | ||
</syntaxhighlight> | |||
=== Separating out /srv to a dedicated LVM === | |||
<syntaxhighlight lang="bash"> | |||
{{testedon|2023-10-09|RHEL 8.8}}. LoboCloud VM w/ 250 addl. | |||
# pvcreate /dev/sdb | |||
# vgcreate vgapps /dev/sdb | |||
# lvcreate -n lv_www -L 100G vgapps | |||
# mkfs.xfs /dev/mapper/vgapps-lv_www | |||
# mount /dev/mapper/vgapps-lv_www /mnt | |||
# mv -a /srv/* /mnt/ | |||
# vi /etc/fstab | |||
/dev/mapper/vgapps-lv_www /srv xfs defaults 0 0 | |||
# umount /mnt | |||
# mount /dev/mapper/vgapps-lv_www /srv | |||
</syntaxhighlight> | |||
To access the old /srv folder | |||
<syntaxhighlight lang="bash"> | |||
# mount -o bind / /mnt | |||
</syntaxhighlight> | </syntaxhighlight> | ||