LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 04-05-2009, 10:26 PM   #1
Nightspear
LQ Newbie
 
Registered: Mar 2009
Distribution: Ubuntu 8.10 (intrepid)
Posts: 20

Rep: Reputation: 0
Defragmenting?


Is there away to defragment my hard drives in Ubuntu 8.10 or is there no need in Linux based systems?
 
Old 04-05-2009, 10:28 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Some Unix/Linux filesystems do have tools for defragmentation, but there is really no need to in the majority of cases. Drive fragmentation will only get up to a few percent on a desktop machine, not enough to seriously impact overall performance.
 
Old 04-05-2009, 10:32 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Please, do search before asking. This is a fairly common question:

http://www.linuxquestions.org/questi...=fragmentation
 
Old 04-05-2009, 10:34 PM   #4
reptiler
Member
 
Registered: Mar 2009
Location: Hong Kong
Distribution: Fedora
Posts: 184

Rep: Reputation: 42
Some people might tell you that common Linux filesystems, like ext2/3/4 do not fragment.
Well, although this is not true it usually is not necessary to defragment Linux filesystems, as fragmentation, compared to Windows, is pretty low.
Which also is the reason that you probably have a hard time finding something in your system to actually do this.

As said, also on Linux filesystems actually do fragment, but it's quite unlikely to get to the extends you may be used from Windows.
 
Old 04-06-2009, 09:45 AM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
http://geekblog.oneandoneis2.org/ind..._defragmenting
 
Old 04-06-2009, 10:32 AM   #6
Nightspear
LQ Newbie
 
Registered: Mar 2009
Distribution: Ubuntu 8.10 (intrepid)
Posts: 20

Original Poster
Rep: Reputation: 0
Interesting to know. Anyway The reason I ask is because my box is stating to randomly restart. I opened the ClanTk Virus scanner, updated, ran it and it reports clean, since I started using Ubuntu I have had the Firestarter firewall running. At this point I would run the defrag tool in windows then check for disk errors. Any ideas why I am getting random restarts? I will gladly supply any info you may need to help figure it out.
 
Old 04-06-2009, 01:52 PM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by Nightspear View Post
Interesting to know. Anyway The reason I ask is because my box is stating to randomly restart. I opened the ClanTk Virus scanner, updated, ran it and it reports clean, since I started using Ubuntu I have had the Firestarter firewall running.
Random hard reboots are not a software problem. They are usually tied to faultly hardware, so I'd watch over the cpu temperature and use memtest86 to check the state of your ram sticks to start with. But really any other broken piece could be the problem. Most livecds have a boot option to run memtest86. It will take long and it's not infallible though.

Quote:
At this point I would run the defrag tool in windows then check for disk errors. Any ideas why I am getting random restarts? I will gladly supply any info you may need to help figure it out
It usually should be the other way around. First check and repair, then you can worry about defrag. But a fragmented drive has nothing to do with system hangs nor with random hard resets.
 
Old 04-06-2009, 03:42 PM   #8
Nightspear
LQ Newbie
 
Registered: Mar 2009
Distribution: Ubuntu 8.10 (intrepid)
Posts: 20

Original Poster
Rep: Reputation: 0
So most software will not cause a crash in Linux? I will keep an eye on cpu temp and check my ram. Most other peices like graphics card and sound card are pretty new still(less than 3 months old). Is there a log or something I can check to see what may be causing the problem. I know in Windows I can check the event viewer to see what may have faulted, is thee anything like that in Linux?
 
Old 04-06-2009, 04:02 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by Nightspear View Post
So most software will not cause a crash in Linux?
It's actually pretty hard for a user-level program to cause an OS or system crash in Linux unless there's a bug in the kernel or a driver, such as the video driver. Hardware is usually the culprit.

Quote:
Is there a log or something I can check to see what may be causing the problem. I know in Windows I can check the event viewer to see what may have faulted, is thee anything like that in Linux?
There should be a log viewer in Ubuntu. I'm using Debian/Gnome, and it's at Applications->System Tools->System log. If not, the logs are at /var/log. If it's a hardware problem, then chances are there won't be anything in the logs.
 
Old 04-06-2009, 04:52 PM   #10
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
Dust, dust...

If you can, open the case and clean out the dust, looking particularly at the fins or leaves that disperse heat from the CPU to be sure that they are not blanketed and clogged.

You can use a linux live-cd with test and stress tools to check the CPU, RAM, and HDD. Google a bit and learn more.

That virus program you ran is there for the benefit of those to whom you might be forwarding Windows files, not to find any linux virus. Google some more.

Last edited by thorkelljarl; 04-06-2009 at 07:18 PM.
 
Old 04-06-2009, 05:02 PM   #11
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by Quakeboy02 View Post
It's actually pretty hard for a user-level program to cause an OS or system crash in Linux unless there's a bug in the kernel or a driver, such as the video driver. Hardware is usually the culprit.
If the kernel doesn't let you do anything wrong, then you can't do that. In linux, programs do not have the kind of direct access to the hardware that will actually let them do stupid things. So, if a program crashes, it will just be closed and that's it.

Of course sometimes crashes happen, but they are either due to a bug in the kernel (very unlikely but well, kernel devs are humans...) or due to a buggy 3rd party driver (the most common cause), like when you use some weird kernel patchset or like when the ati driver freezes your display, which happens actually quite often. But that's not linux fault.

Quote:
There should be a log viewer in Ubuntu. I'm using Debian/Gnome, and it's at Applications->System Tools->System log. If not, the logs are at /var/log. If it's a hardware problem, then chances are there won't be anything in the logs.
The first place to look would be /var/log/messages, or just use dmesg on the command line. If a driver or the kernel halts or crashes you might find something useful there.

Also make sure you are not using faulty drivers or strange kernel patchsets.
 
Old 04-06-2009, 07:12 PM   #12
Nightspear
LQ Newbie
 
Registered: Mar 2009
Distribution: Ubuntu 8.10 (intrepid)
Posts: 20

Original Poster
Rep: Reputation: 0
That all makes sence. However I know its not dust I clean the vents and fans regularly every week(living on a dirt road is hell in the summer time). It may have been a buggy driver or something, I updated the system w/ sudo apt-get update followed by sudo apt-get upgrade and finished with sudo apt‐get dist‐upgrade. Since then I haven't crashed. As far as I can tell the log looks pretty clean. Thanks for all the info, I can honestly say I learned something today.
 
  


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
defragmenting Balakrishna Linux - Newbie 6 01-05-2007 04:26 PM
clarification about defragmenting ramdak5000 Linux - Software 2 02-20-2005 12:27 AM
defragmenting ttilt Linux - Software 11 12-28-2003 08:34 AM
Defragmenting cucolin@ Linux - Software 2 11-25-2003 12:10 AM
defragmenting otaku9876 Linux - Software 4 09-24-2001 03:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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