LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-19-2012, 10:20 AM   #1
wcrandthor
LQ Newbie
 
Registered: Aug 2012
Distribution: OpenSUSE 12.1
Posts: 9

Rep: Reputation: Disabled
Unhappy How do I add to my main / mount point from my /home?


I'm running OpenSUSE 12.1 within a virtualbox, I've allocated 40GB of space (/dev/sda) for this virtual machine.

I have two partitions set up:
/dev/sda1 (linux-swap) has ~700MB
/dev/sda2 (mount point /) has 5GB
/dev/sda3 (mount point /home) has ~34GB

My /dev/sd2 filled up and I'm only using 5GB from my /home so I want to give some of the extra to /dev/sd2.

How do I do this?
I have GParted and I can see the partitions:
[linux-swap][dev/sda2][dev/sda3(used) dev/sda3(unused)]

I logged in as root and I can unmount /dev/sda3 successfully so that I can make a new partition, or unallocate space from it... but I don't see anyway to combine partitions. Also, I'm concerned that by shifting /dev/sda3 I'm going to screw something up. EX:
[linux-swap][dev/sda2][/new_space_from_sd3][dev/sda3(used) dev/sda3(unused_smaller)]

How can I safely accomplish my goal?
 
Old 09-19-2012, 10:41 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
First of all, do not do this from a running system, do this from a live-CD. Download for example the GParted live-CD and mount it to the virtual machines CD drive, then boot the VM from that CD. Now you can easily use GParted to shrink the /home partition and extend the /-partition.
If you really want to merge those partitions you first have to copy the contents of the /home partition to a separate drive, then delete the /home partition, extend the / partition and copy the data back to the /home folder. Keep in mind that you also have to adapt your /etc/fstab in this case.
Tip for the future: You can avoid situations like these with using LVM instead of ordinary partitions.
 
Old 09-19-2012, 11:08 AM   #3
wcrandthor
LQ Newbie
 
Registered: Aug 2012
Distribution: OpenSUSE 12.1
Posts: 9

Original Poster
Rep: Reputation: Disabled
@TobiSGD - Really appreciate the help. I downloaded the iso and booted from it, works great and I can move around any of the partitions I want now. Which is great. Now the only question I have is, is this safe?

The way I have my partitions right now the /dev/sda2 butts up against the /dev/sda3, so in order to get the free space next to /dev/sda2 I have to move /dev/sda3. Is it possible I will lose the data in /dev/sda3 (home) or is the GParted tool not.. that faulty?
 
Old 09-19-2012, 11:52 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047Reputation: 4047
Usually GParted works well. But when you mess with partitions, regardless which tool you use, you should make a backup of your important data first (which you should make periodically anyways).
Since you use Virtualbox is is as easy as making a copy of the .vdi-file or just make a snapshot before taking actions.
 
  


Reply

Tags
memory management, opensuse, partition, resize


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
Add a wireless access point at home using extra router? Z038 Linux - Networking 8 11-26-2010 11:53 PM
mount error: mount point /home/me/x does not exist whil Fedora 3 05-24-2006 10:39 AM
FreeBSD /home mount point question Ahmed *BSD 5 11-07-2005 08:58 PM
Same /home mount point for two distros? jaristr Linux - General 4 08-18-2005 11:27 AM
mapping home directories to different mount point jjohnston62 Linux - General 5 11-05-2003 04:42 PM


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