LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-24-2006, 05:34 PM   #1
Bonsai_XYZ
LQ Newbie
 
Registered: Jul 2006
Posts: 4

Rep: Reputation: 0
merge partitions.


I have the following filesystem. How do I removed the partition 7 and use that space for partition 6 so I can put /var and /home on the same partition. Any help would be great. thanks.

[root]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 521748 210560 284684 43% /
none 1033704 0 1033704 0% /dev/shm
/dev/hda7 104339368 1033676 103305692 1% /home
/dev/hda5 5114432 1142456 3971976 23% /usr
/dev/hda6 5114432 5114412 20 100% /var


(parted) print
Disk geometry for /dev/hda: 0.000-114473.460 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 517.719 primary ext3
2 517.720 2518.000 primary linux-swap
4 2518.000 114470.969 extended
5 2518.031 7522.624 logical xfs
6 7522.655 12527.248 logical xfs
7 12527.279 114470.969 logical xfs
 
Old 07-24-2006, 06:31 PM   #2
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
Because hda6 is full and hda7 is huge and nearly empty, I'd suggest:
Maybe it's easier to retain the same setup - you can still get what you want
- shrink hda7 so it's the size that you want added to hda6, say shrink it to 5GB
- create a new hda8 in the empty space
- put /home on hda8
- empty hda7
- delete hda7 (so your new hda8 will be hda7 again)
- grow hda6

Remember:
- you can't mess with live filesystems, so use a live-cd, not your installed linux, and 'umount /dev/hda*' if the partitions are mounted (use 'mount' to find out if they are), before changing partitions in any way
- you will need to 'mount' partitions manually
- when copying, use for example, 'cp -R --preserve /source /destination' to retain permissions and ownership
- if you do it this way you won't need to mess with /etc/fstab but you should probably check it out anyway to see how your partitions relate to your filesystem

Make sure you know what each command is doing before committing yourself. These things can be difficult to fix, once messed up.

You could also consider leaving some unpartitioned space, for future projects or needs.
 
Old 07-25-2006, 12:11 AM   #3
Bonsai_XYZ
LQ Newbie
 
Registered: Jul 2006
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the help. I'm not too familar with working with partitions. What utitlity do I use to delete and create partitions, fdisk? thanks.
 
Old 07-25-2006, 12:47 AM   #4
debiant
Member
 
Registered: Jul 2006
Distribution: Source Mage 0.9.6
Posts: 196

Rep: Reputation: 30
Quote:
Originally Posted by Bonsai_XYZ
Thanks for the help. I'm not too familar with working with partitions. What utitlity do I use to delete and create partitions, fdisk? thanks.
cfdisk is a lot more user friendly choose the harddrive

cfdisk /dev/hd[x]
 
Old 07-25-2006, 02:45 AM   #5
parichay
LQ Newbie
 
Registered: Jul 2006
Posts: 7

Rep: Reputation: 0
or u can use parted for increasing and creating partitions.
 
Old 07-25-2006, 04:04 AM   #6
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
There is also gparted and qtparted - these are both easy-to-use graphical versions of parted.
gparted comes on its own live-cd and some say it's the best, but in my experience the live-cd doesn't have the best hardware recognition, so may not run on your machine:
http://gparted.sourceforge.net/livecd.php

qtparted is my favorite and is included in the knoppix live-cd and probably elsewhere as well (apparently it's also on mepis)
 
  


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 merge two mailboxes--------------------- dhanju Linux - Newbie 5 05-10-2010 07:35 AM
convert and merge a fat32 to ext3 and then merge w/ another ext3? nkoplm Linux - General 3 03-23-2006 11:37 PM
merge partitions? Leonig Mig Linux - General 2 06-06-2005 12:15 PM
Is it possible to merge two partitions cheetahman SUSE / openSUSE 7 04-10-2005 09:05 PM
split/merge zelda Linux - General 4 04-01-2002 09:06 AM

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

All times are GMT -5. The time now is 06:28 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration