LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   resizing a primary partion (https://www.linuxquestions.org/questions/linux-newbie-8/resizing-a-primary-partion-347236/)

nanjil 07-27-2005 05:30 AM

resizing a primary partion
 
hello:
I installed linux . my hard drive is 20G. Following are teh file systems. I believe hda1 is a the primary partion.

Filesystem Size Used Avail Use% Mounted on
/dev/hda1 5.8G 2.2G 3.4G 39% /
/dev/hda6 12G 165M 12G 2% /home

the primary hda1 is follwoed by a 1G swap space and tehn the hda6.

I want to migrate /home to a new hard drive . also I want to make hda1 much larger.
hoiw can I do that?


thanx

juanbobo 07-27-2005 05:38 AM

You can save the home directory bit for bit into a file or directly into another partition which should be of the same size. If you save it as a file, you can restore the file by just setting "if=filename" and "of=destination_partition"

dd if=/dev/hda6 of=file_or_partition

You can resize your partition with either resize_reiserfs for Reiser or resize2fs for ext2 or ext3 partitions.

satinet 07-27-2005 05:43 AM

take a look at this:

http://www.redhat.com/docs/manuals/l...size-part.html

As for moving home. put you new disk on the machine. it will be hdb.

Then copy everything in /home to a temp directory. Edit your /etc/fstab file to make /home mount on /dev/hdb1 or whatever. mount the disk (mount -a) Then move the stuff in the temp directory back into /home. This is quick for you as you only have a very small amount of data in /home.

Although i don't really see what the benefit of a large root partition is.

Any more help with mounting etc please repost.

satinet 07-27-2005 05:52 AM

ooo. conflicting advise.

Just thought my approach would be easier for a newbie. Also dear poster, it helps if you mention your distro and file system etc.

FYI. hda1 is your primary partition. you can have upto 4 primary partitions on a disk. You will note that logical partitions are always numbered 5 and above. 1-4 being for primary partitions. Your /home is hda6 because hda5 is your swap partition.

Also will want to remove this swap partition before resizing for obvious reasons. You can then use crdisk of whatever to created a new or several new swap partitions. hurrar!

Tom

nanjil 07-27-2005 08:38 AM

resizing a primary partition
 
thank you for your comments.

My file system is apparently ext3.

the reason for wanting a larger root partiotion is I wanted to make sure I will enough room for all the development tools I will need for example like fftw, clapack , spice which I intended to put in /usr/local.

In the largeer disk I also wanted to mount /prjoects which will denote my local projects.

I will appreciate any other organizing suggestions.


All times are GMT -5. The time now is 01:57 AM.