<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>free blocks count vs df() stat()</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi,<BR>
<BR>
Before going ahead with a fsck() and applying the<BR>
patches on a RedHat 5.x system that has important data, I checked the<BR>
numbers on the file system and depending on which way to look at<BR>
it, the number for free/available space left could be 116Gb (see<BR>
#1,3) or 24Gb (see #2).<BR>
<BR>
Does anyone know which to believe, 116Gb or 24Gb is free? I have<BR>
diagnostic details appended below.<BR>
<BR>
Also, if the volume was created with logvol() (see #4) with the maxsize<BR>
parameter used, does that affect later growth of the file system<BR>
beyond maxsize (see #3)? My superficial understanding of inodes and<BR>
blocks does not extend to lvm() and how that affects creation-time parameters shown by tune2fs.<BR>
<BR>
Thanks in advance,<BR>
<BR>
Van Ly<BR>
<BR>
--<BR>
<BR>
# 1<BR>
# this comes close to 116Gb free <- `Available: 30246714`<BR>
# stat -f /common<BR>
  File: "/common"<BR>
    ID: 0        Namelen: 255     Type: ext2/ext3<BR>
Block size: 4096       Fundamental block size: 4096<BR>
Blocks: Total: 60944400   Free: 33391866   Available: 30246714<BR>
Inodes: Total: 62914560   Free: 62037005<BR>
<BR>
# 2<BR>
# free blocks suggests there is 24Gb free<BR>
 tune2fs 1.39 (29-May-2006)<BR>
 Filesystem volume name:   <none><BR>
 Last mounted on:          <not available><BR>
 Filesystem UUID:          b78a127a-80d9-43e2-8f9c-143a82137eb8<BR>
 Filesystem magic number:  0xEF53<BR>
 Filesystem revision #:    1 (dynamic)<BR>
 Filesystem features:      has_journal ext_attr resize_inode dir_index<BR>
 filetype needs_re\<BR>
 covery sparse_super large_file<BR>
 Default mount options:    user_xattr acl<BR>
 Filesystem state:         clean<BR>
 Errors behavior:          Continue<BR>
 Filesystem OS type:       Linux<BR>
 Inode count:              62914560<BR>
 Block count:              62914560<BR>
 Reserved block count:     3145152<BR>
 Free blocks:              6417762<BR>
 Free inodes:              15443849<BR>
 First block:              0<BR>
 Block size:               4096<BR>
 Fragment size:            4096<BR>
 Reserved GDT blocks:      1009<BR>
 Blocks per group:         32768<BR>
 Fragments per group:      32768<BR>
 Inodes per group:         32768<BR>
 Inode blocks per group:   1024<BR>
 Filesystem created:       Thu Dec 18 12:06:47 2008<BR>
 Last mount time:          Sun Feb  1 07:25:25 2009<BR>
 Last write time:          Sun Feb  1 07:25:25 2009<BR>
 Mount count:              3<BR>
 Maximum mount count:      -1<BR>
 Last checked:             Thu Dec 18 12:06:47 2008<BR>
 Check interval:           0 (<none>)<BR>
 Reserved blocks uid:      0 (user root)<BR>
 Reserved blocks gid:      0 (group root)<BR>
 First inode:              11<BR>
 Inode size:               128<BR>
 Journal inode:            8<BR>
 First orphan inode:       30212898<BR>
 Default directory hash:   tea<BR>
 Directory Hash Seed:      15dea504-b626-476b-8513-fdc11b43abaf<BR>
 Journal backup:           inode blocks<BR>
<BR>
# 3<BR>
# volume has since been grown to 233Gb<BR>
# df -h /common<BR>
 Filesystem            Size  Used Avail Use% Mounted on<BR>
 /dev/mapper/vg0-commonlv<BR>
                       233G  105G  116G  48% /common<BR>
<BR>
# 4<BR>
# redhat kickstart created volume<BR>
logvol /common --fstype ext3 --name=commonlv --vgname=vg0 --size=512 --grow --maxsize=61440<BR>
<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>