LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 10-09-2005, 09:49 PM   #1
JerryP
Member
 
Registered: May 2005
Location: Hells Kitchen, New York
Distribution: PCLinuxOS 2007
Posts: 72

Rep: Reputation: 15
Need to increase my root partition


I was pretty happy with my progressive understanding of Linux but am stonewalled with my new problem.

I use Mandriva and have been pretty happy with it. All of a sudden my system- created 5 GB root partition announced that it was dangerously full. My home partition is 30 GB. This happened to me a couple of month ago and I rebooted and seemed to recover a LOT of space. I guessed it was a cache matter and thought that that was what I had again. I figured I'd reboot and then search the net to find out why this is happening.

Now my Mandriva simply won't boot. It gets to a point where it reports that there is not enough room on the hard drive. It then takes me to terminal prompt so I put in "KDE". It gives me a big error message and than't that. I don't think the message is important since the whole thing goes "bad" after it reports the drive is full.

I try to get into the system with the install DVD (figuring I can adjust the partition size during "install") but it won't let me do that either.

I can boot with a live distro CD (I am sending this plea for help with Ubuntu) but can't find any "Partition Magic" type tools to quickly resolve this.

I suppose the easiest thing would be to free up some space on the partition but don't know what is safe to delete. If I can do this I will be able to get it to boot and then I can uninstall a few things and THEN adjust the partitions.

Assistance will be greatly appreciated.

JerryP
 
Old 10-09-2005, 10:23 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Get the knoppix cd: http://www.knoppix.org/

After booting with it, you can use qtparted to resize the partition you're mounting / to.
 
Old 10-10-2005, 07:10 PM   #3
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
As anomie said, use qtparted on a knoppix CD to resize.

It seems like you have learnt the hard way but your partitioning is almost the wrong way round, / really needs to be big enough to handle the total amount of software you intent to install. However, IMO 5GB is plenty for / and it seems like you've run out of space due to a file getting way too big.

You can clean all the tmp folders in your home directory and / and see if that helps. Also check your log files are not huge /var/log. Check for .core files aswell - they are from software crashes and can be deleted in your situation.
 
Old 10-10-2005, 08:48 PM   #4
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
If it won't let you resize the partitions, and it won't even boot, and the end of the error message says bad, then maybe your hard drive is going bad. I would pop in a Windows ME startup disk and run scandisk.
 
Old 10-11-2005, 06:12 AM   #5
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
Not sure about that

Quote:
Originally posted by dudeman41465
If it won't let you resize the partitions, and it won't even boot, and the end of the error message says bad, then maybe your hard drive is going bad. I would pop in a Windows ME startup disk and run scandisk.
Would that even work? Surely scandisk would only be able to pick up windows drives and run filesystem scans. I know that you can run physical scans which look at the actual drive rather than the filesystem, but then again it would only be able to detect drives/partitions with Fat32/Fat16?

If it's a Linux partition use tools such as fsck and badblocks.
 
Old 10-11-2005, 03:21 PM   #6
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
I was thinking the same thing as far as checking the physical state of the drive just to see if there any bad blocks, but yes now that I think of it, scandisk would probably report false errors for lack of a Windows file system. My bad.
 
Old 10-12-2005, 01:47 AM   #7
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
You don't need to download knoppix - just use the partition program (diskdrake) on the Mandrake install CD. Boot off that and go up to the partitioning stage. You can reboot the computer once it gets to the 'select packages' stage and not have it install anything. Alternatively get a PCLinuxOS livecd as it has diskdrake on it.
 
Old 10-12-2005, 04:35 AM   #8
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
Quote:
Originally posted by tkedwards
You don't need to download knoppix - just use the partition program (diskdrake) on the Mandrake install CD. Boot off that and go up to the partitioning stage. You can reboot the computer once it gets to the 'select packages' stage and not have it install anything. Alternatively get a PCLinuxOS livecd as it has diskdrake on it.
I didn't think diskdrake could perform the type of partition resizing that the the original question asked without losing the data on those partitions?
 
Old 10-12-2005, 05:40 AM   #9
ravee
Member
 
