Mounting filesystems
Hi everyone
Thanks for all the help on my past problems. Got a really nice running system now. I had a 10gb partition out there for Windows backup. Since I don't use Windows, I split it in half and created another Linux partition, dev/hdd7, ext3 of 5 gb. My current /dev/hdd1, my Redhat / partition is about 75% full. So I would like to mount the /usr file systems on /dev/hdd7, to free up some room. Maybe a few others. I am not sure exactly how to do this. Any help with this question would be very much appreciated. AIX has a nice tool called smit, which I can do this. But it doesn't seem like RedHat has linuxconf or other tools which would help me. Thanks again, especially Guenther, for all the help in past issues. Jim Macdonald |
mount /dev/hdd7 /mnt
cp -R /usr/* /mnt umount /mnt mount /dev/hdd7 /usr and then put a line in your /etc/fstab to mount it always |
HI yngwin
I did the first two like this mkdir /mnt/usr mount /dev/hdd7 /mnt/usr cp -R /usr/* /mnt/usr But I do have questions, that you might be able to answer. First of all, is what I did so far ok? I already had a mnt directory with my other partitions in it. Next, why the umount command? Then, can I do a link to the file from the root directory? I am just afraid to erase my bin directory and lose all my programs. And I don't really have space anywhere else to put it. Finally, the last command, mount /dev/hdd7 /usr has me confused. How will I modify it to fit the directory structure I created, if I can. And will it mount if I still have the /usr directory on the computer. Thanks for the help and information. Jim |
i would urge you not to use the commands given there, they could easily damage file locations / symlinks etc. and mess up special files.
use something like Code:
find /usr -xdev | cpio -pvmd /mnt using the general method you will not lose ANYTHING, you will simply duplicate it. when you mount a file system over an existing directory the data on the directory is simply hidden, and perfectly safe even though you can't get to it. you're using the umount command as you can only mount the device once. if you are happy that the system is tehn working fine, run "init 1" to drop down to single user mode and the umount the /usr partition and "rm -rf" it to free the lost space up, then just remount /usr. of course you'll need an entry in your /etc/fstab file as well in order to always mount it at boot time. there's lots of very similar questions around here if you look. http://www.linuxquestions.org/questi...der=descending |
Hi Chris
Thanks for the response. I did manage to get the whole directory to the new partition, remounted it and everything seems to work. I can't use your command now since I deleted the entire /usr directory on /dev/hdd1. Down to 13% usage on the partition. Thanks anyway for the help. You might see another post soon if something doesn't work. Jim |
All times are GMT -5. The time now is 03:39 AM. |