LinuxQuestions.org
Review your favorite Linux distribution.
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 04-10-2003, 06:14 AM   #1
Citizen Bleys
Member
 
Registered: Mar 2001
Location: Moncton, NB
Distribution: Gentoo 2006.0
Posts: 181

Rep: Reputation: 30
defrag


Linux (at least RedHat) doesn't seem to come with a disk defragmentation utility; As I understand fragmentation, it's not a phenomena specific to Windows filesystems--Does defragmentation software exist for Linux? Is it necessary? (For all I know, Linux handles fragmentation at the OS level)

I should probably run fsck every week in lieu of ScanDisk...but is that necessary?
 
Old 04-10-2003, 06:28 AM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
This is a pretty common question Yes, there do exist defragging utilities for Linux, but for the most part, it's not necessary. Search these forums for 'defrag' to turn up a lot of previous questions on this topic.
 
Old 04-10-2003, 08:37 AM   #3
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Rep: Reputation: 30
Hi,

What does that command do (FSCK?? I tried to run it and it told me there are no devices to check? Thanks.
 
Old 04-10-2003, 08:46 AM   #4
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
fsck stands for FileSystem ChecK. Usually you don't need to use it unless something goes wrong with your filesystem (after a bad shutdown, for example). Read the man page for details.
 
Old 04-10-2003, 09:00 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by scottpioso
Hi,

What does that command do (FSCK?? I tried to run it and it told me there are no devices to check? Thanks.
And to add what wapcaplet mentioned... when running fsck, you have to specify the device to fsck, by just typing fsck you will recieve that error cause it doesn't know what to fsck.
 
Old 04-10-2003, 09:20 AM   #6
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Rep: Reputation: 30
Thanks. So, if I want to check my local HD, what is the proper context to run it on the drive if mounted at /dev/hda3?
 
Old 04-10-2003, 09:22 AM   #7
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Rep: Reputation: 30
As long as we're on this topic, do you know if you can increase your partition sizes on a partition without losing data? ie Partition Magic?
 
Old 04-10-2003, 09:33 AM   #8
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Well always unmount a device before running fsck but it would go something like this:

fsck /dev/hda3

man fsck for more flags and options to run during fsck though.

And you can repartition without losing data. Search for a program called FIPS I believe is called. Not totally sure but try searching and you'll find one that might suit you.
 
Old 04-10-2003, 09:39 AM   #9
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Rep: Reputation: 30
Does someone know how to unmount the drive currently in use? Sorry, I've just been waiting patiently for a reply here. I know it's very easy to do, but I just don't know how to do it. Thank you.

Last edited by scottpioso; 04-10-2003 at 11:28 AM.
 
Old 04-10-2003, 01:51 PM   #10
footfrisbee
Member
 
Registered: Apr 2003
Distribution: Debian Sarge
Posts: 259

Rep: Reputation: 30
scottpioso,

You can increase the sizes of you partitions or even move some of them with parted.
 
Old 04-10-2003, 04:38 PM   #11
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
I'm using a ext3 filesystem. Can fsck be used on this as well as ext2 ?

Reading above, is it cruical to umount the drive in question before this? ie, chance of corruption due to other processes possibly having a go at blocks on the device at the same time?

I haven't tried it yet but is it possible to just check specify directories or do they have to be mount points? ie /usr/local ?
 
Old 04-10-2003, 05:30 PM   #12
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Rep: Reputation: 30
Okay, you bring up a valid point about the device needing to be unmounted prior to running that command. Can someone please tell me how to unmount a drive that I'm currently using? Thank you.
 
Old 04-10-2003, 05:36 PM   #13
hamster
Member
 
Registered: Apr 2003
Location: Waterford, Ireland
Distribution: Mandrivia 2006.1, Ubuntu 7.10
Posts: 188

Rep: Reputation: 30
as root, umount /mnt/hda1

or could this be done at bootup time......
 
Old 04-10-2003, 05:56 PM   #14
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
I think you mean "umount /dev/hda1".

Remember you cant unmount a partition that you need. eg you cant "umount /" for hat you need to use a boot disk.

Try using
http://sourceforge.net/projects/plac

I think it is slightly better than the distro specific ones.
 
Old 04-10-2003, 09:01 PM   #15
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Rep: Reputation: 30
Thank you David. Right now, I'm tired and I'm going to put my computer to bed for the night. Have a good night gentlemen.
 
  


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
defrag? dna9 Linux - Software 3 11-18-2004 06:55 PM
defrag dreakon Linux - Newbie 1 11-13-2004 05:29 PM
Is it necessary to defrag? simsjr Linux - Newbie 7 04-27-2004 02:33 AM
How to defrag arsham Linux - General 2 04-01-2004 12:05 AM
Defrag dunmarie Linux - General 4 10-27-2003 02:42 AM

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

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