Registered: Jan 2005
Location: India
Distribution: Fedora Core 2
Posts: 83

Rep: Reputation: 15
But can you use these tools to re-partition the drive without any data loss ? It has been a long while since I did a partition and then too I used fdisk.

JerryP says that he does not have any free space in his / partition. Maybe there is a coredump file somewhere or his log files in the /var have filled up rest of his free space. This usually happens when you run your machine as a mail server or such thing.

If what I said is true, then the steps needed might be boot using Knoppix or any live CD. Once you are completly booted, mount your drive which has the / partition. Find any files which have a size greater than say 10 MB .
$ find /mnt/partition -size +10000000
Then you will get a fair idea of which large files hog the disk. If you don't have the file, then you will know there are no core dumps.

Next check the /var directory to see the space taken by it.
# du -Hs /var

That might give you a fair idea where you have lost all the space.
 
Old 10-12-2005, 06:52 AM   #10
JerryP
Member
 
Registered: May 2005
Location: Hells Kitchen, New York
Distribution: PCLinuxOS 2007
Posts: 72

Original Poster
Rep: Reputation: 15
Need to increase my root partition

Wow. This is incredible. While I have been almost totally cut off, this message and subject has taken on a life of it's own! Fantastic!

That being said, I did get the message to try Knoppix (I happened to get the CD back I had earlier given to a friend) while at least working with Mepis.
The Knoppix idea didn't work. Qtparted wouldn't let me re-size that root partition. I could re-size "/home" and the "swap" but not "/ ". So I took a new HDD, set it up with a 30 GB "/", a 1 GB swap and 130 GB "/home" where my old Windows HDD used to be and away I go - clean install. I only had to copy over my Firefox bookmarks, all of my Thunderbird mail and settings and my jpilot stuff. I earlier had a (and have) a 40 GB drive that had all my working files on it with a FAT32 partition to share with Windows and renamed the other partition /oldroot and /oldhome so I can still access all of my data. Whew! The upside of the whole thing is that I have dumped Windows forever. I was going to keep it for the odd occasion when I needed something that looked like it would only work in Windows and I hadn't found a Linux substitute app yet but I couldn't find my original *!@#$@## CD so I couldn't get it activated so I got POed and said good by to Redmond.

Now, I still quest to find out just what hell happened. If something filled up my 5 GB root I don't want to find my 30 GB root doing the same thing. Diskdrake absolutely should have been able to handle it BUT I couldn't boot to the install DVD. It just froze up.

To answer revee "But can you use these tools to re-partition the drive without any data loss?", my experience is that you can but I don't recommend trying because when I do it gives me the heebie-jeebies until I see it works. I have even told it to format and for reasons inexplicable, my data remains. I have been thinking that a Linux format is somehow different from the old MS DOS format action.

I like the ideas from revee but I have been told one thing that gets in my way, "NEVER DELETE ANYTHING FROM THE TMP DIRECTORY". Is this true? I would now appreciate a second opinion. It jams up my thought process since part of my Windows-practically-daily-ritual had aways been to delete every temp file I could find. After all, they are t-e-m-p-o-r-a-r-y.

The next thing is, how does a newbie like me find out what is safe to delete anywhere much less "any files which have a size greater than say
10 MB" that would be safe to rm. Or what is it safe to rm from /var?

Maybe that's what forums are for and I'm sure I'll get the hang of it eventually but any tips on how to get there faster (and answers to my "what to delete questions) would be a great help.

Thanks for your interest in my problem and for the great replies from all.

JerryP
 
Old 10-12-2005, 07:42 AM   #11
tkedwards
Senior Member
 
Registered: Aug 2004
Location: Munich, Germany
Distribution: Opensuse 11.2
Posts: 1,549

Rep: Reputation: 52
Quote:
I didn't think diskdrake could perform the type of partition resizing that the the original question asked without losing the data on those partitions?
I've used diskdrake to shrink and grow ext3 and NTFS partitions and it works fine.

