UFS Where is my space?

Soomething's not right with the amount of space I have on my disk and I can't figure what is wrong....
gpart show da0:-
Code:
=>       40  195371488  da0  GPT  (93G)
         40       1024    1  freebsd-boot  (512K)
       1064   52428800    2  freebsd-ufs  (25G)
   52429864        984       - free -  (492K)
   52430848   48826368    3  linux-data  (23G)
  101257216   94114312       - free -  (45G)

According to this /dev/da0p2 (/dev/gpt/Root) is 25G in size.

mount shows:
Code:
/dev/gpt/Root on / (ufs, local, journaled soft-updates)
devfs on /dev (devfs, local, multilabel)
df -h shows:-
Code:
Filesystem       Size    Used   Avail Capacity  Mounted on
/dev/gpt/Root    9.7G    4.6G    4.3G    52%    /
devfs            1.0K    1.0K      0B   100%    /dev

Why does df -h show 9.7G when the partition size (according to gpart) is 25G ?
 
First run gpart recover da0 to ensure both copies of the GPT partition table are the same.
Maybe you enlarged the partition without growing the fs?
growfs(8)
 
Why does df -h show 9.7G when the partition size (according to gpart) is 25G ?
The filesystem size is not necessary the same as the partition size, it can be smaller.
Also, you may have slices in that partition, and, as Phishfry mentioned, run gpart on that partition to reveal them.
 
I'm booting from another disk to see if this has any bearing, but it doesn't

Code:
=>       40  195371488    da1  GPT  (93G)
         40       1024  da1p1  freebsd-boot  (512K)
       1064   52428800  da1p2  freebsd-ufs  (25G)
   52429864        984         - free -  (492K)
   52430848   48826368  da1p3  linux-data  (23G)
  101257216   94114312         - free -  (45G)

Aftrer backing up all the files from the partition, I'm tempted to reformat to see if that makes any difference and then restore the files. Can't see this doin any harm. I don't think I will get to the bottom of this, unless all the used up space is full of bad blocks.
 
Back
Top