LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-23-2005, 12:00 PM   #1
squinn
LQ Newbie
 
Registered: Jul 2004
Posts: 25

Rep: Reputation: 15
How to safely re-partition


I need to resize my partitions. How can I safely make my /root partition small and allocate the saved space to /home?

I am using RedHat EL 3. I thought of using cfdisk, but RH 3 does not have it (only sfdisk and fdisk).

Any recommendations/advice appreciated.

-squinn
 
Old 08-23-2005, 12:38 PM   #2
corfe
Member
 
Registered: Dec 2004
Location: Washington State, USA
Distribution: Debian Sid
Posts: 128

Rep: Reputation: 15
The normal way to resize a partition is to delete it (losing EVERYTHING on the partition), and make a new one of the new size you want.

That being said, a lot of programs will get around this for you, and although some consider the process to be hackish, I've never had a problem doing it. Partition magic is a commercial program that will resize partitions for you, and GNU's "parted" will also do it. I'd try booting into a live CD and running parted as root.

Just run "parted /dev/hda", where /dev/hda is your hard drive you want to repartition. Then type "print" at the command line to see the size of each partition on the drive. You can change the units it uses by typing "unit m", "unit G", "unit K", "unit %", etc.

Then type "resize x start end" where x is the number of the partition you want to resize (as given in print), start is a number in the given unit saying where you want the partition to start, and end is a number in the given unit where you want the partition to end.

You might want to check parted's documentation to find out what operations your filesystem supports (e.g. I don't think you can resize reiserfs, and changing ext3's start position of the partition doesn't work either), and make sure you understand everything before you go through with it.

AS ALWAYS, YOU SHOULD BACK UP ANYTHING IMPORTANT BEFORE YOU GO THROUGH WITH THIS. I've never had problems doing it, but I've only done it a few times, and your mileage may DEFINITELY vary. User error, software error, or hardware error : if just one happens in the right way, say bye-bye to your data.

--------------

That being said, after you've resized the root partition, you can create a new partition in the unpartitioned space, move the contents of /home over to it, and setup /etc/fstab to mount your newly created partition to the /home directory.

Good luck!
 
Old 08-23-2005, 02:31 PM   #3
WhatsHisName
Senior Member
 
Registered: Oct 2003
Location: /earth/usa/nj (UTC-5)
Distribution: RHL9;F1-10; CentOS4-5; DebianSarge-Squeeze
Posts: 1,151

Rep: Reputation: 46
squinn: Are / and /home set up in simple partitions or are they set up as an LVM?

If you are not sure, from the terminal run:

fdisk -l

and see if any partition types are “linux lvm”.
 
Old 08-23-2005, 02:38 PM   #4
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Honolulu, HI
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
parted works really well resizing partitions. also here are the instructions for resizing partitions in RHEL3.

Red Hat Enterprise Linux 3: System Administration Guide
Chapter 5. Managing Disk Storage

http://webserver.smast.umassd.edu/Sy...size-part.html
 
  


Reply


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
how to safely remove linux partition from a dual boot system? parv Linux - Newbie 7 05-01-2012 09:59 AM
format reiserfs partition to ext3 safely chocloman Linux - Software 2 10-03-2005 04:14 PM
Safely resizing NTFS partition jnsg Linux - General 9 01-12-2005 11:35 PM
increasing my ex3 partition safely ?? abbasakhtar Linux - Newbie 4 10-05-2003 10:08 PM
safely, easily resizing ext3 partition Independence Linux - General 10 10-13-2002 01:04 PM


All times are GMT -5. The time now is 09:30 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration