PROBLEM: mkfs wrote to wrong partition

C. Linus Hicks (lhicks@nc.rr.com)
Sun, 5 Aug 2001 12:50:16 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_006B_01C11DAD.2D21EBB0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I am running Redhat 7.1 with the following:

Software:

kernel 2.4.6 smp
Gnu C 2.91.66 (It's a Redhat system but I use kgcc)
Gnu make 3.79.1
binutils 2.10.91.0.2
util-linux 2.10s
mount 2.10r
modutils 2.4.2
e2fsprogs 1.19
reiserfsprogs 3.x.0j
Linux C Library 2.2.2
Dynamic linker (ldd) 2.2.2
Procps 2.0.7
Net-tools 1.57
Console-tools 0.3.3
Sh-utils 2.0

Hardware:

Asus P2B-DS with 2 600Mhz P III Intel
1gb memory
3 SCSI disks using the new AIC7XXX driver

The point of the following exercise was to move from a single CPU 400Mhz
system to a dual 600Mhz and from an IDE disk to SCSI. I already had Redhat
7.1 with a 2.4.6 kernel running on the dual 600 and was replacing it with
the system from the 400Mhz IDE system. All operations were performed on the
dual 600.

While running the system booted with root=/dev/sda2 I made partitions on
/dev/sdb just like on /dev/sda, then copied all files over. I modified the
lilo.conf in /etc on /dev/sda2 to have boot=/dev/sdb and set the
root=/dev/sdb2 for each image. I ran lilo then booted the system.

The system looked like I expected it to: mount showed /dev/sdb2 mounted as
the root filesystem.

Next I did mkfs on the partitions on /dev/sda, starting with the higher
partitions and working down, and copied data from hda. By the way, the
P2B-DS BIOS allows me to choose whether IDE or SCSI comes first, therefore I
can boot from SCSI even though an IDE disk is attached. Current setting was
SCSI first. When I got to /dev/sda2 I tried to format it reiserfs, but it
complained about the filesystem being mounted. Not quite realizing what was
going on yet, I tried mkfs -t ext2 and it worked. Shortly after that, I
noticed that df showed /dev/sdb2 as looking nearly empty. I looked with ls
and no files showed up. And I started having problems running most commands,
as you can imagine.

The system seemed to be getting /dev/sda2 confused with /dev/sdb2. This
seems like a bug to me, and I wonder if I tried to do something that isn't
supported.

Keywords: filesystem ext2 reiserfs

I've been using Linux for several years now, but have never submitted a bug
report before.

If you need additional information, please let me know.

Linus Hicks
lhicks@nc.rr.com

------=_NextPart_000_006B_01C11DAD.2D21EBB0
Content-Type: application/ms-tnef;
name="winmail.dat"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="winmail.dat"

eJ8+IhAQAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy
b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEGgAMADgAAANEHCAAFAAwAMgAAAAAAIwEB
A5AGAMQKAAAnAAAACwACAAEAAAALACMAAAAAAAMAJgAAAAAACwApAAAAAAADADYAAAAAAB4AcAAB
AAAAJwAAAFBST0JMRU06IG1rZnMgd3JvdGUgdG8gd3JvbmcgcGFydGl0aW9uAAACAXEAAQAAABYA
AAABwR3OtAIhxmeHfukR1YP1AJAnEzMCAAACAR0MAQAAABYAAABTTVRQOkxISUNLU0BOQy5SUi5D
T00AAAALAAEOAAAAAEAABg4A7EGqzh3BAQIBCg4BAAAAGAAAAAAAAABzDoGC/mfTEYNlAICuAAAB
woAAAAsAHw4BAAAAAwAGELc1OfsDAAcQ3AYAAB4ACBABAAAAZQAAAElBTVJVTk5JTkdSRURIQVQ3
MVdJVEhUSEVGT0xMT1dJTkc6U09GVFdBUkU6S0VSTkVMMjQ2U01QR05VQzI5MTY2KElUU0FSRURI
QVRTWVNURU1CVVRJVVNFS0dDQylHTlVNQUsAAAAAAgEJEAEAAABMBgAASAYAAL0KAABMWkZ10alg
Yv8ACgEDAfcCpARlCFUHsgKDJwBQA9QCAGNoCsBzZdh0MCAHEwKAfQqECzCBC2BuZzEwMzMLpgAg
SSBhbSBydX5uAwASsAfwCYAREAVAN4guMSAD8HRoIBVAdGUgAhBsCQAD8BKwOqcKogqECoBTbwGA
dwrAamUWS2sEkWUDIBjOMgAuNC42IHNtcHEWVEdudQ9QGM8ZwTkOMRoA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AAAAQAAAA4LjUAAwAmgAggBgAAAAAAwAAAAAAA
AEYAAAAAAYUAAAAAAAALAC+ACCAGAAAAAADAAAAAAAAARgAAAAAOhQAAAAAAAAMAMIAIIAYAAAAA
AMAAAAAAAABGAAAAABGFAAAAAAAAAwAygAggBgAAAAAAwAAAAAAAAEYAAAAAGIUAAAAAAAAeAEGA
CCAGAAAAAADAAAAAAAAARgAAAAA2hQAAAQAAAAEAAAAAAAAAHgBCgAggBgAAAAAAwAAAAAAAAEYA
AAAAN4UAAAEAAAABAAAAAAAAAB4AQ4AIIAYAAAAAAMAAAAAAAABGAAAAADiFAAABAAAAAQAAAAAA
AAALAMaACyAGAAAAAADAAAAAAAAARgAAAAAAiAAAAAAAAAsAyIALIAYAAAAAAMAAAAAAAABGAAAA
AAWIAAAAAAAACwDZgAggBgAAAAAAwAAAAAAAAEYAAAAABoUAAAAAAAALANqACCAGAAAAAADAAAAA
AAAARgAAAACChQAAAQAAAAIB+A8BAAAAEAAAAHMOgYL+Z9MRg2UAgK4AAAECAfoPAQAAABAAAABz
DoGC/mfTEYNlAICuAAABAgH7DwEAAABZAAAAAAAAADihuxAF5RAaobsIACsqVsIAAFBTVFBSWC5E
TEwAAAAAAAAAAE5JVEH5v7gBAKoAN9luAAAASDpcTElOVVNcTVMgT3V0bG9va1xvdXRsb29rLnBz
dAAAAAADAP4PBQAAAAMADTT9NwAAAgF/AAEAAAAxAAAAMDAwMDAwMDA3MzBFODE4MkZFNjdEMzEx
ODM2NTAwODBBRTAwMDAwMTY0QjdGQjAxAAAAAOTj

------=_NextPart_000_006B_01C11DAD.2D21EBB0--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/