[Ocfs2-users] how to find out the real size of a reflink ?

Gang He GHe at suse.com
Tue Jan 12 19:01:40 PST 2021


Hi Lentes,

you can use "o2info --filestat yourfile" to identify how many data
clusters for a cloned file are shared with the original file.
Of course, the cloned file does not share meta-data blocks with the
original file, only shares the data clusters.
e.g.
ghe-nd1:/rear/test # o2info --filestat dd.1.ref
   File: dd.1.ref
   Size: 8589934592      Blocks: 16777216   IO Block: 4096   regular file
Device: fe00h/65024d    Inode: 355844      Links: 1
  Frag%: 0.01            Clusters: 2097152  Extents: 157    Score: 2
Shared: 2097152         Unwritten: 0       Holes: 0        Xattr: 0
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2021-01-13 10:08:06.561968304 +0800
Modify: 2021-01-13 10:07:52.74642661
Change: 2021-01-13 10:07:52.77958163

Please refer to "Shared: 2097152" item.

Thanks
Gang

On 2021/1/11 22:42, Lentes, Bernd wrote:
> Hi guys,
>
> is there a way to find out the real size of a reflink ?
> "ls -s" doesn't seem to help.
> And shared-du or shared-filefrag does not seem to be available for my SLES 12 SP5.
> I know that i can calculate using df -h, but that's not convenient.
>
> Thanks.
>
> Bernd
>
>
>




More information about the Ocfs2-users mailing list