Re: Chkdisk?



On Aug 12, 7:25 am, bb <spamt...@xxxxxxxxxxxx> wrote:
On 2008-08-11 18:18, chad wrote:





On Aug 11, 10:42 am, bb <spamt...@xxxxxxxxxxxx> wrote:
On 2008-08-11 16:05, chad wrote:

On Aug 11, 9:51 am, Tapio Salonsaari <t...@xxxxxxxxxxxxxxxxxxxxxx>
wrote:
On 2008-08-11, chad <cipher7...@xxxxxxxxx> wrote:
Is there any program for Linux that would function as a chkdisk would?
fsck
--
Take
Yeah, I just Googled and found it after I posted. Sorry about that.
I have no idea why the server crashed to begin with. I'll check the
logs, but I was looking for a way to prevent this in the future.
Just don't run it on a mounted fs, boot the rescue to fsck /

/bb

Thanks. What would you recommend for maintenance? Does Linux even
require defragging? I'm used to Windows and am kinda stuck doing Linux
administration right now.

Forget about fragmentation, it will never be so bad so you notice it,
due to all cylinder groups and linux way to cache up the disk structure
in memory.
A linux fs don't add a new files directly after the previous file as the windows
fs do, and most drives has NCQ now, so data blocks can be found fast even if
they are spread over more tracks.
If you have big video files for example where you seek forward and backward,
you just use a filesystem that handle that better (xfs) , and if you have
millions of small files, reiserfs, and normal usage ext3, you have options.

As recommended maintenance the only advice I can give is to be prepared for
the worst, and never trust a single hardware, have backup of all your data.

Enable smartd so it test your disks regularly, and monitor the test reports
and disk temp, never let them go to hot.

For example, setting up smartd for /dev/sda
# smartctl --smart=on --offlineauto=on --saveauto=on /dev/sda
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
SMART Attribute Autosave Enabled.
SMART Automatic Offline Testing Enabled every four hours.

To start a short test manually:
# smartctl --test=short /dev/sda
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line
mode".
Drive command "Execute SMART Short self-test routine immediately in off-line
mode" successful.
Testing has begun.
Please wait 2 minutes for test to complete.
Test will complete after Tue Aug 12 10:45:13 2008

Now I wait 2-3 minutes and grab the test result:
# smartctl --all /dev/sda

Or just grep out what you need:
# smartctl --all /dev/sda | egrep '^# .*Short offline|^ID|^194'
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE  UPDATED  WHEN_FAILED RAW_VALUE
194 Temperature_Celsius 0x0000 037 043 000 Old_age Offline  - 37 (Lifetime
Min/Max 0/22)
# 1  Short offline       Completed without error       00%      3651         -
# 2  Short offline       Completed without error       00%         1         -

Just use smartctl --all /dev/sda to get all data, I grepped what I wanted to see.

If you don't have any permanent disk errors, the filesystem should not have any
problems to repair either.

/bb- Hide quoted text -

- Show quoted text -

My goodness! I haven't checked this post in a few days, and I have a
ton of replies! Thanks to everyone!!
.



Relevant Pages

  • Re: mirroring
    ... *Migrating an Existing Linux to RAID1* ... this copies your data from the existing disk to the new disk then overwrites your existing disk* ... Change the partition type on the existing non-raid disk to type 'fd' ... Create the degraded RAID array on the empty disk, but leave out the existing system disk for now. ...
    (RedHat)
  • Re: mirroring
    ... *Migrating an Existing Linux to RAID1* ... Change the partition type on the existing non-raid disk to type 'fd' ... Changed system type of partition 1 to fd (Linux raid autodetect) ...
    (RedHat)
  • Re: Panasonic HD Recorders - What disk format?
    ... The earlier part of this is more about what may be Linux partitioning, ... might be possible to present the recorder with a larger disk already ... Most DOS/Windows utilities such as FDisk, Ghost, and Partition Magic Pro ... prompts to format it. ...
    (alt.os.linux)
  • Re: defrag in linux?
    ... heads of your HD advance sequentially through the hard disk. ... fragmentation is a concern when one ... On the other hand, if you are Linux, you reorder the ... 'file fragmented' Linux file system and a 'file unfragmented' Linux ...
    (alt.os.linux.suse)
  • Re: Gparted help
    ... underestimated the amount of disk space I would need for the Linux ... boot your Mac OS system CD ... The firewire drives can also have a USB 2.0 interface as well so they ...
    (comp.os.linux.powerpc)