LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-09-2005, 11:37 AM   #1
bschiett
Member
 
Registered: Feb 2005
Posts: 32

Rep: Reputation: 15
not enough space on /home. resize partitions?


hi all,

when I type 'df' at the prompt I get this on my linux server:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part3
4891620 380232 4511388 8% /
none 256212 0 256212 0% /dev/shm
tmpfs 256212 92 256120 1% /tmp
/dev/ide/host0/bus0/target0/lun0/part1
194442 4275 180128 3% /boot
/dev/ide/host0/bus0/target0/lun0/part5
29301628 531252 28770376 2% /usr
/dev/ide/host0/bus0/target0/lun0/part6
39068816 33437336 5631480 86% /home
/dev/ide/host0/bus0/target0/lun0/part7
29301628 386824 28914804 2% /var

So, it looks like my /home is taking up much more space than I thought it would... I assigned space to /usr and /var thinking i would need it later, and now I need the space in my /home. What can I do to resize partitions in a safe way or does anyone know what to do in this situation? of course, I can't afford to screw up my partitions.

thanks,
Bert
 
Old 12-09-2005, 04:14 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
In your case it seems rather simple, because you can transfer space from /var to /home. One program that can do it for you is 'parted' (console more, I guess you need such one if it's a server). As a sidenote, which filesystem do you have?
 
Old 12-10-2005, 01:52 AM   #3
bschiett
Member
 
Registered: Feb 2005
Posts: 32

Original Poster
Rep: Reputation: 15
Disk /dev/hda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 25 200781 83 Linux
/dev/hda2 26 148 987997+ 82 Linux swap / Solaris
/dev/hda3 149 757 4891792+ 83 Linux
/dev/hda4 758 14946 113973142+ 5 Extended
/dev/hda5 758 4405 29302528+ 83 Linux
/dev/hda6 4406 9269 39070048+ 83 Linux
/dev/hda7 9270 12917 29302528+ 83 Linux
/dev/hda8 12918 14946 16297911 83 Linux

I think they are all ext2? how do i move space from /var and /usr to /home?
 
Old 12-10-2005, 03:36 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
Please try with 'mount'. Fdisk doesn't show the partition types.

The problem with type is that older versions of parted didn't support ext3 directly. New ones should handle it, however (at least the manual is saying so).

In the meantime, you may find the parted manual useful. You can find it here: http://www.gnu.org/software/parted/m...no/parted.html

Make sure you have parted installed.

Now, the whole resize operation has, in your case, minimum 3 steps:
1. resize /var; you'll get free space after /var
2. move /var at the end of disk
3. resize /home to add the free space to it
Now, the exact commands depends on the fact how much space you want to add to /home. You need two 'resize' and one 'move' in parted.

Last edited by Mara; 12-10-2005 at 03:38 PM.
 
Old 12-13-2005, 04:04 AM   #5
bschiett
Member
 
Registered: Feb 2005
Posts: 32

Original Poster
Rep: Reputation: 15
this is the output of 'mount':

/dev/ide/host0/bus0/target0/lun0/part3 on / type reiserfs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
tmpfs on /tmp type tmpfs (rw)
/dev/ide/host0/bus0/target0/lun0/part1 on /boot type ext2 (rw)
/dev/ide/host0/bus0/target0/lun0/part5 on /usr type reiserfs (rw)
/dev/ide/host0/bus0/target0/lun0/part6 on /home type reiserfs (rw)
/dev/ide/host0/bus0/target0/lun0/part7 on /var type reiserfs (rw)
none on /proc/bus/usb type usbfs (rw)

can i still use parted then?
 
Old 12-13-2005, 04:13 AM   #6
bschiett
Member
 
Registered: Feb 2005
Posts: 32

Original Poster
Rep: Reputation: 15
ok, i tried resizing /var but I get this:

(parted) print
Disk geometry for /dev/ide/host0/bus0/target0/lun0/disc: 0kB - 123GB
Disk label type: msdos
Number Start End Size Type File system Flags
1 32kB 206MB 206MB primary ext2 boot
2 206MB 1217MB 1012MB primary linux-swap
3 1217MB 6227MB 5009MB primary reiserfs
4 6227MB 123GB 117GB extended
5 6227MB 36GB 30GB logical reiserfs
6 36GB 76GB 40GB logical reiserfs
7 76GB 106GB 30GB logical reiserfs
8 106GB 123GB 17GB logical
(parted) print 7
No Implementation: Support for opening reiserfs file systems is not implemented
yet.
(parted) resize 7 76GB 96GB
Error: Partition /dev/ide/host0/bus0/target0/lun0/part7 is being used. You must

unmount it before you modify it with Parted.
(parted)


the problem is... my linux box is running so how can I unmount /var which probably has logging going on on the partition? (/var/log ??)
 
Old 12-18-2005, 02:40 PM   #7
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
The best idea is to run parted from a boot cd to make sure everything's unmounted.
 
  


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
Resize Partitions mramos Red Hat 4 09-12-2005 09:32 AM
can't see free space after parted resize ianv Linux - General 7 04-22-2005 07:17 AM
how do i resize my partitions?? PeO Linux - General 10 08-27-2004 04:54 AM
resize partitions wolfe2554 Linux - General 1 07-05-2004 08:06 PM
How to resize a partition or reallocate space? Avatar Linux - Newbie 12 04-22-2004 04:11 PM


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