Operating System - HP-UX
1823957 Members
3707 Online
109667 Solutions
New Discussion юеВ

disk and file system integrity check

 
Vaish Raj
Advisor

disk and file system integrity check

Hi,

1)Is there any need to run "fsck" regularly on filesystem to make sure filesystem is not corrupted and to avoid future problems ?

For some reason or other we are rebooting our development server regularly(once a month). I believe HP-UX dies "fsck" check on all filesystems during booting. Is this enough to avoid potential file/disk problems.

2) Are there any other procedures/checks to be done regularly to avoid potential file/disk problems.

Thanks
Raj
8 REPLIES 8
Bill Hassell
Honored Contributor

Re: disk and file system integrity check

1. There is no reason to run fsck regularly if you keep your system up to date on patches. There is no resaon to reboot HP-UX systems except during scheduled patch installations. The reason someone decided to do this is out of habit from other Unix server that had lots of problems that were not being fixed. Filesystem corruption is almost unknown in HP-UX except due to outside influcences (ie, root user makes a mistake).

2. The MOST important thing to do is to mirror ALL of your disks. Disk failures will occur due to hardware problems...that has never changed although the frequency is much less than a decade or two ago.

The other part for protecting your disks and files is to severely limit the number of people with the root password and do not allow untrained administrators or consultants to have the root password.

2.


Bill Hassell, sysadmin
Sivakumar TS
Honored Contributor

Re: disk and file system integrity check


Hi Raj,

As long as there is no improper shutdown or improper unmounting there is no need to run fsck.

May be to maintain optimal performance on busy file systems,

To defragment a JFS file system using fsadm, execute the following to perform both directory and extent reorganization and to generate reports before and after reorganization:

fsadm -d -D -e -E /mount_point

Regards,

Siva.
Nothing is Impossible !
Sivakumar TS
Honored Contributor

Re: disk and file system integrity check


Hi,

you can also schedule a regular check by adding a cron job.

For example, to defragment every evening at 9 p.m. all the extents and directories within the file system mounted at /home, include the following entry in a file used by cron

0 21 * * * fsadm -d -e /home

Regards,

Siva.
Nothing is Impossible !
Yogeeraj_1
Honored Contributor

Re: disk and file system integrity check

hi Raj,

i think it will be wiser to spend more time on the following:
- Redundancy
- Backup and test Recovery

Frequent reboots hinder uptime.

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Mridul Shrivastava
Honored Contributor

Re: disk and file system integrity check

If fs type is vxfs it checks only log replay so it won't take much time but if it is hfs fsck takes long time as it checks whole FS. Anyway fsck is not required everytime.
Time has a wonderful way of weeding out the trivial
AshishJain_USA
Frequent Advisor

Re: disk and file system integrity check

As suggested by most of other posts, redundancy ( mirroring ), backups and recovery testing are the best ways to avoid any unforeseen from happening.

Other good options in a mirrored environment would be do write scripts that would look for any discrepancies between "Cur PV " and "Act PV ". You may also look at lvdisplay outputs to ensure there are no " stale " extents.

rgds....
Vaish Raj
Advisor

Re: disk and file system integrity check

Hi Ashish,

Waht type of scripts you are looking at to check mirror disks. Can you upload them.

Thanks
Alzhy
Honored Contributor

Re: disk and file system integrity check

Vaish,

Peace and Clean Air!

Normally, you do not need to run fsck or any other filesystem integrity checks. This is because ('cept ofr /stand on 11.11), all filesystems are "journalled" via JFS (a.k.a. VxFs).

If you mean maintenance like defragmentation - it depends on the filesystem use. For fileshare use and filesystems with very dynamic content (lots of deletes/creates,etc - like a dev/build environment) - you may occasionally run a defrag via fsadm as a previous post suggested.

But as far as regular fsck's (via reboots0 -- no need.

IMHO.

Hakuna Matata.