Weird sizes in df output

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Weird sizes in df output

Rakhesh Sasidharan-3
Hi,

Check out this "df" output:

Filesystem  1K-blocks      Used     Avail Capacity  Mounted on
<snip>
/dev/wd0g     4786774 4294886268   4628464 188894%    /mnt/nbsd

Any ideas why /dev/wd0g is showing up with that weird capacity and sizes?

Here's the relevant entry for it from my disklabel:

  g:       9724176      21430710  4.2BSD   2048 16384 27968 # Cyl 21260*- 30907*

The file system is fine -- I can do "ls -al /mnt/nbsd" and it gives me
all the files. Its my NetBSD root partition, and was formatted through
that.

I thought maybe something's corrupt, and so tried doing an "fsck -f
/dev/wd0g". I get the following:

** /dev/rwd0g
** File system is already clean
cannot alloc 4294966956 bytes for inphead

I figure doing an fsck might set things right, but the above error stops me.

The partition sizes show up fine under NetBSD btw. I even tried doing
an "fsck -f" from NetBSD in single user mode, it said everything's
fine. =/

Thanks,
Rakhesh

--
        NetBSD/i386 3.0 + pkgsrc-current | OpenBSD/i386 3.9
        http://search.gmane.org/?query=&group=gmane.os.netbsd.* (netbsd archives)
        http://search.gmane.org/?query=&group=gmane.os.openbsd.* (openbsd archives)
        http://man.netbsd.org/ | http://www.openbsd.org/cgi-bin/man.cgi (manpages)

Reply | Threaded
Open this post in threaded view
|

Re: Weird sizes in df output

Ted Unangst-2
On 6/11/06, Rakhesh Sasidharan <[hidden email]> wrote:

> /dev/wd0g     4786774 4294886268   4628464 188894%    /mnt/nbsd
>
> Any ideas why /dev/wd0g is showing up with that weird capacity and sizes?
>
> Here's the relevant entry for it from my disklabel:
>
>   g:       9724176      21430710  4.2BSD   2048 16384 27968 # Cyl 21260*- 30907*
>
> The file system is fine -- I can do "ls -al /mnt/nbsd" and it gives me
> all the files. Its my NetBSD root partition, and was formatted through
> that.
>
> I thought maybe something's corrupt, and so tried doing an "fsck -f
> /dev/wd0g". I get the following:
>
> ** /dev/rwd0g
> ** File system is already clean
> cannot alloc 4294966956 bytes for inphead
>
> I figure doing an fsck might set things right, but the above error stops me.
>
> The partition sizes show up fine under NetBSD btw. I even tried doing
> an "fsck -f" from NetBSD in single user mode, it said everything's
> fine. =/

various bsds have changed the superblock over time.  they are no
longer the same.  running fsck on a different filesystem is a good way
to break it.

Reply | Threaded
Open this post in threaded view
|

Re: Weird sizes in df output

Rakhesh Sasidharan-3
> > I thought maybe something's corrupt, and so tried doing an "fsck -f
> > /dev/wd0g". I get the following:
> >
> > ** /dev/rwd0g
> > ** File system is already clean
> > cannot alloc 4294966956 bytes for inphead
> >
> > I figure doing an fsck might set things right, but the above error stops me.
> >
> > The partition sizes show up fine under NetBSD btw. I even tried doing
> > an "fsck -f" from NetBSD in single user mode, it said everything's
> > fine. =/
>
> various bsds have changed the superblock over time.  they are no
> longer the same.  running fsck on a different filesystem is a good way
> to break it.

Eeps! So even between the 3 Free/Net/OpenBSD's there are differences
in the superblocks eh?

Going thru the list archives[1] I found a thread where the user has a
similar problem. Though, in that case, the user was running
3.8-CURRENT and upgrading to a newer kernel solved the problem.

--
        NetBSD/i386 3.0 + pkgsrc-current | OpenBSD/i386 3.9

Reply | Threaded
Open this post in threaded view
|

Re: Weird sizes in df output

Rakhesh Sasidharan-3
> > > I thought maybe something's corrupt, and so tried doing an "fsck -f
> > > /dev/wd0g". I get the following:
> > >
> > > ** /dev/rwd0g
> > > ** File system is already clean
> > > cannot alloc 4294966956 bytes for inphead
> > >
> > > I figure doing an fsck might set things right, but the above error stops me.
> > >
> > > The partition sizes show up fine under NetBSD btw. I even tried doing
> > > an "fsck -f" from NetBSD in single user mode, it said everything's
> > > fine. =/
> >

BTW, this weird output from df, is it something I can ignore and go
on? As in, if I mount that filesystem read-write and use it, could it
result in some data corruption happening?

Its my NetBSD root partition, and NetBSD shows it fine ("df" output,
"fsck", general usage, etc etc). OpenBSD too mounts it fine read-write
and I've successfully written data to it without any corruption .....
so its safe to ignore the weird df sizes and assume things will be ok
right? :)

Thanks,
Rakhesh

Reply | Threaded
Open this post in threaded view
|

Re: Weird sizes in df output

Pedro Martelletto
Please read again what Ted wrote.

-p.

Reply | Threaded
Open this post in threaded view
|

Re: Weird sizes in df output

Rakhesh Sasidharan-3
Ted said running fsck on them might break them. But that's not what I
asked. I was referring to my original problem of the weird sizes in
df.

On 6/12/06, Pedro Martelletto <[hidden email]> wrote:
> Please read again what Ted wrote.
>
> -p.
>


--
        NetBSD/i386 3.0 + pkgsrc-current | OpenBSD/i386 3.9
        Toshiba Satellite L10-102

Reply | Threaded
Open this post in threaded view
|

Re: Weird sizes in df output

Pedro Martelletto
He also said the superblocks are different, so you can't expect anything
(df, mount, fsck) to work.

-p.