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, |
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. |
Quote:
mount /dev/hdax home1 as opposed to mount home1 /dev/hdax ? Sorry if I'm wrong :) |
Yeah, I think you are right?
|
actually it's mount /dev/hdax /home1 ;-)
|
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 |
Yep it's:
mount <dev> to <dir> so mount /dev/hdax /home1 You are right, good job. |
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 |
didn't know that, saves me some typing ;-)
~Progster |
oops ! i knew it looked kind of funny when i posted my first reply.. :)
|
gahhh and to think that you personally get paid $8000 a year to moderate this site.... :rolleyes:
|
Quote:
I only wish I got paid at times, this would be the coolest job to have. :) |
progster, typing:
cd /mnt mount /dev/hda6 backup takes more keystrokes then typing in: mount /dev/hda6 /mnt/backup |
DOes that matter? Maybe his fingers stroke 300ms faster than us do.
|
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. |