Antony wrote:
I have a Debian system on really small Flash memory like an embed
system. A hard drive is mounted onto the system. I want to add more
processes to the system like mail server. But the problem is /usr, /var,
/etc are running out of space on the Flash memory. I'm planning to do
the following:
- make /usr, /var, /etc, /home directories on the mounted hard drive.
- copy /usr, /var, /etc, /home original directories to new created
directories.
- edit /etc/fstab to mount these directories to new created locations.
- remove the old /usr, /var, /etc, /home directories.
Is that unsafe to do so?
Do files in these directories being accessed before mounting from
/etc/fstab?
Antony,
As I see it, there should be no issues at all with your plan. It is
true that /etc needs to be accessed 100% of the time, however, if you
copied /etc to a new / location, edited /etc/fstab to reflect the new
file locations for your new tree structure, then issued mount -a or
perhaps mount -a -o remount, rw (I confess I have not done this for /,
see man mount) but I think mount -a will work just fine. /etc is not
special in any way, just before the mount -a it will path to your usb
drive and after (unless you make a mistake in fstab) it will path to
your new tree structure. Since all the files are the same, the running
kernel will not see any difference and your running process should not
see any difference.
I just don't see the concern others have posted about moving /etc,
perhaps there is an error on my understanding that needs to be cleared
up? What is the difference between doing this and say untaring your
backup or doing a chroot (which now points to a different file
structure)? Now if you have a mistake in fstab, I see bad things
happening that might require a recovery boot to fix.
I am awaiting the results to increase my understanding.
HTH
--
Damon L. Chesser
[EMAIL PROTECTED]
http://www.linkedin.com/in/dchesser
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]