Check for bad blocks in swap partition?

Check for bad blocks in swap partition?

Post by Paco Moya Fernand » Sat, 07 May 1994 02:35:49



I'm getting some filesystem failures (lost inodes, corrupted files, etc)
and I suspect it's because of bad blocks in the IDE drive where
root is mounted and also where swap partition is located. I think
mkfs caught some bad blocks in root partition but,

how can I check for bad blocks in swap partition?

Any hint?

Thanx in advance,

Paco.

 
 
 

Check for bad blocks in swap partition?

Post by Jonathan Johns » Sat, 07 May 1994 23:41:43


: how can I check for bad blocks in swap partition?

I believe that the mkswap function can handle this if you use it as follows:

root# mkswap -c /dev/hda5 16800
             ~~
The -c option instructs mkswap to check for bad blocks while creating the
swap area (the partition name and size are just for illustration and don't
necessarily match anyone's configuration).

It shouldn't be a problem to rerun mkswap on a swap partition as long as it
is not in use at the time (you would have to run swapoff first if it were).
Correct me if I'm wrong...

--

+----------------------------------------------------------------------+
|    Jonathan R. Johnson    | Post:  Woodland Office Center, Suite 300 |
| Minnetonka Software, Inc. |        17113 Minnetonka Boulevard        |
|                           |        Minnetonka, MN 55345              |

|       Administrator       | Phone: (612)449-0187  Fax: (612)449-0318 |
+----------------------------------------------------------------------+
| "But what about you?" he asked.  "Who do you say I am?"  -- Mt 16:15 |
+----------------------------------------------------------------------+
| Note: This message is not necessarily an official company statement. |
+----------------------------------------------------------------------+

 
 
 

Check for bad blocks in swap partition?

Post by Paco Moya Fernand » Wed, 11 May 1994 00:35:38


I've tried mkswap -c and mkfs -c, and neither of them seem to report
a single bad block!

But my inodes are getting away! Yes, I can't believe it either but
yesterday I was editing /etc/lilo.conf and all seemed to work OK;
then I went to /root (root home directory) and then I lost /usr

Yes! I had being editing lilo.conf with vi and, when I wanted to execute
vi again it went away with all his friends at /usr

Some minimal installations later, I continue to experience such
things. I'll try this week with minimal read-only partitions so
as to keep the system alive enough time to detect the problem.

The HD seems to be well configured (at least it worked with MSDog)
and some people here told me than MSDog FORMAT detected some
bad blocks in the past. I've heard about strange incompatibilities
betwen some pairs of IDE disks, could anyone tell me something about
it?

The system is a no-name 486DX50, AMI BIOS, Quantum 120MB IDE for Linux
and Conner 500+MB IDE for MSDog (I couldn't choose, sorry).
Conner is master and Quantum is slave.

Any help will be appreciated,

Paco.

 
 
 

Check for bad blocks in swap partition?

Post by BARRY TITMARS » Wed, 11 May 1994 07:02:34


I have had the same problem but it was traces to a outa spec chip on a simm
 
 
 

Check for bad blocks in swap partition?

Post by Timothy C Hagm » Fri, 13 May 1994 12:49:37



Quote:> It shouldn't be a problem to rerun mkswap on a swap partition as long as it
> is not in use at the time (you would have to run swapoff first if it were).
> Correct me if I'm wrong...

I'd just like to point out that if you are currently using more
memory than you will have available after running swapoff, you
should first create a swapfile, and _then_ do the swapfile...

Otherwise, the computer locks up quite nicely :)
(or at least, it did under 1.0.4 -- haven't tried it lately...)

        Me
--
Disclaimer:  Anything I said, writ, or thought in my life should not
necessarily be held or thought to imply any view, opinion, or idea
of mine, any organization I have chosen to associate  with, or those

 
 
 

1. Install scripts should check swap for bad blocks

I tried to install both slackware and debian on a machine with an old
150M Hewlett Packard ESDI drive (a nice drive in it's day).  The drive
had a few bad sectors scattered around.  The install scripts offered
the option of doing a -c option when they mkfs'd partions, but not
when they mkswap'd the swap partition.  I didn't realize it at the
time, but my problems installing on that machine were caused by bad
sectors in the swap partition.

My conclusion is this:

Unless you are _positive_ there are no bad sectors in your swap
partition, do the mkswap by hand with the -c option.

(Now that I know what was wrong, I wish I had thet ESDI drive back
instead of the MFM drives I put in that machine.)

--
Grant Edwards                                 |Yow!  Loni Anderson's hair
Rosemount Inc.                                |should be LEGALIZED!!
                                              |

2. Kudos on stable make world (2/24/98)

3. swap partition bad blocks?

4. What is SYSCALL_139 with program "trace1.6" on HP-UX 10.20

5. bad partition table error during Partition Check

6. EIDE software RAID: should I use a master/slave configuration?

7. Finding out if there are bad blocks in the bad blocks list

8. .deb?

9. bad partition table error during Partition Check

10. How do you add a bad block to e2fs bad block list?

11. Partition check order in fs/partition/check.c?

12. Check my Linux Server bad block

13. Bad blocks on swap?