Bug 1827 - df is messed up on raid disks
df is messed up on raid disks
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-03-26 12:47 EST by Ward Fenton
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-06-18 12:35:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ward Fenton 1999-03-26 12:47:09 EST
the df command's output is no longer correct for my software
based raid partitions.

This problem didn't exist with 5.8.6.

Here's the output of the "df" command on my system.

$ df
Filesystem   1024-blocks  Used Available Capacity Mounted on
/dev/sda1        124407  100710    17273     85%   /
/dev/md0         379248  261041   118207     69%   /usr
/dev/md1        2602504  229393  2373111      9%   /usr/data


These values are about 1/4 the correct size.


Below is the disk geometry, raid configuration, and related
kernel output.


############################################################
############################################################
############################################################

$ fdisk /dev/sda

Command (m for help): p

Disk /dev/sda: 255 heads, 63 sectors, 527 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start      End   Blocks   Id  System
/dev/sda1             1       16   128488+  83  Linux native
/dev/sda2            17       81   522112+  fd  Unknown
/dev/sda3            82      527  3582495   fd  Unknown

Command (m for help): q
$ fdisk /dev/sdb

Command (m for help): p

Disk /dev/sdb: 255 heads, 63 sectors, 527 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start      End   Blocks   Id  System
/dev/sdb1             1       16   128488+  82  Linux swap
/dev/sdb2            17       81   522112+  fd  Unknown
/dev/sdb3            82      527  3582495   fd  Unknown

Command (m for help): q
$ fdisk /dev/sdc

Command (m for help): p

Disk /dev/sdc: 255 heads, 63 sectors, 527 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start      End   Blocks   Id  System
/dev/sdc1             1       16   128488+  82  Linux swap
/dev/sdc2            17       81   522112+  fd  Unknown
/dev/sdc3            82      527  3582495   fd  Unknown

Command (m for help): q


############################################################
############################################################
############################################################

# Striping example
# /dev/md0 using /dev/sda2 /dev/sdb2 and /dev/sdc2
# /dev/md1 using /dev/sda3 /dev/sdb3 and /dev/sdc3

raiddev /dev/md0
	raid-level		0
	nr-raid-disks		3
	nr-spare-disks		0
	persistent-superblock	1
	chunk-size		16
	device			/dev/sda2
	raid-disk		0
	device			/dev/sdb2
	raid-disk		1
	device			/dev/sdc2
	raid-disk		2
raiddev /dev/md1
	raid-level		0
	nr-raid-disks		3
	nr-spare-disks		0
	persistent-superblock	1
	chunk-size		16
	device			/dev/sda3
	raid-disk		0
	device			/dev/sdb3
	raid-disk		1
	device			/dev/sdc3
	raid-disk		2



############################################################
############################################################
############################################################

Here are the messages that were written to /var/log/messages
during the kernel's autodetection of my raid configuration.
(kernel was 2.2.3 + ac4 + raid patches)


