LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-17-2008, 04:29 PM   #1
goossen
Member
 
Registered: May 2006
Location: Bayern, Germany
Distribution: Many
Posts: 224

Rep: Reputation: 41
swapping partitions


Hello,

I have the following partitions on my linux box:

swap = 1 Gb.
/ = 1 Gb.
/home = 3 Gb.
/var = 4 Gb.
/usr = 3 Gb.

What I need to do is to change the usr and var partitions to have this:

swap = 1 Gb.
/ = 1 Gb.
/home = 3 Gb.
/var = 3 Gb.
/usr = 4 Gb.

How can this be done ?

Thanks in advance!
 
Old 06-17-2008, 05:20 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
I assume that you have a complete backup someplace safe before you try this. If you have a spare partition someplace you could do this:


Format spare, if necessary, using mkfs command.
Copy /var to spare using cp command.
Format /var partition using mkfs command.
Copy /usr to /var partition using cp command.
Format /usr using mkfs command.
Copy spare to /usr partition using cp command.

------------------
Steve Stites

P.S. You would have to do this by booting a liveCD or a copy of Linux in another partition from the ones being copied.

Last edited by jailbait; 06-17-2008 at 05:22 PM.
 
1 members found this post helpful.
Old 06-17-2008, 06:24 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
You didn't happen to format with LVM did you? It would make your life much easier for such tasks. If not, keep LVM in mind when installing your next Linux OS.
 
Old 06-17-2008, 10:33 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
If you just need the sizes changed, use the gparted livecd - just use the GUI to move the partition boundary. No copying needed.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
swapping /boot and / partitions Peff Linux - General 2 06-14-2005 12:20 AM
HOW TO -Swapping HD-0 to HD-1 ? penguinlnx Linux - Hardware 9 05-01-2005 05:36 AM
swapping HD ZaphyR Linux - Hardware 2 01-16-2005 10:11 AM
swapping 2 distros on different partitions hypermegachi Linux - General 10 08-05-2004 01:30 AM
RH 7.3 not swapping memory...? severedhead Linux - Distributions 4 05-28-2002 05:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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