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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-19-2012, 10:20 AM
|
#1
|
LQ Newbie
Registered: Aug 2012
Distribution: OpenSUSE 12.1
Posts: 9
Rep: 
|
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?
|
|
|
09-19-2012, 10:41 AM
|
#2
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
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.
|
|
|
09-19-2012, 11:08 AM
|
#3
|
LQ Newbie
Registered: Aug 2012
Distribution: OpenSUSE 12.1
Posts: 9
Original Poster
Rep: 
|
@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?
|
|
|
09-19-2012, 11:52 AM
|
#4
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
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.
|
|
|
All times are GMT -5. The time now is 11:03 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|