LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 08-17-2006, 02:49 AM   #1
rushy2uk
LQ Newbie
 
Registered: Aug 2006
Location: UK
Distribution: SuSE
Posts: 13

Rep: Reputation: 0
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?
 
Old 08-17-2006, 03:10 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 08-17-2006, 03:38 AM   #3
rushy2uk
LQ Newbie
 
Registered: Aug 2006
Location: UK
Distribution: SuSE
Posts: 13

Original Poster
Rep: Reputation: 0
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?
 
Old 08-17-2006, 03:41 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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...
 
Old 08-17-2006, 03:57 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
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.
 
Old 08-17-2006, 03:59 AM   #6
rushy2uk
LQ Newbie
 
Registered: Aug 2006
Location: UK
Distribution: SuSE
Posts: 13

Original Poster
Rep: Reputation: 0
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:
  1. Create a temp folder eg "/marketingNew".
  2. Mount sda2 to /marketingNew.
  3. Copy all existing data from /marketing to /marketingNew.
  4. Delete all data from /marketing, then remove /marketing directory.
  5. Rename /marketingNew to /marketing.
  6. 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!!
 
Old 08-17-2006, 05:45 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 08-17-2006, 05:52 AM   #8
rushy2uk
LQ Newbie
 
Registered: Aug 2006
Location: UK
Distribution: SuSE
Posts: 13

Original Poster
Rep: Reputation: 0
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!
 
Old 08-17-2006, 06:29 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
http://www.theregister.co.uk/2005/06...re_robonurses/
 
Old 08-17-2006, 10:43 AM   #10
rushy2uk
LQ Newbie
 
Registered: Aug 2006
Location: UK
Distribution: SuSE
Posts: 13

Original Poster
Rep: Reputation: 0
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!
 
  


Reply

Tags
mount, partition


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
I'm not able to mount windows partitions as rw akudewan Ubuntu 2 05-21-2005 02:11 AM
how t mount my ntfs partitions ??? BReal Fedora 5 04-19-2005 02:42 PM
can't mount partitions.. neverwhere Linux - Hardware 3 10-03-2004 04:08 AM
How to mount drives and partitions Larriemac Linux - Newbie 1 07-24-2004 08:02 PM
How to mount other partitions? hahler2 Mandriva 1 03-26-2004 02:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:30 PM.

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