Quote:
I like the ideas from revee but I have been told one thing that gets in my way, "NEVER DELETE ANYTHING FROM THE TMP DIRECTORY". Is this true? I would now appreciate a second opinion. It jams up my thought process since part of my Windows-practically-daily-ritual had aways been to delete every temp file I could find. After all, they are t-e-m-p-o-r-a-r-y.
Well yes and no. Its always safe to delete the contents of the temp directory on reboot. The only reason that you'd avoid deleting stuff from it is because some programs create temp files and if you delete them out from under them while they are running they can crash or behave strangely.

Realisticly though I don't think any component of the average Linux system creates any significantly sized tmp files - if your tmp dir is taking up a lot of space its probably something you've manually put there (and can therefore safely delete if you don't need it). Also by default Mandriva sets the tmpwatch script to run in cron and go through and delete anything more than 10 days old.

Your system should fit fine in 5GB - you really need to look through which directories are causing the problem. In KDE if you right-click->Properties a folder you can see how much space it takes up. From the command line you do
Code:
du -sh /directory
Post the output of (as root):
Code:
du -sh /tmp
du -sh /var/*
du -sh /root
du -sh /usr
du -sh /opt
And we'll see where the space is being used.
 
Old 10-12-2005, 04:50 PM   #12
JerryP
Member
 
Registered: May 2005
Location: Hells Kitchen, New York
Distribution: PCLinuxOS 2007
Posts: 72

Original Poster
Rep: Reputation: 15
Need to increase my root partition

I tried the suggested commands and found nothing big.

What I did find was 5860 0B files that are "character device" and "block device" in my file:/mnt/old root/dev directory.

My guess is that these are the problems.

Where did these come from? I have my feelings about where they can go but before I send them there I'd like your or someones' feedback because I don't ever want them again. I must have done something to create them. Have I found a Linux virus?

JerryP
 
Old 10-12-2005, 05:27 PM   #13
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
I think you want to keep those files.

If (what I think you have done) you have booted a bootCD such as knoppix and found those files in there then what it has done is 'mounted' your old / (root) partition to /mnt/old root and therefore you definitely want to keep what is in the dev directory.

/dev stores the files that access devices such as your hard drive/cdrom drive/usb drives/ network cards/ graphics cards etc... - basically there is a saying in Unix and GNU/Linux that everything can be represented as a file - hence the use of /dev - it allows you to access all the devices connected to your PC.

So, don't delete any of it (as a general rule). Besides, 5860 0byte files are nothing compared to even a 1mb file.
 
Old 10-13-2005, 11:11 AM   #14
JerryP
Member
 
Registered: May 2005
Location: Hells Kitchen, New York
Distribution: PCLinuxOS 2007
Posts: 72

Original Poster
Rep: Reputation: 15
My error. I didn't make myself clear. I have installed a whole new hard drive and clean installed Mandriva. I kept the old partitions on a second hard drive for two reasons. One was to be able to set up my Firefox, Thunderbird and j-pilot the way I had it before my "disaster". I needeed the file to do this. The other reason is to find out what happened that caused the old root partition to "pack up". KDiskFree shows it as 100% full which makes no sense.

System-wise I'm pretty happy EXCEPT I need to find out what the problem was to make sure it never happens again.

One question - is there a command that will list out ALL the files in one directory (including all sub-directories) by size? I have tried the suggested commands above but they didn't find anything that seemed too big.

JerryP
 
Old 10-13-2005, 11:27 AM   #15
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
Code:
dir -s --recursive
This should work, it did for me, it lists the size of each file next to it and puts them in alphabetical order and by directory. It works for me.

Last edited by dudeman41465; 10-13-2005 at 11:29 AM.
 
  


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
how to increase root's partition? snakeo2 Linux - Newbie 5 10-10-2005 11:18 AM
/tmp partition won't increase? I_AM Linux - General 1 03-19-2005 12:18 AM
How to increase root partition size ? abhigo Fedora 2 01-29-2005 04:47 AM
I want to increase my Linux partition.Should I take space from a Windows partition? PrinceBalak Linux - General 1 06-25-2004 05:44 PM
Looking to increase swap partition Patgod Linux - Newbie 8 03-29-2004 05:46 PM

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

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