Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
how can i move files between partitions without impacting path associated with applications?
For example, lets say I have partition "x" which is full, I add another HD and want to move all files from partition "x" to partition "y". so how can this be done without changing the file path name in all applications.
I hope my question is clear. Many thanks for your help.
Clear enough. Has been asked (and done) lots of times.
All you need to do is to create a temporary mount-point.
Mount the empty partition to that. Copy the directory
structure you want to move there. Umount it. Create an
/etc/fstab entry for the partition with the directory-name
of where the files live. Mount it. If it all works, umount
it again, delete the directories content on the old file-system
(leave the directory as such alone). Re-mount the directory/partition.
I would recommend using LVM logical volume manager. With it you can add several disks to one logical partition. It's also a very good alternative for adding space to an already filled disk. If you have hot-swappable disks you can do this without even restarting Linux.
I may be naive to say this but theoritically is it possible to do this with a soft link (ln -s) between the partition? Lets say I move the files to a new partition but create soft link between directories (old & new).
Sure, it's possible. But it's WAY easier and more elegant to simply change the fstab entry. All you have to do is edit one line. Plus, if you ever move the files again, you won't have a handful of soft links to change. Just edit the same line.
Last edited by zhangmaike; 08-22-2006 at 01:45 AM.