LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-26-2012, 01:06 PM   #1
kern68
Member
 
Registered: Jun 2010
Distribution: Fedora, Ubuntu, CentOS, OpenSUSE
Posts: 47

Rep: Reputation: 0
Root partition full...


My root partition became full. I had to login to command line and move some directories from my home directory to a different partition. Once the move was complete I was able to login and start up the GUI.

This is the second time this has happened to me. The first time this happened I copied a very large file into the root partition. Now that it has happened a second time I would like to take some measures to prevent it from happening again. So, I have a couple questions about the root partition and the /home directory location.

When I first installed Ubuntu 10.04, I set the root partition size to 20GB. I figured that should be plenty of room for the OS only. But the /home directory seems to cause a bit a a problem. Is my assumption correct that the /home directory is part of the root partition? My user directory is always changing sizes (usually growing). Is there a way to move the /home/user directory outside the root partition while still allowing applications to access their needed information?

Thank you for any help and/or assistance.
GeoK
 
Old 02-26-2012, 01:24 PM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by kern68 View Post
When I first installed Ubuntu 10.04, I set the root partition size to 20GB.
in my Ubuntu and Mint installations, I typically made the root partition 16GB. But I always have another partition where I'm working on, and use the /home directory only for configuration data that is stored there without asking me.

Quote:
Originally Posted by kern68 View Post
Is my assumption correct that the /home directory is part of the root partition?
If you didn't put it on another partition explicitly, yes.

Quote:
Originally Posted by kern68 View Post
Is there a way to move the /home/user directory outside the root partition while still allowing applications to access their needed information?
Yes, that's no problem. You can either relocate one user's home directory - this is done in user and group management. Make sure you copy your entire home directory to the new location, including all hidden files. Only then go into user management and assign yourself the new home directory.

Alternatively, you can relocate the entire /home directory. That way, you don't have to change the user configuration, because all paths remain the same. But you have to reserve an entire partition for /home, and assign that in /etc/fstab.

Someone told me you could also create a symlink called /home in the root directory that points to wherever you want the home directories. But I've never tried that method, so don't take that as a recommendation.

I guess you're better off with the first method, because it's more flexible - you can put the new home directory anywhere you like.

[X] Doc CPU
 
1 members found this post helpful.
Old 02-27-2012, 02:48 AM   #3
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 373

Rep: Reputation: 21
It is not at all difficult to dedicate an entire partition for /home after installing Linux. This involves these steps:
a) decide the size of the new /home partition
b) create and format the partition. gparted can be very handy in this case.
c) mount the new partition on /mnt
d) copy all the files in /home to the new partition
Code:
# cp -a /home/* /mnt
e) edit /etc/fstab to reflect the change. The following settings can be used:
Code:
# /home was on /dev/sda6 during installation
UUID=the_new_partition_uuid /home           ext4    defaults,noatime        0       2
f) leave /home in the root partition.

In my case, I used ext4, your's may be different. You can get the uuid for the partition by using gparted's properties context menu.

You can remove all files if you wish but you can keep the hidden files as a backup. These will be hidden from the system when Linux boots with the new configuration and the new partition will be used.

P.S.
You can still gain more space in your root partition by deleting .deb archives which are found under:
Code:
/var/cache/apt/archives
Code:
# rm /var/cache/apt/archives/*.deb

Last edited by edbarx; 02-27-2012 at 02:57 AM. Reason: To add more details
 
1 members found this post helpful.
Old 02-27-2012, 05:49 AM   #4
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by edbarx View Post
It is not at all difficult to dedicate an entire partition for /home after installing Linux.
whether it's difficult, depends on your level of experience. ;-)

Anyway, this way you can't blend the /home directory into an existing hierarchy. It will be a partition of its own with nothing else but /home on it. You can see that as an advantage (clear structures, separation of user data), but it also reduces your flexibility of choice of where to put the /home directory.

Quote:
Originally Posted by edbarx View Post
This involves these steps:
a) decide the size of the new /home partition
b) create and format the partition. gparted can be very handy in this case.
c) mount the new partition on /mnt
d) copy all the files in /home to the new partition
Code:
# cp -a /home/* /mnt
e) edit /etc/fstab to reflect the change.
Needless to say that you have to do these steps while being root.

Quote:
Originally Posted by edbarx View Post
You can get the uuid for the partition by using gparted's properties context menu.
You can also use the "traditional" device names, like /dev/sda5. I'm more comfortable with them than with GUIDs, because you can clearly amd easily deduct them from the partitioning scheme - and vice versa, you can tell immediately where a partition resides if you use traditional identifiers.

[X] Doc CPU
 
Old 02-27-2012, 08:17 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Member response

Hi,

There is no problem in doing the move as 'edbaedx' presented. In fact it is best to let the system know the partition ID via 'uuid'. You can use tools to discern/locate the 'dev' if you require explicit human identification or just include a comment within '/etc/fstab' to note things.

Most system professionals will use the 'UUID' since future changes are likely to occur and that the possibilities of sharing across systems;
Quote:
excerpt from 'man uuid';
uuid - DCE compatible Universally Unique Identifier library

SYNOPSIS
#include <uuid/uuid.h>

DESCRIPTION
The UUID library is used to generate unique identifiers for objects that may be accessible beyond the local sys-
tem. This library generates UUIDs compatible with those created by the Open Software Foundation (OSF) Distributed
Computing Environment (DCE) utility uuidgen.

The UUIDs generated by this library can be reasonably expected to be unique within a system, and unique across all
systems. They could be used, for instance, to generate unique HTTP cookies across multiple web servers without
communication between the servers, and without fear of a name clash.
SOHO users may not see/need the advantages or that the unique identifier is a better way of doing things.

Last edited by onebuck; 02-27-2012 at 08:33 PM. Reason: typo my big mitts
 
Old 02-27-2012, 07:04 PM   #6
kern68
Member
 
Registered: Jun 2010
Distribution: Fedora, Ubuntu, CentOS, OpenSUSE
Posts: 47

Original Poster
Rep: Reputation: 0
Got it working!

I copied my home directory to a different partition. This partition was already listed in /etc/fstab, so no changes needed there. I did modify /etc/passwd to reflect the new location.

Thank you for all the suggestions.

GeoK
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] my root partition becomes full matters Slackware 2 10-15-2011 05:23 AM
root partition full trashbird1240 Slackware 10 05-27-2008 09:04 PM
root partition full laan97ac Mandriva 6 07-23-2007 01:09 PM
Root partition full juleslinux Red Hat 4 01-12-2006 10:00 AM
root ('/') partition is FULL inon^ Linux - Hardware 2 08-08-2005 01:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:51 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
Open Source Consulting | Domain Registration