LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-21-2007, 01:34 PM   #1
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17

Rep: Reputation: 0
'df' Returning Wrong Size for a JFS Partion


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
#
 
Old 08-21-2007, 05:14 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 77
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...
 
Old 08-21-2007, 06:17 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,352

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
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).
 
Old 08-21-2007, 08:09 PM   #4
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17

Original Poster
Rep: Reputation: 0
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.
 
Old 08-21-2007, 08:38 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
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 /
 
Old 08-23-2007, 03:11 PM   #6
Slackovado
Member
 
Registered: Mar 2005
Location: Burnaby, BC, Canada
Distribution: Slackware 14 32bit, Debian, Arch
Posts: 216

Rep: Reputation: 27
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.
 
Old 08-25-2007, 12:35 AM   #7
pricejm
LQ Newbie
 
Registered: Aug 2005
Location: Charleston, SC.
Posts: 17

Original Poster
Rep: Reputation: 0
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...
 
  


Reply

Tags
df, jfs, partition, resize, size


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:20 AM
Sizeof returning wrong packet size ?? Quest101 Linux - Networking 1 03-10-2005 08:37 AM
df returning wrong disk size delta7 Debian 4 08-20-2004 04:10 PM
Maximum file size with AIX & JFS ? stephnane AIX 4 07-07-2004 02:23 PM
cdrecord -scanbus is returning the wrong drive rdluce Linux - Newbie 3 05-28-2004 07:55 PM


All times are GMT -5. The time now is 10:57 AM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration