LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Tags used in this thread
Popular LQ Tags , , , , ,

Reply
 
Thread Tools
Old 08-21-2007, 02:34 PM   #1
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 16
Thanked: 0
'df' Returning Wrong Size for a JFS Partion


[Log in to get rid of this advertisement]
Why would df report this incorrectly?
If it is incorrect...

#df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 4.7G 3.3G 1.5G 70% /
/dev/hda1 477M 31M 447M 7% /boot
#
#
#
#fdisk -l

Disk /dev/hda: 20.4 GB, 20416757760 bytes
255 heads, 63 sectors/track, 2482 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 61 489951 83 Linux
/dev/hda2 62 183 979965 82 Linux swap
/dev/hda3 184 2482 18466717+ 83 Linux
#
pricejm is offline     Reply With Quote
Old 08-21-2007, 06:14 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86; Gentoo PPC; Gentoo Sparc64; FreeBSD; OS X; Solaris
Posts: 3,732
Blog Entries: 4
Thanked: 0
Does seem out of whack:

/dev/hda1 = 489951 blocks / 1024 = ~478M [Approximately correct]
/dev/hda2 = 979965 blocks / 1024 = ~956M [Approximately correct, if your swap is around 1G]
/dev/hda3 = 18466717 blocks / 1024 = ~18033M (~18G)[Missing 13G somewhere!]

So your /dev/hda3 as reported by 'df' indeed seems quite smaller than it should be. That said, the filesystem itself does add overhead that will be reported in 'df' but not 'fdisk', but not 13G worth certainly. I am unfamiliar with JFS so I am unable to help you further here...
bulliver is offline     Reply With Quote
Old 08-21-2007, 07:17 PM   #3
syg00
Guru
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 6,908
Thanked: 165
Quote:
Originally Posted by pricejm View Post
If it is incorrect...
Indeed.
There is no requirement for a filesystem to fill a partition - normal, but not obligatory. I would expect df to be correct without evidence to the contrary.
It looks like jfs can be enlarged, but needs a kernel module (I'm also not a user).
syg00 is offline     Reply With Quote
Old 08-21-2007, 09:09 PM   #4
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 16
Thanked: 0

Original Poster
I did a modprobe jfs with no change.

What if I wrote the partition tables out again through fdisk with no changes?

Would that screw something up? I thought I had done that before.

Sort of reformatting, I don't know.
pricejm is offline     Reply With Quote
Old 08-21-2007, 09:38 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 8,123
Thanked: 63
Did you modify the partition size at anytime? fdisk operates on the partition not the filesystem.

The capability of resizing (i.e. enlarging only) a jfs filesystem is built into its driver. You can do it via the command:

mount -o remount,resize /
michaelk is offline  
Tag This Post , , , , ,
Reply With Quote
Old 08-23-2007, 04:11 PM   #6
Slackovado
Member
 
Registered: Mar 2005
Location: BC,Canada
Distribution: Slackware 12.2 , Debian 5
Posts: 81
Thanked: 1
Did you use partimage by any chance to image and then restore the partition?
With partimage, if the target partition when restoring an image is larger than the original partition when imaging then it will restore the file system to the original size.
Then df will report different size than the actual partition size.
It can be fixed easily but i'd have to look it up in my notes on another computer. So let me know if you need that info.
Slackovado is offline     Reply With Quote
Old 08-25-2007, 01:35 AM   #7
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 16
Thanked: 0

Original Poster
Thumbs up

Sorry for the late replay, didn't get an email...

I originally had multiple partitions, then after having to reinstall for the third or fourth time, (which meant putting the hard drive in another computer that would actually boot the install CD) I decided to just have a swap, boot, and the root filesystem. I'm pretty sure I formated both and I just did a full install instead of picking and choosing. Then after that I noticed the discrepancy.

I'll try the remount option...

Well that did it "mount -o remount,resize /"

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda3 18G 3.3G 15G 19% /
/dev/hda1 477M 31M 447M 7% /boot

Thanks michaelk, great work.

...maybe I didn't format...
pricejm is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
partion size identification scbops Linux - Hardware 3 03-02-2007 03:20 AM
Sizeof returning wrong packet size ?? Quest101 Linux - Networking 1 03-10-2005 09:37 AM
df returning wrong disk size delta7 Debian 4 08-20-2004 05:10 PM
Maximum file size with AIX & JFS ? stephnane AIX 4 07-07-2004 03:23 PM
cdrecord -scanbus is returning the wrong drive rdluce Linux - Newbie 3 05-28-2004 08:55 PM


All times are GMT -5. The time now is 03:53 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration