Logical Volumes on RedHat 7.3
Hello,
I have a scenario whereby I have a RedHat 7.3 server where it was built and all the space went to root.
What I mean is that there are no logical volumes for /usr /var /opt and so forth. I do have them for /home and /tmp.
It is a small development server with 20GB that has grown over time.
Here is how my logical volumes look.
/dev/mapper/rhel_wpdev3v-root
/dev/mapper/rhel_wpdev3v-home
/dev/mapper/rhel_wpdev3v-tmp
I have a /backup folder that is taking up most of the space.
What I am hoping to do is to add additional space to the server, then create logical volumes and specifically a LV called /backup along with /usr /var etc.
So here is my question, will the kernel/OS know to place the /backup (root/backup folder) to the Logical volume /backup and will it do it automatically for me.
I have never tried this before so any advice/help/pointers will be greatly appreciated.
Thank you,
Patrick
Responses
In answer to:
So here is my question, will the kernel/OS know to place the /backup (root/backup folder) to the Logical volume /backup and will it do it automatically for me.
"No. It won't automagically do things for you". Basically what you want/need to do is:
- Mount your backup volume to /mnt
cdto your current/backupdirectory- Copy all of its contents to
/mnt(something liketar cf - . | ( cd /mnt && tar xvf - )) - Nuke your current
/backupdirectory - Re-create the
/backupdirectory - Unmount the
/mntfilesystem - Remount your backup volume to
/backup - Ensure that you have an fstab (or equivalent) entry to make it so your backup volume gets mounted at
/backupon next boot - Reboot your system
- Verify that your backup volume is mounted at
/backup
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
