Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-17-2006, 02:49 AM
|
#1
|
LQ Newbie
Registered: Aug 2006
Location: UK
Distribution: SuSE
Posts: 13
Rep:
|
How many partitions can I mount to / ?
I'd like to add more capacity to the root of our Suse server, as it only has 85MB left, and certain applications say the Operating System has throw an "out of space" error.
I have an unused partition, but I'm not sure if I'm allowed to mount it to "/", or even if it's possible.
How can I add the spare 20GB from partition sda2, to the root of the filesystem ( / ), without deleting existing files?
|
|
|
08-17-2006, 03:10 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
you can't add space to the / partition, what you'd actually do is attach an additional partition to take over for a particular subdirectory that exists on that partition, e.g. /usr, /var /home... often it's a simple case of just mounting the new partition in a temporary location , e.g. /mnt/usr and then doign a recursive copy of what you want it to be, e.g. "cp -r /usr /mnt/usr" then it's just a case of mounting it and you should be done. not really done though, as that old data will stilll be on the original drive,. but once you're happy with it, drop to single user mode (run "init 1") and unmount the new partition to expose the old files. then just delete the files (or rename the directory for evan more security, e.g. from /usr to /oldusr. then create a new /usr directory that's empty). then mount the new parition again and you'll have all the extra space.
|
|
|
08-17-2006, 03:38 AM
|
#3
|
LQ Newbie
Registered: Aug 2006
Location: UK
Distribution: SuSE
Posts: 13
Original Poster
Rep:
|
Thanks for the advice Chris.
I don't need extra space for the /home directory, as there is currently 23GB spare.
Can you suggest another subdirectory that gets large?
Or can you tell me how to search for large files, so I can find out myself?
|
|
|
08-17-2006, 03:41 AM
|
#4
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
my favourite way is to change to / and run "du -h --max-depth=1" this will then list the size of all directories there so you can plan your attack that way. also don't overlook the potential that you've lost space from other causes than simply installing more stuff, there are many ways to lose a lot of space that you should otherwise have reclaimed...
|
|
|
08-17-2006, 03:57 AM
|
#5
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Be sure to look through your /etc/fstab file. Some system directories such as /usr, /var or /tmp might make good candidates to be relocated on your spare partition. Depending on how much software you have installed, the /usr directory tends to be the next largest partition after /home, and might make a good candidate for moving.
Take a look at "du -sh /usr" to see how much space it occupies.
One thing that is very common in servers is to have a dedicated partition for /var. The /var/logs directory can get full sometimes, and having a separate /var partition can prevent a hacker from filling up your root directory due to large logs being generated.
|
|
|
08-17-2006, 03:59 AM
|
#6
|
LQ Newbie
Registered: Aug 2006
Location: UK
Distribution: SuSE
Posts: 13
Original Poster
Rep:
|
So far, so good!
I used that command and headbutted the monitor as I saw 16GB next to the /marketing directory; I literally copied a load of stuff from our old NT4 server the other week (my memory is sooo poor!).
Right, so let me get this clear.
The next steps should be: - Create a temp folder eg "/marketingNew".
- Mount sda2 to /marketingNew.
- Copy all existing data from /marketing to /marketingNew.
- Delete all data from /marketing, then remove /marketing directory.
- Rename /marketingNew to /marketing.
- Make sure the share name is the same as before.
Does that sound right?
Quote:
Vampire Robonurses hunt in packs
|
Nice statement, but wrong. I just saw a lone Vampire Robonurse hoover past my window!!
|
|
|
08-17-2006, 05:45 AM
|
#7
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
yeah those steps are just about right, and by the look of it this is human data, not application data, so you can chuck it around as you wish. so one thigns i'd add is to rename the directory, don't delete it. just to be on the safe side. delete it once you know everythign is running just fine.
|
|
|
08-17-2006, 05:52 AM
|
#8
|
LQ Newbie
Registered: Aug 2006
Location: UK
Distribution: SuSE
Posts: 13
Original Poster
Rep:
|
Quote:
Originally Posted by acid_kewpie
yeah those steps are just about right, and by the look of it this is human data, not application data, so you can chuck it around as you wish. so one thigns i'd add is to rename the directory, don't delete it. just to be on the safe side. delete it once you know everythign is running just fine.
|
Excellent, thanx for your help Chris....much appreciated.
p.s I just saw another lone Vampire Robonurse hoover past my window!! Maybe you should update your signature to say "Vampire Robonurses *mostly* hunt in packs", lol!
|
|
|
08-17-2006, 06:29 AM
|
#9
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
|
|
|
08-17-2006, 10:43 AM
|
#10
|
LQ Newbie
Registered: Aug 2006
Location: UK
Distribution: SuSE
Posts: 13
Original Poster
Rep:
|
I have one more question.
I'm having problems unmounting sda2; an error message says "permission denied'.
How can I unmount sda2 from /test?
Quote:
Originally Posted by acid_kewpie
|
Ah, I didn't read that one...but I'm familiar with the "Lizard Alliance", lol!
I love theregister! I scour through the stories every lunchtime and chuckle at the style of the witty writers...comedy!
|
|
|
All times are GMT -5. The time now is 02:30 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|