Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-04-2003, 10:53 AM   #1
Registered: Oct 2002
Location: Florida
Distribution: RedHat
Posts: 109

Rep: Reputation: 15
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
Old 01-04-2003, 11:38 AM   #2
Registered: Dec 2002
Location: China
Distribution: Arch
Posts: 359

Rep: Reputation: 33
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
Old 01-04-2003, 03:36 PM   #3
Registered: Oct 2002
Location: Florida
Distribution: RedHat
Posts: 109

Original Poster
Rep: Reputation: 15
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.

Old 01-04-2003, 04:08 PM   #4
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
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
find /usr -xdev | cpio -pvmd /mnt
instead of a risky recursive copy.

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.
Old 01-05-2003, 07:41 AM   #5
Registered: Oct 2002
Location: Florida
Distribution: RedHat
Posts: 109

Original Poster
Rep: Reputation: 15
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.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting NTFS filesystems rw atom Linux - Newbie 5 01-25-2005 10:29 AM
changing partitions filesystems and mounting them? dr_zayus69 Linux - Hardware 7 12-28-2004 08:22 PM
problem mounting different filesystems in suse9.0 ewan_m Linux - Newbie 5 05-06-2004 04:50 AM
::mounting filesystems and autostarting programs!!:: XxAndyxX Linux - Software 3 05-14-2003 07:00 PM
mounting extended vfat filesystems lommer0 Linux - Newbie 2 01-17-2002 11:43 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration