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? |
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.
|
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? |
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...
|
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. |
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:
Quote:
|
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.
|
Quote:
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! |
|
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:
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 07:11 PM. |