- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Total files size larger than filesystem size?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 12:17 AM
12-04-2006 12:17 AM
I've got a interesting problem.
I've got a filesystem whose size is only 32 gb and bdf shows that correctly and also reports that used space is around 28 GB and the filesystem is 92 % full.
But.. When i do a ls -al on the filesystem and calculate the total size of all the files it shows up as 37 GB :-( How can that be possible ??? if the filesystem size it self is only 32 GB
Thanks,
Siva
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 12:22 AM
12-04-2006 12:22 AM
Re: Total files size larger than filesystem size?
The first question I'd ask you is if you have *excluded* hard-linked files from your summation? For example, '/sbin/vg*' files are all hardlinks of one binary.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 12:25 AM
12-04-2006 12:25 AM
Re: Total files size larger than filesystem size?
Which tool did you use to add
rounding errors if a lot of files
Or
sparse files which show differently
With all respect
to err is human
If the computer is happy then try to be happy to
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 12:27 AM
12-04-2006 12:27 AM
Re: Total files size larger than filesystem size?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 12:31 AM
12-04-2006 12:31 AM
Re: Total files size larger than filesystem size?
Infact the filesystem had only ten DB files and there is no harlinked files.
Aslo i see the following in further investigation:
[taaput01:root:data04] # fstyp -v /dev/vg05/lvol26
vxfs
version: 4
f_bsize: 8192
f_frsize: 4096
f_blocks: 7815168
f_bfree: 599451
f_bavail: 590341
f_files: 145792
f_ffree: 149856
f_favail: 149856
f_fsid: 1074069530
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 16
f_fsindex: 7
f_size: 7815168
Filesystem size = ((size*bsize)/1024)/1024
===>((7815168*8192)/1024)/1024) == 61056 MB
--- Logical volumes ---
LV Name /dev/vg05/lvol26
VG Name /dev/vg05
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 30528 ====> Size of LV
Current LE 477
Allocated PE 477
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
Definitely the LV Size and the FS size are different , so i hope i've only the following options.
1. Reduce the FS size equal to LV size
or
2. Increase the LV size to FS size
or
3. Create a new fs from scratch and restore.
But Can anybody help me in guiding how could have this happened???
Thanks,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 12:41 AM
12-04-2006 12:41 AM
Re: Total files size larger than filesystem size?
Consider writing 1 byte at offset 0 of a file and then immediately seeking to offset 10,000,000 and writing one more byte. You have actually written 2 bytes of data but ls -l would indicate the size of the file as 10,000,000 bytes. However, to the filesystem (du, bdf) only two blocks have been allocated. When read() is called, the missing bytes are silently filled in with NUL's.
If there are multiple links to the same physical file (or symbolic links to another filesystem) then depending upon how you are adding up your totals, you could be counting the same file multiple times.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 12:51 AM
12-04-2006 12:51 AM
SolutionYou need to compute usign the 'f_frsize' value which is the filesystem's actual block size. There is nothing wrong with your filesystem.
As mentioned, it would appear that 'sparse' files have inflated your view of the size of the filesystem. Sparse files are commonly found associated with databases.
Do this:
# perl -le 'open(FH,">","/tmp/sparsef") or die;seek(FH,10000000,0);print FH "eof"'
# ls -l /tmp/sparsef
-rw-r----- 1 root sys 10000004 Dec 4 08:49 /tmp/sparsef
# du -k /tmp/sparsef
8 /tmp/sparsef
The blocks for the file are not yet allocated, but 'ls' shows the file's size as if they would be, or when they will be.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 12:55 AM
12-04-2006 12:55 AM
Re: Total files size larger than filesystem size?
the best option would be to increase filesystem it to reduce is not a good option therefore can lead loses it of data. to increase file they system uses the command lvextend -L (so great total that lvol must be in MB ) /dev/lvname
in case that you I do not have jfsonline, I disassemble lvol and I execute extendfs /dev/vg00/rlvol1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 01:08 AM
12-04-2006 01:08 AM
Re: Total files size larger than filesystem size?
Thanks for explaining me about these sparse file..
Now i've a problem.
We are in the process of replcating a database and we have created all the filesystem layouts based on the sizes calculated from the bdf and du -k outputs.
But when we copy all the files from these filesystem we are not able to do so and it fails just because it is looking for 37 GB where as we have created the Filesystem size as 30 GB only based on the original bdf o/p.
Now is there no other way to overcome this sparse files ?
Should i 've to trust only the summation of the total files size to replicate the filesystem ???
Thanks,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 01:23 AM
12-04-2006 01:23 AM
Re: Total files size larger than filesystem size?
One of the not-so-nice properties of sparse files is that they expand (i.e their blocks are filled with zeros) when you use 'cp' to copy them.
One of the best ways to avoid this is to use 'fbackup' and 'frecover'. For example, to copy from one directory to another, and *not* expand the sparse files:
# cd /srcdir && fbackup -i . -f - | (cd /dstdir; frecover -Xsrf -)
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 01:24 AM
12-04-2006 01:24 AM
Re: Total files size larger than filesystem size?
Any suggestions??
Thanks,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 01:27 AM
12-04-2006 01:27 AM
Re: Total files size larger than filesystem size?
for you copy you can use the command:
cd
with this flag it anger to copy all links
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 01:44 AM
12-04-2006 01:44 AM
Re: Total files size larger than filesystem size?
You also asked if you can trust the summartion of the total file sizes when a filesystem is replicated.
First, assuming that you have not inflated sparse riles as I showed in my post above, the answer is still generally "no". Directories consume space, too, but when files are deleted from their parent directory that space is not freed and returned as available space.
Copying a directroy and its files to a new directory will often result in a smaller directory size, although if done correctly the *files* within both directories will be the same size.
You can always compare before and after 'cksum's for each file copies. They will be identical unless the file was changing during the time of its copy or if some other interruption occured.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 03:21 AM
12-04-2006 03:21 AM
Re: Total files size larger than filesystem size?
In any event, you should really expand your LVOL and filesystem up to the maximum size. With large sparse files present, you are really an accident waiting to happen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2006 03:28 AM
12-04-2006 03:28 AM
Re: Total files size larger than filesystem size?
Thanks again for all your suggestions.
I would try the fbackup option .
Thanks,
Siva