Valued Contributor
Re: how can i get size of block device (perl, shell script)

hello,

 

what i am now detect, when "fragment size" and "file system block size " are equal, "bdf" and "df" differs :

 

here "bdf" and "df" differs :

 

df -g /filesystem
/filesystem         (/dev/vgfilesystem/filesystem) :
           8192 file system block size            8192 fragment size
         262144 total blocks                    258280 total free blocks
         256263 allocated free blocks            74816 total i-nodes
          64544 total free i-nodes               64544 allocated free i-nodes
     1073807412 file system id                    vxfs file system type
           0x11 flags                             255 file system name length
 /filesystem file system specific string

bdf /filesystem
Filesystem          kbytes    used   avail %used Mounted on
/dev/vgfilesystem/filesystem
                   2097152   30912 2050104    1% /filesystem

 

 

here "bdf" and "df" is ok :

 

df -g /dev/vgfilesystem/filesystem_ok
/filesystem_ok               (/dev/vgfilesystem/filesystem_ok) :
           8192 file system block size            1024 fragment size
         524288 total blocks                    287654 total free blocks
         269777 allocated free blocks            75892 total i-nodes
          71912 total free i-nodes               71912 allocated free i-nodes
     1073807364 file system id                    vxfs file system type
           0x10 flags                             255 file system name length
       /filesystem_ok file system specific string

bdf /dev/vgfilesystem/filesystem_ok
Filesystem          kbytes    used   avail %used Mounted on
/dev/vgfilesystem/filesystem_ok
                    524288  236634  269676   47% /filesystem_ok