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

Re: A-posteriori use of another HDD for the /home/username



On 12/25/2009 11:49 AM, Merciadri Luca wrote:
> Hi,
>
> After some data manipulation, I now have a free ext3 disk. My aim is
> to put the entire content of my /home/merciadriluca/ in it, at the
> place of on the HDD where /etc/, /sys/, and other stuff resides.
>
> The problem is that I have a lot of apps and scripts for which I have set
> the home folder to /home/merciadriluca/.
>
> As I want the transition to be as smooth as possible, the best thing
> to do would be --at least to me-- to play around with symlinks. My
> first idea was to create a symlink `merciadriluca' in /home/. This
> symlink would be pointing to my new drive. The problem is that, on the
> one hand, the name of this symlink needs to be the same as
> `merciadriluca' (so that I do not need to modify all my scripts,
> etc.); on the other hand, my session's name still needs to be
> `merciadriluca' so that I do not need another account. That is, I am
> thus obliged to create two files with the same name, /i.e./
> `merciadriluca', in /home/. Doing this is however avoided.
>
> Does somebody have any suggestion about how to cope with this, by
> doing as little modifications as possible (I have lots of scripts
> everywhere, things in /etc/init.d which launch /home/... things, etc.,
> backup tools, etc.)?
>
> Thanks.

Merciadri,

Kudos for the use of Latin in a question, especially Latin used in
philosophy.  Linux is very big on the use of abstraction, and separates
the concepts of  disks, file  systems, and directories.  Unlike Windows
they are not one and the same.

http://en.wikipedia.org/wiki/Abstraction

You may be asking to use this disk space as part of the root file
system.  That is easy to do if you have chosen to use a logical volume
manager.

You are probably asking to use this disk space as part of the root
directory structure.  This is trivial and uses the mount command (and
/etc/fstab) rather than symbolic links.  You indicate there is already a
partition table and file system on the disk.  There are various ways to
do this but basically rename your home directory, create a new, empty
home directory with appropriate ownership and permissions.  Mount the
new file system over this emtpy directory, thus: "mount /dev/sdc1
/home/merciadriluca".  Copy the files from the old home directory into
the new one using appropriate command switches to copy directories,
permissions, links, etc.  Then add an entry to /etc/fstab to make the
mount permanent.

Here is a bunch of detailed instructions.

http://www.ibm.com/developerworks/aix/library/au-satmigrat.html

Bill


Reply to: