Advertisements

Tag Archives: fsck

ORA-00206: error in writing (block 42, # blocks 1) of control file

DBA notified me of this error

Wed Nov 25 13:46:11 BRST 2015
Errors in file /usr/software/oracle/admin/orarvt015/bdump/rvt015_lgwr_2388.trc:
ORA-00206: error in writing (block 42, # blocks 1) of control file
ORA-00202: control file: ‘/usr/oradata/orarvt015/control2/control02.ctl’
ORA-27061: waiting for async I/Os failed
Linux-x86_64 Error: 5: Input/output error

Umount the filesystem

root@linux:~ # umount /usr/oradata/orarvt015

I ran fsck

root@linux:~ # fsck -t ext3 /dev/mapper/oradatavg-dat.orarvt015new
fsck 1.38 (30-Jun-2005)
e2fsck 1.38 (30-Jun-2005)
/dev/mapper/oradatavg-dat.orarvt015new: recovering journal
/dev/mapper/oradatavg-dat.orarvt015new: clean, 137/209715200 files, 318872229/419428352 blocks

Then I mounted the filesystem again

root@linux:~ # mount /usr/oradata/orarvt015

Showing filesystem size

root@linux:~ # df -h /usr/oradata/orarvt015
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/oradatavg-dat.orarvt015new
1.6T 1.2T 304G 80% /usr/oradata/orarvt015

It solved the problem

Advertisements

fsck in Linux: Superblock last write time is in the future. FIXED

When rebooting the server and it shows this message:

Superblock last write time is in the future. FIXED

Move the file /etc/adjtime and set the hardware clock using the command below:

root@linux:~ # mv /etc/adjtime /etc/adjtime.bak

root@linux:~ # hwclock
Fri 27 Jun 2014 11:27:05 AM BRT -0.574168 seconds

root@linux:~ # hwclock —systohc —localtime

root@linux:~ # hwclock -w

root@linux:~ # hwclock
Fri 27 Jun 2014 11:30:17 AM BRT -0.616638 seconds

Also check if your system is using /etc/localtime as a file or link

root@linux:~ # ls -l /etc/localtime
-rw-r–r– 1 root root 2001 Aug 19 2010 /etc/localtime

root@linux:~ # ls -l /etc/localtime
lrwxrwxrwx 1 root root 31 Oct 13 2011 /etc/localtime -> /usr/share/zoneinfo/Brazil/East

The time will be different on boot if you use a separate /usr partition because /etc/localtime will point to an invalid file at startup

root@linux:~ # df -h /usr/share/zoneinfo/Brazil
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-usrlv
5.0G 2.5G 2.3G 52% /usr

Copy the file from /usr/share/zoneinfo to /etc/localtime

root@linux:~ # rm /etc/localtime
root@linux:~ # cp -p /usr/share/zoneinfo/Brazil/East /etc/localtime

Source: After reboot, the Linux system time is always wrong
Using the hwclock program

Skip or force fsck when rebooting a Linux server

If you issue this command, the system will create a file /fastboot

root@linux:~ # shutdown -rf now

or

root@linux:~ # touch /fastboot
root@linux:~ # shutdown -r now

You can also pass the arguments to grub prompt to skip fsck on boot

grub> kernel /vmlinuz-2.6.16.60-0.66.1-smp root=/dev/rootvg/rootlv vga=0x317 resume=/dev/rootvg/swaplv splash=silent showopts fastboot rootdelay=10

Create a /forcefsck file or reboot your computer with -F option to force a fsck on boot

root@linux:~ # shutdown -rF now

or

root@linux:~ # touch /forcefsck
root@linux:~ # shutdown -r now

Running fsck and automatically fix any errors encountered

Tried to mount a filesystem but the OS requested to run fsck

root@solaris:/ # mount /1a
mount: the state of /dev/md/dsk/d7 is not okay
and it was attempted to be mounted read/write
mount: Please run fsck and try again

To run fsck and try to automatically fix any errors encountered, pass the flag -y

root@solaris:/ # fsck -y /dev/md/dsk/d7
** /dev/md/rdsk/d7
** Last Mounted on /1a
** Phase 1 – Check Blocks and Sizes
** Phase 2 – Check Pathnames
** Phase 3a – Check Connectivity
** Phase 3b – Verify Shadows/ACLs
** Phase 4 – Check Reference Counts
UNREF FILE I=1762708 OWNER=patrol MODE=100644
SIZE=263127 MTIME=Jan 25 15:40 2009
RECONNECT? yes

LINK COUNT FILE I=1762708 OWNER=patrol MODE=100644
SIZE=263127 MTIME=Jan 25 15:40 2009 COUNT 0 SHOULD BE 1
ADJUST? yes

UNREF FILE I=2376356 OWNER=patrol MODE=10700
SIZE=0 MTIME=Jan 25 15:37 2009
CLEAR? yes

UNREF FILE I=2977939 OWNER=spectrum MODE=100600
SIZE=0 MTIME=Jan 25 15:37 2009
CLEAR? yes

UNREF FILE I=2977940 OWNER=spectrum MODE=100600
SIZE=0 MTIME=Jan 25 15:37 2009
CLEAR? yes

UNREF FILE I=2977941 OWNER=spectrum MODE=100600
SIZE=0 MTIME=Jan 25 15:37 2009
CLEAR? yes

** Phase 5 – Check Cylinder Groups

CORRECT BAD CG SUMMARIES FOR CG 34? yes

CORRECTED SUPERBLOCK SUMMARIES FOR CG 34
CORRECTED SUMMARIES FOR CG 34
FILE BITMAP WRONG
FIX? yes

FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 69
CORRECTED SUMMARIES FOR CG 69
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 146
CORRECTED SUMMARIES FOR CG 146
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 147
CORRECTED SUMMARIES FOR CG 147
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 165
CORRECTED SUMMARIES FOR CG 165
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 168
CORRECTED SUMMARIES FOR CG 168
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 175
CORRECTED SUMMARIES FOR CG 175
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 202
CORRECTED SUMMARIES FOR CG 202
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 224
CORRECTED SUMMARIES FOR CG 224
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 233
CORRECTED SUMMARIES FOR CG 233
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 264
CORRECTED SUMMARIES FOR CG 264
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 269
CORRECTED SUMMARIES FOR CG 269
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 275
CORRECTED SUMMARIES FOR CG 275
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 286
CORRECTED SUMMARIES FOR CG 286
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 311
CORRECTED SUMMARIES FOR CG 311
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 316
CORRECTED SUMMARIES FOR CG 316
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 380
CORRECTED SUMMARIES FOR CG 380
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 386
CORRECTED SUMMARIES FOR CG 386
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 388
CORRECTED SUMMARIES FOR CG 388
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 395
CORRECTED SUPERBLOCK SUMMARIES FOR CG 495
CORRECTED SUPERBLOCK SUMMARIES FOR CG 516
CORRECTED SUMMARIES FOR CG 516
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 519
CORRECTED SUMMARIES FOR CG 519
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 539
CORRECTED SUMMARIES FOR CG 539
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 546
CORRECTED SUMMARIES FOR CG 546
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 576
CORRECTED SUMMARIES FOR CG 576
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 578
CORRECTED SUMMARIES FOR CG 578
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 579
CORRECTED SUMMARIES FOR CG 579
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 588
CORRECTED SUMMARIES FOR CG 588
FRAG BITMAP WRONG (CORRECTED)
CORRECTED SUPERBLOCK SUMMARIES FOR CG 631
CORRECTED SUMMARIES FOR CG 631
FRAG BITMAP WRONG (CORRECTED)
CORRECT GLOBAL SUMMARY
SALVAGE? yes

90655 files, 5690552 used, 50760198 free (12494 frags, 6343463 blocks, 0.0% fragmentation)

***** FILE SYSTEM WAS MODIFIED *****

Since fsck encountered errors, we pass once again and see if more errors are encountered

root@solaris:/ # fsck -y /dev/md/dsk/d7
** /dev/md/rdsk/d7
** Last Mounted on /1a
** Phase 1 – Check Blocks and Sizes
** Phase 2 – Check Pathnames
** Phase 3a – Check Connectivity
** Phase 3b – Verify Shadows/ACLs
** Phase 4 – Check Reference Counts
** Phase 5 – Check Cylinder Groups
90655 files, 5690552 used, 50760198 free (12494 frags, 6343463 blocks, 0.0% fragmentation)

Since no more errors were encountered, we try to mount the filesystem once again

root@solaris:/ # mount /1a
root@solaris:/ # df -k /1a
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d7 56450750 5690552 50195691 11% /1a

Couldn’t mount AIX file system. First information says that media is not formatted

I had a problem mounting a file system after the server rebooted. At first it reported that the logical volume wasn’t formatted or the format is incorrect. Then it asked to run fsck.

root@aix5:/ # mount /fallback
Replaying log for /dev/fallback.
mount: 0506-324 Cannot mount /dev/fallback on /fallback: The media is not formatted or the format is not correct.
0506-342 The superblock on /dev/fallback is dirty.  Run a full fsck to fix.

I just ran fsck on the logical volume and then mounted the file system.

root@aix5:/ # fsck /dev/fallback

****************
The current volume is: /dev/fallback
**Phase 1 – Check Blocks, Files/Directories, and Directory Entries
**Phase 2 – Count links
**Phase 3 – Duplicate Block Rescan and Directory Connectedness
**Phase 4 – Report Problems
**Phase 5 – Check Connectivity
**Phase 7 – Verify File/Directory Allocation Maps
**Phase 8 – Verify Disk Allocation Maps
15728640 kilobytes total disk space.
63 kilobytes in 30 directories.
7664455 kilobytes in 438 user files.
8061172 kilobytes are available for use.
File system is clean.
Superblock is marked dirty; FIX? y
All observed inconsistencies have been repaired.

root@aix5:/ # mount /fallback

root@aix5:/ # df -g /fallback
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/fallback      15.00      7.69   49%      470     1% /fallback

%d bloggers like this: