Hi all... I have a strange problem. 2 of my mount points already use 7% of space, even when I check the directory is empty. When I re-format it, it release the space for a while, after 1 or 2 days, the space is used again for 7% - 10 %. What could be the reason? I am using RHAS 2.1 Enterprise Kernel 2.1 and OCFS release 1.0.9-6 Thanks Jeram
well you don't say how big the fielsystem is... by default you lose like 4 or 5mb just at first mount then another 4 or 5 mb per node that mounts so if you hve 4 nodes you can already be looking at 20-30mb of space out the door. when you create tons of files in a directory, the space of those entrie is not released until the dir is deleted etc. there was a bug in 1.0.9-xx where we had soem sort of a leak when creating and removing files often ina directory but.. anyways, in geneal people have many gb's of space, not a few mb or a few 100mb, if that's the case, I don't really care. On Tue, Mar 09, 2004 at 01:31:32PM +0700, Jeram wrote:> > Hi all... > > I have a strange problem. 2 of my mount points already use 7% of space, even > when I check the directory is empty. > When I re-format it, it release the space for a while, after 1 or 2 days, > the space is used again for 7% - 10 %. > > What could be the reason? > > I am using RHAS 2.1 Enterprise Kernel 2.1 and OCFS release 1.0.9-6 > > Thanks > Jeram > _______________________________________________ > Ocfs-users mailing list > Ocfs-users@oss.oracle.com > http://oss.oracle.com/mailman/listinfo/ocfs-users
Hi Wim Thanks for your reply. I am really new to OCFS, This is my first project in using OCFS. I have installed the RAC server with 5 nodes, total Space for Oracle DB will 8TB, I have arround 50 mount points, but only 2 mount points with @1GB size are having this problem,I dont mind to loose the space, but Another questions is, will the percentage used space increase in the future? Thanks Jeram -----Original Message----- From: Wim Coekaerts [mailto:wim.coekaerts@oracle.com] Sent: Tuesday, March 09, 2004 1:49 PM To: Jeram Cc: ''ocfs-users@oss.oracle.com' ' Subject: Re: [Ocfs-users] OCFS filesystem used 7% well you don't say how big the fielsystem is... by default you lose like 4 or 5mb just at first mount then another 4 or 5 mb per node that mounts so if you hve 4 nodes you can already be looking at 20-30mb of space out the door. when you create tons of files in a directory, the space of those entrie is not released until the dir is deleted etc. there was a bug in 1.0.9-xx where we had soem sort of a leak when creating and removing files often ina directory but.. anyways, in geneal people have many gb's of space, not a few mb or a few 100mb, if that's the case, I don't really care. On Tue, Mar 09, 2004 at 01:31:32PM +0700, Jeram wrote:> > Hi all... > > I have a strange problem. 2 of my mount points already use 7% of space,even> when I check the directory is empty. > When I re-format it, it release the space for a while, after 1 or 2 days, > the space is used again for 7% - 10 %. > > What could be the reason? > > I am using RHAS 2.1 Enterprise Kernel 2.1 and OCFS release 1.0.9-6 > > Thanks > Jeram > _______________________________________________ > Ocfs-users mailing list > Ocfs-users@oss.oracle.com > http://oss.oracle.com/mailman/listinfo/ocfs-users
Of course 1MB is allocated for the DirFile and 128K for the DirBitMapFile right away at the first mount (even though none of it is used initially except for the root directory). So yeah, DirNode slots in the DirFile get used up as you create more directories and when you create more than 254 files in a single directory (and those slots are freed when you remove directories)... but technically, this shouldn't affect the free space reported by the file system until you use up the entire 1MB allocated for the DirFile (8 DirNodes) - and then I assume it allocates at least another 1M for the DirFile (8 more directory slots before you lose any more space on your filesystem)... Yeah, I'm being a bit anal about the technicalities here... but do I understand this correctly? :) /js>>> Wim Coekaerts <wim.coekaerts@oracle.com> 03/09/2004 2:44:04 AM >>> > yes every directory is 128kb, which can hold 254 files, when you add > more files it keeps allocating in 128kb chunks > i suggest you go to oss.oracle.com and go to the documentationsection> of ocfs, there are a bunch of presentations documents etc > > remember, if you have serious problems call support even tho we hang > around here, when things are busy this is not priority > > Wim<<<<...>>>>
Yes, you are understanding it correctly. OCFS has a global bitmap from which space is allocated in blocksize (specified during make) chunks. It also has two other bitmaps, directory and extent, for which space is allocated from the global bitmap and then is used to allocate in smaller (or larger) chunks. The dir bitmap allocates chunks in 128K and the extent in 512 bytes. So to provide an "analy" accurate picture, one would have to read all three bitmaps. Unfortunately, statfs is a very heavily used system call. So, inorder not to kill performance, we limit ourselves to reading only the global bitmap which leads to the slight discrepancy. Sunil
Actually, I think it's better this way anyway; those unused DirNode slots in the DirFile may be "free" for creating a new directory, but the space is not available for new files on the filesystem. (It is still allocated from the Global Bitmap to the DirFile.) So I think it's better for statfs to report that space as used, although possibly an OCFS tool (such as debugocfs) could report free DirNode slots within the DirFile(s). BTW, on my system I noticed that after being mounted by the second node there is still only one DirFile... when (if ever) do you use any of the other 31 DirFile entries in the system headers at the beginning of the Data Blocks? Would there ever be more than one DirFile? Jeremy>>> Sunil Mushran <Sunil.Mushran@oracle.com> 03/10/2004 1:33:44 PM >>>Yes, you are understanding it correctly. OCFS has a global bitmap from which space is allocated in blocksize (specified during make) chunks. It also has two other bitmaps, directory and extent, for which space is allocated from the global bitmap and then is used to allocate in smaller (or larger) chunks. The dir bitmap allocates chunks in 128K and the extent in 512 bytes. So to provide an "analy" accurate picture, one would have to read all three bitmaps. Unfortunately, statfs is a very heavily used system call. So, inorder not to kill performance, we limit ourselves to reading only the global bitmap which leads to the slight discrepancy. Sunil _______________________________________________ Ocfs-users mailing list Ocfs-users@oss.oracle.com http://oss.oracle.com/mailman/listinfo/ocfs-users <<<<...>>>>