LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   How to move a folder to another disk partition (https://www.linuxquestions.org/questions/red-hat-31/how-to-move-a-folder-to-another-disk-partition-4175580734/)

Max_2802 05-26-2016 01:18 AM

How to move a folder to another disk partition
 
Hi,

On a RHEL production environment an installation error was made: a commercial third party software product was installed in /dev/mapper/rootvg-rootvol file system mounted on /
We would like to move it to /data (/dev/mapper/datavg-datavol file system).
Is a simple copy (move) enough to change the installation partition ?
thanks

Keruskerfuerst 05-26-2016 01:59 AM

Maybe the config file for the installation needs to be changed.

Max_2802 05-26-2016 02:34 AM

Hi,

yes in main configuration file of the product the complete absolute path for example /data/product_name is used,
after move /data/product_name will be in a different file system but it should be i think transparent.

Thanks

pan64 05-26-2016 07:17 AM

see man cp, especially -a

TB0ne 05-26-2016 09:10 AM

Quote:

Originally Posted by Max_2802 (Post 5551042)
Hi,
On a RHEL production environment an installation error was made: a commercial third party software product was installed in /dev/mapper/rootvg-rootvol file system mounted on /
We would like to move it to /data (/dev/mapper/datavg-datavol file system).Is a simple copy (move) enough to change the installation partition ?

Not to sound nasty here, but you're using a commercial application (which you probably paid for), on RHEL (which you ALSO pay for)....wouldn't support for that commercial, third-party package be the right people to call and ask?

You also don't tell us what this app is, so there's no way we can guess as to what the ramifications will be of just copying/moving it to a different location. You could just do an "mv <directory> </new/location>", and it'll move everything at once, removing it from its current location. The "cp -R" statement will COPY that entire directory structure to wherever you tell it to.

As far as it working afterwards...who knows?

Keruskerfuerst 05-26-2016 11:36 AM

you can use
1. cp -ar /source /destination
2. mv


All times are GMT -5. The time now is 05:21 PM.