RE: Move directory from one petition/device to another

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just thought of a possible solution, though it may be a bit convoluted...

If I understand your problem, you currently have the entire system in one filesystem on a raid5 device. You'd like to move the "system" parts off to another device. This leaves you with the old root filesystem, containing several directories, but without the system directories.

It is simple to make the other device your root filesystem, containing /bin, /sbin and /etc. But then you have nowhere to mount the old filesystem that makes it look like it used to.

Proposal: Create the new root filesystem, with the directories that are needed to boot the system. Mount the old filesystem at some random mount point; I'll call it /raid5. This gives you things like /raid5/home, /raid5/usr, /raid5/tmp...; none of which puts the system back into the form you want it. There are two paths from this point:

1) Symbolic links: Create symbolic links in the new root filesystem pointing to the proper /raid5 directories. Something like ln -s /raid5/usr /usr. All the base directories would be represented in the root filesystem, but most of them would point to the /raid5 filesystem. Job done.

2) "Odd" mounts: Create empty directories in the new root filesystem for the directories still on the raid5 device. (mkdir /usr ; chmod 000 /usr) Use the --rbind or --move options of the mount command from an init.d script during startup to logically "relocate" the /raid5 directories into the root filesystem. Something like mount --move /raid5/usr /usr. Job done.

I haven't tried this, but in theory (see signature), either of these should work, and would create the environment I THINK you're trying to achieve. If you do try this, and by some act of God, it actually works, please post back here telling what you did, any pitfalls you run across, and how it all works in the end. I, at least, would be very interested in the outcome.

-- 
Robert P. Nix		Mayo Foundation
RO-CE-8-857		200 First Street SW
507-284-0844		Rochester, MN 55905
-----
"In theory, theory and practice are the same, but
 in practice, theory and practice are different."

-----Original Message-----
From: fedora-list-bounces@xxxxxxxxxx [mailto:fedora-list-bounces@xxxxxxxxxx] On Behalf Of Les Mikesell
Sent: Monday, September 19, 2005 4:08 PM
To: Cameron Beattie; For users of Fedora Core releases
Subject: Re: Move directory from one petition/device to another

On Mon, 2005-09-19 at 14:25, Cameron Beattie wrote:
> I probably should have told the whole story. What I have is a bunch on
> directories on a RAID5 array and want to move all the system-type ones e.g.
> /etc /bin /sbin/ to a RAID1 array, leaving /home /usr etc where they are. I
> guess it would be easier the other way around but that's not an option.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux