LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Maintenance how to (https://www.linuxquestions.org/questions/linux-newbie-8/maintenance-how-to-866834/)

cheesewizz 03-06-2011 06:23 PM

Maintenance how to
 
Hello All

my question is about linux maintenance.

how can i maintain linux distro installed in one machine

for example i installed fedora distro and i used as server like email server
how can I maintain the performance of the pc that has fedora linux.

just want to perform like

defragmentation
scandisk
check disk errors

something like that


please help

XavierP 03-06-2011 06:26 PM

In a terminal type
Code:

man fsck
This will give the options for checking and repairing your disks. Since this is for a server, you will need to schedule the checks for the times the server is taken down - you can set your own schedule and run it via crontab so it can be unattended. Obviously you will need to check the logs after each scheduled reboot to make sure that there were no problems.

frankbell 03-06-2011 08:16 PM

This thread might help on the defragmentation issue.

http://www.linuxquestions.org/questi...tation-856728/

Frankly, I have never defragmented an ext3 or ext4 file system. Native Linux files systems are smarter than Windows file systems.

DavidMcCann 03-07-2011 12:00 PM

You don't need to defrag Linux filing systems. Most distros will check the filing system for you. Try the following:
su -c "tune2fs -l /dev/sda2"
This will give you useful info about the second partition, including things like

Mount count: 98
Maximum mount count: 100
Last checked: Mon Feb 7 16:10:53 2011
Check interval: 0 (<none>)

In other words, my system checks that partition every 100 boots, there are 2 to go before the next check, and the last was a month ago. For server that runs continuously, you'd set the check interval instead, like

su -c "tune2fs -i 1m /dev/sda2"

for a monthly check.


All times are GMT -5. The time now is 11:52 PM.