[SLE] sym link or mount or what ?
Hi Folks, I have two hard drives , / (root) and /data , nd the / one is getting a bit low on empty space. So now i want to create/move the /home directory to /data/home and have it mapped out to /home for every body to see. ie /home would actualy be /data/home but all would see /home. I know how to copy the /home to /data/home. Reading up onsysm link would only let /home/data actualy be written to /home (whick is / drive not tha datadrive. So how is this done , mount , ln , or what. Once I create anc copy the files to /data/home and trick every one/thing to /home (mapped to /data/home) would I then delete /home or just keep it as a dead unused directory ? BTW any one got a 3 gigdrive there willing to part with real chaeply ? (in the US) Thnanks Samy -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Sat, 20 May 2000, Samy Elashmawy wrote: se> se> Hi Folks, se> se> se> I have two hard drives , / (root) and /data , nd the / one is getting a se> bit low on empty space. se> se> So now i want to create/move the /home directory to /data/home and have it se> mapped out to /home for every body to see. se> se> se> ie /home would actualy be /data/home but all would see /home. se> se> I know how to copy the /home to /data/home. se> se> Reading up onsysm link would only let /home/data actualy be written to se> /home (whick is / drive not tha datadrive. se> se> So how is this done , mount , ln , or what. se> Well, you didn't mention if you had anything currently on /data for best results, it's best not to. Or if you do, then you can simply move it later. Anyway, this is how I've done it in the past: 1. make sure all user sessions are closed and your logged on as root. 2. the enter /home and do a 'cp -a <each directory> /data' 3. after copying each to /data, move the existing /home to /homebak temporarily. 4. unmount /data and remount it as /home 5. if everything looks ok, then add the entry to /etc/fstab and delete /homebak Now, if you did have actual existing data in /data before all this, you can either leave it there (kinda a weird place for it) or move it to the main drive by creating a /data directory their. Anyway, this is just a suggestion, do with it as you will. :) se> Once I create anc copy the files to /data/home and trick every one/thing to se> /home (mapped to /data/home) would I then delete /home or just keep it as a se> dead unused directory ? se> se> BTW any one got a 3 gigdrive there willing to part with real chaeply ? (in se> the US) se> se> Thnanks se> se> Samy se> se> -- S.Toms - tomas@primenet.com - www.primenet.com/~tomas SuSE Linux v6.3+ - Kernel 2.2.14 -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Sat, 20 May 2000, Samy Elashmawy wrote:
I have two hard drives , / (root) and /data , nd the / one is getting a bit low on empty space.
So now i want to create/move the /home directory to /data/home and have it mapped out to /home for every body to see.
ie /home would actualy be /data/home but all would see /home.
I know how to copy the /home to /data/home.
Reading up onsysm link would only let /home/data actualy be written to /home (whick is / drive not tha datadrive.
So how is this done , mount , ln , or what.
Once I create anc copy the files to /data/home and trick every one/thing to /home (mapped to /data/home) would I then delete /home or just keep it as a dead unused directory ?
Well, no, if you set things up so that everyone thinks /data/home is actually /home, and then you delete /home, you wipe out everyone's home directory. However, if you get things set up this way *before* you delete /home, then there is no way to get to the old /home so you can't free the space. You have to do things in a certain order. And you have to be logged in as root, which, fortunately, doesn't have any files in /home. In order: (1) mkdir /data/home (2) cp -a /home/* /data/home (note: cp -a is automatically recursive AND copies the ownerships and permissions, as well as names and contents. It also handles links correctly.) (3) rm -rf /home (4) ln -s /data/home /home (As for getting a 3-gig drive cheap, check and see if there are any used-computer outlets in your area. I have two I frequent. However, if you have the money you are better off buying new drives: for about the price of three used 2-gig drives you can buy a new 20-gig drive. Also, a new drive is under warranty - since drives have moving parts, this is a bigger factor than with some components.) -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
ok now that I have confuesed every one including my self. /dev/hda2 is mounted as / and has a subdir called /home and is almost full. has ~ 250 meg free /dev/hdb1 is mounted as /data and is slmost all free has ~500 meg free I want to now have /data/home mapped as /home where any time any one access /home thay are actually accessing /data/home and only see /home as far as they are concerned. once its set up I have no problem with emptying out the real /home directory as all its data willbe copied over to /data/home before emting it out. I ahve room on /data to make a temp dir to place all the contents of the real /home whiel cahnging over athan coping to to the new /data/home that every one sees as /home (pionting to /data/home) At 11:40 AM 5/20/2000 -0700, Don Edwards wrote:
On Sat, 20 May 2000, Samy Elashmawy wrote:
I have two hard drives , / (root) and /data , nd the / one is getting a bit low on empty space.
So now i want to create/move the /home directory to /data/home and have it mapped out to /home for every body to see.
ie /home would actualy be /data/home but all would see /home.
I know how to copy the /home to /data/home.
Reading up onsysm link would only let /home/data actualy be written to /home (whick is / drive not tha datadrive.
So how is this done , mount , ln , or what.
Once I create anc copy the files to /data/home and trick every one/thing to /home (mapped to /data/home) would I then delete /home or just keep it as a dead unused directory ?
Well, no, if you set things up so that everyone thinks /data/home is actually /home, and then you delete /home, you wipe out everyone's home directory.
However, if you get things set up this way *before* you delete /home, then there is no way to get to the old /home so you can't free the space.
You have to do things in a certain order. And you have to be logged in as root, which, fortunately, doesn't have any files in /home.
In order:
(1) mkdir /data/home
(2) cp -a /home/* /data/home
(note: cp -a is automatically recursive AND copies the ownerships and permissions, as well as names and contents. It also handles links correctly.)
(3) rm -rf /home
(4) ln -s /data/home /home
(As for getting a 3-gig drive cheap, check and see if there are any used-computer outlets in your area. I have two I frequent. However, if you have the money you are better off buying new drives: for about the price of three used 2-gig drives you can buy a new 20-gig drive. Also, a new drive is under warranty - since drives have moving parts, this is a bigger factor than with some components.)
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Sat, 20 May 2000, Samy Elashmawy wrote:
ok now that I have confuesed every one including my self.
The only confusing point is why you believe that, after you set things up so that people's home directories are in /data/home, that location isn't the "real /home". It'll be the only /home anyone has. Everything wil work properly. How much more real could it be? There are, as far as I am aware, exactly three ways to incorporate space on a disk partition into the file system. (1) Inform the boot process that the partition is / (the root partition). Obviously this applies only to the root partition. And you *must* do it to *exaclty* one partition. (2) Mount the *entire* formatted partition into a specified directory. This means that any reference to that directory is a reference to that partition. However it applies only to the *entire* partition, not to a subset of it. (3) Having already mounted the partition somewhere, create a symbolic link to a file or directory on it. That file or directory will then appear in two places in the file system, possibly with different names. What you need in this case is #3. In your case, you have /data already mounted, and have /data/home. You need to copy the entire contents of /home into /data/home, with all permissions intact and all symbolic links updated. Next, you need to make /data/home appear to be /home. You CANNOT do this while another directory named /home exists. So, delete /home. Then create a symbolic link, named /home, that points at /data/home. Now, you want to know where the "real /home" is? It is, simultaneously, in two places: /home and /data/home. Your only even mild concern is that /data must be mounted before any reference to anyone's home directory is valid. It isn't a big deal, as mounting the partitions in /etc/fstab is one of the first things attended to in the boot process. -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Sat, 20 May 2000, Samy Elashmawy wrote:
ok now that I have confuesed every one including my self.
The only confusing point is why you believe that, after you set things up so that people's home directories are in /data/home, that location isn't the "real /home". It'll be the only /home anyone has. Everything wil work properly. How much more real could it be?
There are, as far as I am aware, exactly three ways to incorporate space on a disk partition into the file system.
(1) Inform the boot process that the partition is / (the root partition). Obviously this applies only to the root partition. And you *must* do it to *exaclty* one partition.
(2) Mount the *entire* formatted partition into a specified directory. This means that any reference to that directory is a reference to that
However it applies only to the *entire* partition, not to a subset of it.
(3) Having already mounted the partition somewhere, create a symbolic link to a file or directory on it. That file or directory will then appear in two
At 07:40 PM 5/21/2000 -0700, Don Edwards wrote: partition. places
in the file system, possibly with different names.
What you need in this case is #3.
Thanks , now you have cleared it all up. I was under the impression that a sysm link would keep the /home dir in TWO paces at once , therefore duplicating it. Not wat I want , and not as you have just clearly explianed.
In your case, you have /data already mounted, and have /data/home. You need to copy the entire contents of /home into /data/home, with all permissions intact and all symbolic links updated.
will log in as root , and copy via mc.
Next, you need to make /data/home appear to be /home. You CANNOT do this while another directory named /home exists. So, delete /home. Then create a symbolic link, named /home, that points at /data/home.
Right , so I need to copy/move it to a temp dir , then after creating the sym link , move it back to the new /home (sysm link dir)
Now, you want to know where the "real /home" is? It is, simultaneously, in two places: /home and /data/home.
Got ya , the /home is a sim link to /data/home !
Your only even mild concern is that /data must be mounted before any reference to anyone's home directory is valid. It isn't a big deal, as mounting the partitions in /etc/fstab is one of the first things attended to in the boot process.
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (3)
-
samelash@ix.netcom.com
-
tomas@primenet.com
-
warrl@blarg.net