Operating System - HP-UX
1829537 Members
2110 Online
109992 Solutions
New Discussion

Inode count wrong => disk bad ?

 
SOLVED
Go to solution
Jeroen_D
Regular Advisor

Inode count wrong => disk bad ?

Hi,

I had to clone a disk since it was shaking a bit and we were fearing it would fail soon. The HP-UX revision is 9.01 which is kinda old, but I found a whitepaper on this site (document ID : A4914190) with title "How to create an alternate boot disk on a 700 running 9.X".

I started with newfs and then mkboot, and then did an fsck of the new disk : no errors.
I then mounted the disk and copied the contents of the old disk to the new disk using "find / -xdev -depth -print | cpio -pxdm /newroot" as instructed in the whitepaper. I then rebooted with only the new disk. The boot goes fine, but when I type fsck, I get these errors :

Phase 4 - Check reference counts
"Inode count wrong in superblk" Fix ?
I say : yes
Phase 5 : Check Cyl Groups
40 Blk(s) missing
BAD Cylinder groups
Fix ?
I say yes

Then it instructs me to reboot -n.
After reboot, I do an fsck : same errors.

I thought the new disk was bad, but when I installed HP-UX 10.20 on it using a recovery tape, and then typing fsck : no errors.

???? My disk appears to be good, but when I copy the contents of the old disk, I get errors. Is it because some superblk-file is being copied too ? Can I recreate that file ? The system otherwise appears to be running fine.

TIA,
Jeroen.
6 REPLIES 6
Stefan Farrelly
Honored Contributor

Re: Inode count wrong => disk bad ?


Very interersting. You say the boot from the new copied disk goes fine - but then you do fsck. Why ? If the new disk doesnt book successfully then it will ask you to fsck manually (due to a problem) - is this what is happening ?

Anyway, the 40 Blocks missing error is really bad, I doubt you can recover from it. It looks to me that when you copied from the old disk to the new using that cpio command something didnt copy successfully. Were there any errors ? Basically I think there is an entry in the inode list which refers to data covering 40 blocks but these 40 blocks dont exist (they didnt copy over). I think your original disk has some bad blocks and cpio was unable to make a 100% copy to the new disk. Try the procedure again and watch for any messages from the cpio.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Carlos Fernandez Riera
Honored Contributor

Re: Inode count wrong => disk bad ?

I cant understand. Are you running a fsck on a mounted filesystem ??.


unsupported
Paula J Frazer-Campbell
Honored Contributor

Re: Inode count wrong => disk bad ?

Hi

On your copy command:-

find / -xdev -depth -print | cpio -pxdm /newroot

add the verbose option and either sit and watch for errors or send the results to a file - it may help identify the problem.

e.g.

find / -xdev -depth -print | cpio -pvxdm /newroot > /tmp/cp-output


HTH

Paula
If you can spell SysAdmin then you is one - anon
Frank Slootweg
Honored Contributor
Solution

Re: Inode count wrong => disk bad ?

I think the new disk is fine.

As others said, you normally should not run fsck on the (mounted) root filesystem, especially if there is no (other) reason.

*If* you use fsck on the mounted root fileystem, then:

- You *must* do this in single-user mode, i.e. "shutdown 0".

- You *must* do it on the *block* device, i.e. /ev/vg00/lvol?, not rlvol?

- When fsck instructs you to reboot, you must do so *immediately*, i.e. no other command(s) in between, and *exactly* as fsck tells you to, i.e. fsck will tell you whether or not you should use "-n" on the "reboot" command.

Concerning the 'errors':

An inode count wrong is often normal. If you want to be sure, note the inode number (I think it says "I=...") and do an ncheck(1M) to determine which file points to that inode number. Then check that file and its links.

The "40 Blk(s) missing" is probably also innocent. They are not really missing, but superflous, i.e. the opposite of missing. It means that the block have been allocated in the block bitmap, but there are no files claiming those blocks.

"BAD Cylinder groups" is normal, it is a result of the other 'errors'.

I hope this helps.

Frank Slootweg, HP.

Jeroen_D
Regular Advisor

Re: Inode count wrong => disk bad ?

Hi,

we did an fsck because a 2D drawing programme called ME-10 behaved badly when large drawings are being read.

I did the fsck when there was no network connection and after a reboot, so no programmes were running. But indeed it is better to fsck in single user mode. I did the latter and one time fsck didn't find an error and the other time fsck found 14 missing blocks, so the error appears to change.

I believe I have copied some bad blocks from the previous disk (I did get some errors during the find, cpio-operation) to the new one. Apparently fsck cannot repair these bad blocks on the new disk, so I will be reinstalling HP-UX 9.X to be certain that the entire filesystem is ok.

The only strange thing we had was that when loading those large drawings, we saw the swapsize increase to 60% and then the system slows down hugely and barely reacts. It has 64 MB RAM and a swap of 96. I have now increased it to 150 MB and will see how it reacts. You would think that the swapfile is damaged but I had it created (not copied) on the new disk...

Anywayz, thanks, I will reinstall the system just to be certain.

Jeroen.
Frank Slootweg
Honored Contributor

Re: Inode count wrong => disk bad ?

Concerning the performance issue with large drawings:

It looks like there is too much memory pressure (too little memory), which probably is causing swapping/paging *activity*, which makes the system slow.

Adding swap space will not improve performance. If you have too little swap space, you will be unable to run more programs or an already running program might abort, but it will not give a performance problem.

You can try to look at the performance and try to optimize it, but 64MB is very small for todays standards. Some utilities: sar, vmstat and iostat and to a certain extent top. If you have Glance (trial version on your Application media) then that is best. Look at the kernel parameters, especially for the file system buffer cache (static or dynamic). There are many threads in this forum on performance/memory usage. They are mostly for 10.X and newer, but quite a lot of the information is also applicable to (700) 9.X.

Normally, I would advise to upgrade to 10.20 or newer, especially because 9.X is non-Y2K compliant and not supported anymore, but without adding memory, 10.20 will probably be worse (in memory usage and hence performance) than 9.X.

Frank Slootweg, HP.