LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-28-2007, 10:40 PM   #1
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Rep: Reputation: 30
Increasing the size of /usr partition


Hello friends,

Can I somehow increase the size of the /usr partition without going through the rigors of re-installation ?


Thanks.



Prabhat Soni
 
Old 01-29-2007, 12:36 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
yes.

you need clear space.
 
Old 02-01-2007, 09:27 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
A little addendum to Simons advice: If you have the space, create a new and greater partition and alter the /etc/fstab entry for /usr accordingly.
 
Old 03-07-2007, 11:07 PM   #4
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Sorry Sir I was out of town for a week and did not find time to look up your answers.

It is right that a new bigger partiotion has to be made and the appropriate entry in the /etc/fstab has to be created. But how would you populate the new bigger /usr partition. Would a simple copy from the old (to be abandoned) /usr partition to the new one would do ?


Thanks once again for taking time to reply.



Prabhat Soni

Last edited by prabhatsoni; 03-07-2007 at 11:41 PM.
 
Old 03-08-2007, 02:08 AM   #5
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
No, a simple cp won't do because it will skip the finer details; you'd end up with a crippled system.

Instead, you need to use cp -ax; and you should do it from single-user level, or even better, from a LiveCD.

Last edited by jay73; 03-08-2007 at 12:38 PM.
 
Old 03-08-2007, 08:43 AM   #6
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Sounds like good advice, did it work?
 
Old 03-08-2007, 10:57 PM   #7
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Sorry, I did not try it.
IN fact my hard disk had gone bust - it was an ancient piece. SO I had to buy a bew hard disk and re-install the system. ANd this time, being a little wiser (only a little :-)) I used LVM to avoid facing such situations in future.
In fact, my last query had academic implications only. May be this would help the posterity.

How would you go about using the live CD to initialise a new /usr partition. Woulod it be:
1) Boot from the live CD
2) Mount the old /usr (physical) partition on some other point (say /mnt/oldusr).
3) Mount the new and the bigger partition on say /mnt/newusr.
4) use cp command to copy tje contents of the old partition to new partition

Will that suffice or some other voodoo incantations would be required.


Thanks for taking time to reply.


Prabhat Soni
 
Old 03-09-2007, 03:24 AM   #8
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
Yes, that's how you would do it. Of course, there is a fifth step to perform before rebooting: fstab needs to be pointed to the new partition or it will simply boot off the old usr partition again.

There may be some complications, though. I had my tmp and var partitions under / on openSuse 10.2, then decided to move both to a single shared partition (I couldn't assign an individual partition to each because of that irritating 15 partition limit on Sata disks; it's OK if the disk is small, but if it's a 250 or 500GB, you end up with lots of space that can only serve as a data partition). Anyway, everything seemed to be fine at first but then I noticed klogd was unable to write to /var/run/klogd.pid. After a day of searching, I discovered that this was caused by the security device AppArmor; I still don't quite understand but someone recently suggested that AppArmor may actually register where certain key applications reside on the disk; if you move them over to a different partition, it's self-evidently going to have some objections. In the end, it was easy to fix, though.

Of course, it's infinitely more convenient to provide for future needs by making partitions large enough while installing. But as long as you're careful and use cp -ax, there's a way out of cramped partitions.

Last edited by jay73; 03-09-2007 at 07:03 AM.
 
Old 03-09-2007, 05:49 AM   #9
prabhatsoni
Member
 
Registered: Oct 2004
Location: India
Distribution: FC 12
Posts: 233

Original Poster
Rep: Reputation: 30
Thanks a lot Jay.
I guess I am a bit wiser now :-) feeling that now I am able to think onm y own.


Prabhat Soni
 
  


Reply



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
Increasing Windows partition size clucas Linux - Newbie 1 07-08-2006 04:34 PM
increasing partition size Don Powell Linux - Hardware 3 06-23-2005 09:14 AM
FC3 root partition size not increasing abhigo Fedora 6 01-29-2005 11:33 AM
Increasing partition size?? petey *BSD 5 04-25-2002 07:24 AM
Increasing Partition Size? petey Linux - General 1 04-24-2002 11:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:21 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