Mar 22 19:44:00 ccicdmz kernel: EATA/DMA 2.0x: Copyright (C)
1994-1998 Dario Ballabio.
Mar 22 19:44:00 ccicdmz kernel: EATA config options -> tc:y,
lc:n, mq:16, eh:y, rs:y, et:n.
Mar 22 19:44:00 ccicdmz kernel: EATA0: 2.0C, PCI 0xcc70, IRQ
9, BMST, SG 122, MB 64.
Mar 22 19:44:00 ccicdmz kernel: EATA0: wide SCSI support
enabled, max_id 16, max_lun 8.
Mar 22 19:44:00 ccicdmz kernel: EATA0: SCSI channel 0
enabled, host target ID 7.
Mar 22 19:44:01 ccicdmz crond: crond startup succeeded
Mar 22 19:44:00 ccicdmz kernel: scsi0 : EATA/DMA 2.0x rev.
4.33.00
Mar 22 19:44:00 ccicdmz kernel: scsi : 1 host.
Mar 22 19:44:00 ccicdmz kernel:   Vendor: IBM       Model:
DCAS-34330W       Rev: S65A
Mar 22 19:44:00 ccicdmz kernel:   Type:   Direct-Access
ANSI SCSI revision: 02
Mar 22 19:44:00 ccicdmz kernel: Detected scsi disk sda at
scsi0, channel 0, id 0, lun 0
Mar 22 19:44:00 ccicdmz kernel:   Vendor: IBM       Model:
DCAS-34330W       Rev: S65A
Mar 22 19:44:00 ccicdmz kernel:   Type:   Direct-Access
ANSI SCSI revision: 02
Mar 22 19:44:00 ccicdmz kernel: Detected scsi disk sdb at
scsi0, channel 0, id 1, lun 0
Mar 22 19:44:00 ccicdmz kernel:   Vendor: IBM       Model:
DCAS-34330W       Rev: S65A
Mar 22 19:44:00 ccicdmz kernel:   Type:   Direct-Access
ANSI SCSI revision: 02
Mar 22 19:44:00 ccicdmz kernel: Detected scsi disk sdc at
scsi0, channel 0, id 2, lun 0
Mar 22 19:44:00 ccicdmz kernel:   Vendor: QUANTUM   Model:
FIREBALL_TM1280S  Rev: 300Z
Mar 22 19:44:00 ccicdmz kernel:   Type:   Direct-Access
ANSI SCSI revision: 02
Mar 22 19:44:00 ccicdmz kernel: Detected scsi disk sdd at
scsi0, channel 0, id 4, lun 0
Mar 22 19:44:00 ccicdmz kernel: EATA0: scsi0, channel 0, id
0, lun 0, cmds/lun 16, unsorted, tagged.
Mar 22 19:44:00 ccicdmz kernel: EATA0: scsi0, channel 0, id
1, lun 0, cmds/lun 16, unsorted, tagged.
Mar 22 19:44:00 ccicdmz kernel: EATA0: scsi0, channel 0, id
2, lun 0, cmds/lun 16, unsorted, tagged.
Mar 22 19:44:00 ccicdmz kernel: EATA0: scsi0, channel 0, id
4, lun 0, cmds/lun 16, unsorted, tagged.
Mar 22 19:44:00 ccicdmz kernel: SCSI device sda: hdwr
sector= 512 bytes. Sectors= 8467199 [4134 MB] [4.1 GB]
Mar 22 19:44:00 ccicdmz kernel:  sda: sda1 sda2 sda3
Mar 22 19:44:00 ccicdmz kernel: SCSI device sdb: hdwr
sector= 512 bytes. Sectors= 8466688 [4134 MB] [4.1 GB]
Mar 22 19:44:00 ccicdmz kernel:  sdb: sdb1 sdb2 sdb3
Mar 22 19:44:00 ccicdmz kernel: SCSI device sdc: hdwr
sector= 512 bytes. Sectors= 8466688 [4134 MB] [4.1 GB]
Mar 22 19:44:00 ccicdmz kernel:  sdc: sdc1 sdc2 sdc3
Mar 22 19:44:02 ccicdmz inet: inetd startup succeeded
Mar 22 19:44:00 ccicdmz kernel: SCSI device sdd: hdwr
sector= 512 bytes. Sectors= 2503871 [1222 MB] [1.2 GB]
Mar 22 19:44:00 ccicdmz kernel:  sdd: sdd1 sdd2 sdd3
Mar 22 19:44:00 ccicdmz kernel: raid0 personality registered
Mar 22 19:44:00 ccicdmz kernel: autodetecting RAID arrays
Mar 22 19:44:00 ccicdmz kernel: (read) sda2's sb offset:
522048 [events: 0000000e]
Mar 22 19:44:00 ccicdmz kernel: (read) sda3's sb offset:
3582400 [events: 00000006]
Mar 22 19:44:00 ccicdmz kernel: (read) sdb2's sb offset:
522048 [events: 0000000e]
Mar 22 19:44:00 ccicdmz kernel: (read) sdb3's sb offset:
3582400 [events: 00000006]
Mar 22 19:44:00 ccicdmz kernel: (read) sdc2's sb offset:
522048 [events: 0000000e]
Mar 22 19:44:00 ccicdmz kernel: (read) sdc3's sb offset:
3582400 [events: 00000006]
Mar 22 19:44:00 ccicdmz kernel: autorun ...
Mar 22 19:44:00 ccicdmz kernel: considering sdc3 ...
Mar 22 19:44:00 ccicdmz kernel:   adding sdc3 ...
Mar 22 19:44:00 ccicdmz kernel:   adding sdb3 ...
Mar 22 19:44:00 ccicdmz kernel:   adding sda3 ...
Mar 22 19:44:00 ccicdmz kernel: created md1
Mar 22 19:44:00 ccicdmz kernel: bind<sda3,1>
Mar 22 19:44:00 ccicdmz kernel: bind<sdb3,2>
Mar 22 19:44:00 ccicdmz kernel: bind<sda3,1>
Mar 22 19:44:00 ccicdmz kernel: bind<sdb3,2>
Mar 22 19:44:00 ccicdmz kernel: bind<sdc3,3>
Mar 22 19:44:00 ccicdmz kernel: running: <sdc3><sdb3><sda3>
Mar 22 19:44:00 ccicdmz kernel: now!
Mar 22 19:44:00 ccicdmz kernel: sdc3's event counter:
00000006
Mar 22 19:44:00 ccicdmz kernel: sdb3's event counter:
00000006
Mar 22 19:44:00 ccicdmz kernel: sda3's event counter:
00000006
Mar 22 19:44:00 ccicdmz kernel: mask fffffff0
Mar 22 19:44:00 ccicdmz kernel:  rdev->size: 3582400
Mar 22 19:44:00 ccicdmz kernel:  masked rdev->size: 3582400
Mar 22 19:44:00 ccicdmz kernel:   new md_size: 3582400
Mar 22 19:44:00 ccicdmz kernel:  rdev->size: 3582400
Mar 22 19:44:00 ccicdmz kernel:  masked rdev->size: 3582400
Mar 22 19:44:00 ccicdmz kernel:   new md_size: 7164800
Mar 22 19:44:00 ccicdmz kernel:  rdev->size: 3582400
Mar 22 19:44:00 ccicdmz kernel:  masked rdev->size: 3582400
Mar 22 19:44:00 ccicdmz kernel:   new md_size: 10747200
Mar 22 19:44:00 ccicdmz kernel: md1: max total readahead
window set to 384k
Mar 22 19:44:00 ccicdmz kernel: md1: 3 data-disks, max
readahead per data-disk: 128k
Mar 22 19:44:00 ccicdmz kernel: raid0: looking at sda3
Mar 22 19:44:00 ccicdmz kernel: raid0:   comparing
sda3(3582400) with sda3(3582400)
Mar 22 19:44:00 ccicdmz kernel: raid0:   END
Mar 22 19:44:00 ccicdmz kernel: raid0:   ==> UNIQUE
Mar 22 19:44:00 ccicdmz kernel: raid0: 1 zones
Mar 22 19:44:00 ccicdmz kernel: raid0: looking at sdb3
Mar 22 19:44:00 ccicdmz kernel: raid0:   comparing
sdb3(3582400) with sda3(3582400)
Mar 22 19:44:00 ccicdmz kernel: raid0:   EQUAL
Mar 22 19:44:00 ccicdmz kernel: raid0: looking at sdc3
Mar 22 19:44:00 ccicdmz kernel: raid0:   comparing
sdc3(3582400) with sda3(3582400)
Mar 22 19:44:00 ccicdmz kernel: raid0:   EQUAL
Mar 22 19:44:00 ccicdmz kernel: raid0: FINAL 1 zones
Mar 22 19:44:00 ccicdmz kernel: zone 0
Mar 22 19:44:00 ccicdmz kernel:  checking sda3 ... contained
as device 0
Mar 22 19:44:00 ccicdmz kernel:   (3582400) is smallest!.
Mar 22 19:44:00 ccicdmz kernel:  checking sdb3 ... contained
as device 1
Mar 22 19:44:00 ccicdmz kernel:  checking sdc3 ... contained
as device 2
Mar 22 19:44:00 ccicdmz kernel:  zone->nb_dev: 3, size:
10747200
Mar 22 19:44:00 ccicdmz kernel: current zone offset: 3582400
Mar 22 19:44:00 ccicdmz kernel: done.
Mar 22 19:44:00 ccicdmz kernel: raid0 : md_size is 10747200
blocks.
Mar 22 19:44:00 ccicdmz kernel: raid0 : conf->smallest->size
is 10747200 blocks.
Mar 22 19:44:00 ccicdmz kernel: raid0 : nb_zone is 1.
Mar 22 19:44:00 ccicdmz kernel: raid0 : Allocating 8 bytes
for hash.
Mar 22 19:44:00 ccicdmz kernel: md: updating md1 RAID
superblock on device
Mar 22 19:44:00 ccicdmz kernel: sdc3 [events:
00000007](write) sdc3's sb offset: 3582400
Mar 22 19:44:00 ccicdmz kernel: sdb3 [events:
00000007](write) sdb3's sb offset: 3582400
Mar 22 19:44:00 ccicdmz kernel: sda3 [events:
00000007](write) sda3's sb offset: 3582400
Mar 22 19:44:00 ccicdmz kernel: .
Mar 22 19:44:00 ccicdmz kernel: considering sdc2 ...
Mar 22 19:44:00 ccicdmz kernel:   adding sdc2 ...
Mar 22 19:44:00 ccicdmz kernel:   adding sdb2 ...
Mar 22 19:44:00 ccicdmz kernel:   adding sda2 ...
Mar 22 19:44:00 ccicdmz kernel: created md0
Mar 22 19:44:00 ccicdmz kernel: bind<sda2,1>
Mar 22 19:44:00 ccicdmz kernel: bind<sdb2,2>
Mar 22 19:44:00 ccicdmz kernel: bind<sdc2,3>
Mar 22 19:44:00 ccicdmz kernel: running: <sdc2><sdb2><sda2>
Mar 22 19:44:00 ccicdmz kernel: now!
Mar 22 19:44:00 ccicdmz kernel: sdc2's event counter:
0000000e
Mar 22 19:44:00 ccicdmz kernel: sdb2's event counter:
0000000e
Mar 22 19:44:00 ccicdmz kernel: sda2's event counter:
0000000e
Mar 22 19:44:00 ccicdmz kernel: mask fffffff0
Mar 22 19:44:00 ccicdmz kernel:  rdev->size: 522048
Mar 22 19:44:00 ccicdmz kernel:  masked rdev->size: 522048
Mar 22 19:44:00 ccicdmz kernel:   new md_size: 522048
Mar 22 19:44:00 ccicdmz kernel:  rdev->size: 522048
Mar 22 19:44:00 ccicdmz kernel:  masked rdev->size: 522048
Mar 22 19:44:00 ccicdmz kernel:   new md_size: 1044096
Mar 22 19:44:00 ccicdmz kernel:  rdev->size: 522048
Mar 22 19:44:00 ccicdmz kernel:  masked rdev->size: 522048
Mar 22 19:44:00 ccicdmz kernel:   new md_size: 1566144
Mar 22 19:44:00 ccicdmz kernel: md0: max total readahead
window set to 384k
Mar 22 19:44:00 ccicdmz kernel: md0: 3 data-disks, max
readahead per data-disk: 128k
Mar 22 19:44:00 ccicdmz kernel: raid0: looking at sda2
Mar 22 19:44:00 ccicdmz kernel: raid0:   comparing
sda2(522048) with sda2(522048)
Mar 22 19:44:00 ccicdmz kernel: raid0:   END
Mar 22 19:44:00 ccicdmz kernel: raid0:   ==> UNIQUE
Mar 22 19:44:00 ccicdmz kernel: raid0: 1 zones
Mar 22 19:44:00 ccicdmz kernel: raid0: looking at sdb2
Mar 22 19:44:00 ccicdmz kernel: raid0:   comparing
sdb2(522048) with sda2(522048)
Mar 22 19:44:00 ccicdmz kernel: raid0:   EQUAL
Mar 22 19:44:00 ccicdmz kernel: raid0: looking at sdc2
Mar 22 19:44:00 ccicdmz kernel: raid0:   comparing
sdc2(522048) with sda2(522048)
Mar 22 19:44:00 ccicdmz kernel: raid0:   EQUAL
Mar 22 19:44:00 ccicdmz kernel: raid0: FINAL 1 zones
Mar 22 19:44:00 ccicdmz kernel: zone 0
Mar 22 19:44:00 ccicdmz kernel:  checking sda2 ... contained
as device 0
Mar 22 19:44:00 ccicdmz kernel:   (522048) is smallest!.
Mar 22 19:44:00 ccicdmz kernel:  checking sdb2 ... contained
as device 1
Mar 22 19:44:00 ccicdmz kernel:  checking sdc2 ... contained
as device 2
Mar 22 19:44:00 ccicdmz kernel:  zone->nb_dev: 3, size:
1566144
Mar 22 19:44:00 ccicdmz kernel: current zone offset: 522048
Mar 22 19:44:00 ccicdmz kernel: done.
Mar 22 19:44:00 ccicdmz kernel: raid0 : md_size is 1566144
blocks.
Mar 22 19:44:00 ccicdmz kernel: raid0 : conf->smallest->size
is 1566144 blocks.
Mar 22 19:44:00 ccicdmz kernel: raid0 : nb_zone is 1.
Mar 22 19:44:00 ccicdmz kernel: raid0 : Allocating 8 bytes
for hash.
Mar 22 19:44:00 ccicdmz kernel: md: updating md0 RAID
superblock on device
Mar 22 19:44:00 ccicdmz kernel: sdc2 [events:
0000000f](write) sdc2's sb offset: 522048
Mar 22 19:44:00 ccicdmz kernel: sdb2 [events:
0000000f](write) sdb2's sb offset: 522048
Mar 22 19:44:00 ccicdmz kernel: sda2 [events:
0000000f](write) sda2's sb offset: 522048
Mar 22 19:4
Comment 1 Jeff Johnson 1999-03-26 20:10:59 EST
This smells more like a kernel bug ...
Comment 2 Preston Brown 1999-03-30 15:59:59 EST
I agree sounds like a kernel bug.  Has this been fixed with the 2.2.5
kernel?  We haven't changed "df" in quite some time.
Comment 3 Michael K. Johnson 1999-04-09 19:33:59 EDT
This is actually a glibc bug
Comment 4 Cristian Gafton 1999-06-18 12:35:59 EDT
Is this still tru in the final shipping Red Hat Linux 6.0?

Please reopen if so.

Note You need to log in before you can comment on or make changes to this bug.