LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   New drive, mount home... (https://www.linuxquestions.org/questions/slackware-14/new-drive-mount-home-236585/)

TheRudy 09-29-2004 05:46 AM

New drive, mount home...
 
First i new to this linux stuff and so on and can't find how to do this!

here is my fstab:

Code:

/dev/hda5          swap          swap
/dev/hda1          /                  ext2
/dev/hdd1          /usr/local    ext2
/dev/cdrom        /mnt/cdrom
...

I have two disks and on one i have OS and on second i currently have /usr/local (i just set it on installation this folder).

I would like to also have /home (this is where the 'big' files have their place) on hdd1 if possible, if not then just /home without /usr/local.

How to do this? What if i just change in fstab from /usr/local to /home and reboot? Do i have to umount it first and the mount?

Any help is wanted!

carboncopy 09-29-2004 06:51 AM

I pressume you haven't compile any program and installed it at /usr/local/ cause that is normal default location.

And do you have any other user created on your system?
If not,

You are good to go in changing /usr/local to /home

before you do that just unmount /dev/hdd1
after you done the change, just mount /dev/hdd1

df -h to verify

TheRudy 09-29-2004 08:52 AM

I have Webmin installed in there! This is the only thing i installed.

Oh and PHP package from CD, but that doesn't count or it does?:)

As for the users, i have 2 or 3 users created, but they can be removed. Don't know how to remove them...:)

Is this problem? More editing i gues :)

So the hdd1 will held only /home and /usr/local will be back on hda1, after that changes are done?

jschiwal 09-29-2004 07:49 PM

You need to mount the /dev/hdd1 partition somewhere else so that you can first move the contents to the /usr/local directory in the root partition (/dev/hda1). Then you need to copy the contents of the /home directory ( on /dev/hda1 ) to the mounted /dev/hdd1 directory.

Be sure that all the permissions and user/group attributes are copied as well, and be sure to copy the hidden files and directories ( such as .kde, .ssh, .bashrc ) that exist in the home directories. After the contents of the hda1/home directory are copied on the new partition, you can delete the files and subdirectories. They will be hidden when you mount /home on /dev/hdd1 anyway.

After that, change the /etc/fstab line to
/dev/hdd1 /home ext2

carboncopy 09-30-2004 01:25 AM

It would be best doing all that jschiwai says while boot-up into the rescue disk.


All times are GMT -5. The time now is 09:49 AM.