LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-29-2005, 11:12 PM   #1
mgichoga
Member
 
Registered: Sep 2004
Distribution: Ubuntu
Posts: 42

Rep: Reputation: 16
/home partition full


I'm not very well versed with partitioning disk but I'm faced with a problem which I think this will fix. I have two hard drives hda1 hda5. hda1 is 6g and hda5 is 15 g When I insalled the system inititally I did not pay too much attentionto what I was doing and my /home partition is full. How do I utilize this free space on the hda5 since its is 70% free.

Thanks
 
Old 07-30-2005, 02:36 AM   #2
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
The quickest and easiest (though maybe not the cleanest) way is to copy the largest directory(ies) to the other partition and symlink them. Be careful where you copy these directories and what permissions/ownerships they have.
 
Old 07-30-2005, 07:33 PM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
More detail:

Mount your /dev/hda5 as something like /mnt

Do the cp mentioned in prior post from /home to /mnt. Verify the directory structures are the same (except of course the top level).

umount /home (you may need to kill off running users/processes that are busing this out - use fuser or lsof to find these).

umount /mnt

Modify /etc/fstab (always save a copy first) so that /dev/hda5 is now mounted as /home instead of your original filesystem.

Run mount /home. If the fstab entry is correct it will do this.

Wait a week or so to reclaim your original /home mount /dev/hd??
 
Old 07-31-2005, 04:53 AM   #4
jdogpc
Member
 
Registered: Jul 2005
Location: Mafra, PT
Distribution: Fedora Core
Posts: 90

Rep: Reputation: 15
just clarifying this.
you wrote you have 2 disk but you just mentioned one hda, hda1 and hda5 are just partitions of the same disk as hda1 id the frist partition on the disk and hda5 is a logical space on a extended partition.

now hands on

for the copy I think it is better to use "-a" switch of cp it is archive and it copies all from the directory you give it, this include subdirs, permissions, and symlynks. IMPORTANT this partion must not be formated with FAT32 or NTFS.
since you said you 70% space left that meens you have some info on hda5 so you have 2 options:

1 backup / discard that info to move your home there
- as root and in runlevel 1 edit /etc/fstab and add this some where in the file:
/dev/hda5 /home/"YOURHOME" "FSTYPE / AUTO(if you don'tknow)" defaults 0 0
2 move your home there and change your home in /etc/passwd
-as root and in runlevel 1 edit /etc/passwd and change the line corrisponding to your user:
YOURUSER:x:something:something::/home/clamav:something
YOURUSER:x:something:something::/THE_DIRECTORY_WHERE_HDA5_IS_MOUNTED:something

Good luck
 
Old 07-31-2005, 08:03 AM   #5
basileus
Member
 
Registered: Nov 2004
Location: Turku, Finland
Distribution: Debian, Ubuntu, Gentoo
Posts: 388

Rep: Reputation: 30
I have numerous times reorganized my partitions so maybe I can help... in the example I move /home to /usr (I suppose your hda1 is / and hda5 is /usr ?). NOTE the -a switch for "cp" is required, it makes sure symbolic links etc. work correctly even in the new place.

su

# First create a new homedir
mkdir /usr/home

# Copy all files from /home to the new place
cp -a /home/* /usr/home/

# Move old home out of the way
mv /home /oldhome

# Link new homedir to /home
ln -s /usr/home /home

That should do it. "cp -a" has newer let me down, and God knows I've used it a lot
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
/home partition full (but) it's not on reboot reddazz Linux - Security 2 02-03-2005 08:12 AM
/home directory is full :S .xsession-errors carl0ski Linux - Distributions 5 12-20-2004 04:46 PM
/home file system 100% full gromo Linux - Enterprise 5 11-04-2004 09:47 PM
Home directories are full homerson Linux - General 1 05-27-2004 10:24 PM
/usr almost full, /home empty.. how 2 xsfer? Cephlen Linux - Newbie 2 10-11-2002 02:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:56 PM.

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