LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to move mount points after install? (https://www.linuxquestions.org/questions/linux-general-1/how-to-move-mount-points-after-install-26179/)

concoran 07-19-2002 06:40 PM

How to move mount points after install?
 
Currently, the /home, /root etc exit on the same partition.
Now, I want to move /home to a different partition and mount
it from there. What's the procedure to do it?
I changed the /etc/fstab to reflect it, but it didn't work.
TiA,

trickykid 07-19-2002 07:13 PM

Does the /home directory have user directories in it or is pretty empty at this time ? Also are you trying to mount to a existing parition with other directories on it or is it a newly created partition ?

You can always try this:

mkdir home1

mount home1 /dev/hdaX (where x is number of partition you want it mounted)

cp /home/* /home1/

rm -rf /home (be careful, not to make a space between / and h, you could also hold off on this after a reboot just in case if things go wrong, so you still have the files there)

mv /home1 /home

edit fstab accordingly with the new mount position. there might be an easier way, but that is how I would do it, something along the lines like that.

RefriedBean 07-20-2002 01:45 AM

Quote:

Originally posted by trickykid
mount home1 /dev/hdaX (where x is number of partition you want it mounted)

Is it just me, or is it supposed to be

mount /dev/hdax home1

as opposed to

mount home1 /dev/hdax

?

Sorry if I'm wrong :)

MasterC 07-20-2002 02:33 AM

Yeah, I think you are right?

progster 07-20-2002 07:21 AM

actually it's mount /dev/hdax /home1 ;-)

MasterC 07-20-2002 09:08 AM

Wow, I am really not sure. I will have to go home and try now. Both sound right??? I am gonna browse the man pages really quick to check if it's there.

Cool

MasterC 07-20-2002 09:09 AM

Yep it's:
mount <dev> to <dir>
so
mount /dev/hdax /home1

You are right, good job.

RefriedBean 07-20-2002 10:26 AM

Ok, I just tried the method where home1 does not have a preceding /.

Lets say I want to mount /dev/hda6 on /mnt/backup.

cd /mnt/
mount /dev/hda6 backup

Works great. :)

RefriedBean

progster 07-20-2002 10:28 AM

didn't know that, saves me some typing ;-)

~Progster

trickykid 07-20-2002 01:23 PM

oops ! i knew it looked kind of funny when i posted my first reply.. :)

acid_kewpie 07-20-2002 05:17 PM

gahhh and to think that you personally get paid $8000 a year to moderate this site.... :rolleyes:

trickykid 07-20-2002 05:38 PM

Quote:

Originally posted by acid_kewpie
gahhh and to think that you personally get paid $8000 a year to moderate this site.... :rolleyes:
Yeah jeremy denied my raise I asked for, so I might not be applying myself with my posts until I get it.. :D

I only wish I got paid at times, this would be the coolest job to have. :)

linuxcool 07-20-2002 08:44 PM

progster, typing:

cd /mnt
mount /dev/hda6 backup

takes more keystrokes then typing in:

mount /dev/hda6 /mnt/backup

shoot2kill 07-20-2002 09:00 PM

DOes that matter? Maybe his fingers stroke 300ms faster than us do.

MasterC 07-21-2002 01:20 AM

I am not sure if I am right because it works for me, so I am simply thinking this is right, so feel free to correct me if I am wrong...

If you have your cdrom (or whatever) set up in your fstab like this:
/dev/cdrom /mnt/cdrom auto default 0 0
Then to mount your cdrom all you have to type is:
mount /mnt/cdrom
and it will mount it as it is set up in your fstab, so in the long run saving you even more keystrokes.


All times are GMT -5. The time now is 03:56 PM.