how to find out the real size of a reflink ?
A message that is not in the archive (sent off-list or not yet received): 2040150856.105362879.1610376125778.JavaMail.zimbra@helmholtz-muenchen.de
A message that is not in the archive (sent off-list or not yet received): [email protected]
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
Quoted 13 lines · Bernd
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
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
A message that is not in the archive (sent off-list or not yet received): 1400213487.108454266.1610546335237.JavaMail.zimbra@helmholtz-muenchen.de
Hi Lentes,
see my comments inline.
Quoted 53 lines · Bernd
Quoted 18 lines · ----- On Jan 13, 2021, at 3:42 AM, Gang He [email protected] wrote:
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.77958163Quoted 2 lines
Please refer to "Shared: 2097152" item.
Hi Gang,
thanks for your information.
i did it:
ha-idg-1:/mnt/ocfs2 # o2info --filestat reflink/vm_amok.raw
File: reflink/vm_amok.raw
Size: 880469343744 Blocks: 1719666688 IO Block: 4096 regular file
Device: fe13h/65043d Inode: 583953 Links: 1
Frag%: 6.60 Clusters: 839681 Extents: 55431 Score: 7
Shared: 839681 Unwritten: 0 Holes: 0 Xattr: 0
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2021-01-12 23:18:07.920405221 +0100
Modify: 2021-01-12 22:40:07.806758460 +0100
Change: 2021-01-12 22:40:08.404660948 +0100 ha-idg-1:/mnt/ocfs2 #ha-idg-1:/mnt/ocfs2 # o2info --filestat vm_amok.raw
File: vm_amok.raw
Size: 880469343744 Blocks: 1719666688 IO Block: 4096 regular file
Device: fe13h/65043d Inode: 8257821 Links: 1
Frag%: 6.60 Clusters: 839681 Extents: 55421 Score: 7
Shared: 836667 Unwritten: 0 Holes: 0 Xattr: 0
Access: (0644/-rw-r--r--) Uid: ( 488/srvGeoClue) Gid: ( 487/ ntp)
Access: 2021-01-13 14:29:43.496432144 +0100
Modify: 2021-01-13 14:48:02.745794317 +0100
Change: 2021-01-13 14:48:02.745794317 +0100
Quoted 4 lines
Some questions:
What is a cluster ?
What is an extent ?
In the traditional file system, a file consists of meta-data blocks and data blocks, but for ocfs2 file system, a file consists of meta-data blocks and data clusters, the cluster size can greater than the block size to save meta-data block consumption.
The file data is contained by clusters, the file meta data is contained by blocks, there are few kind of meta-data blocks, e.g. extent blocks looks like to store cluster pointers.
Quoted 1 line
Shouldn't the number of the shared clusters be the same for both files ?
Yes, when a file is cloned from the original file, both files usually own the same number of shared clusters.
But one of files is written again, it's shared clusters should be reduced, since the file system have allocated some new clusters for these over-write.
Thanks
Gang
Quoted 6 lines
During runtime, the number of shared clusters for the reflink stays the same, for the original file it's reducing. Is that expected behaviour ?
Bernd
Helmholtz Zentrum München
Quoted 10 lines
Helmholtz Zentrum Muenchen
Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir.in Prof. Dr. Veronika von Messling
Geschaeftsfuehrung: Prof. Dr. med. Dr.h.c. Matthias Tschoep, Kerstin Guenther
Registergericht: Amtsgericht Muenchen HRB 6466
USt-IdNr: DE 129521671
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 9 lines · ----- On Jan 14, 2021, at 2:50 AM, Gang He [email protected] wrote:
Hi Lentes,
see my comments inline.
Quoted 5 lines
Some questions:
What is a cluster ?
What is an extent ?
Quoted 8 lines
In the traditional file system, a file consists of meta-data blocks and data blocks, but for ocfs2 file system, a file consists of meta-data blocks and data clusters, the cluster size can greater than the block size to save meta-data block consumption.
The file data is contained by clusters, the file meta data is contained by blocks, there are few kind of meta-data blocks, e.g. extent blocks looks like to store cluster pointers.
What is the size of a cluster ? 1MB ?
And what is an extent ?
Thanks.
Bernd
Helmholtz Zentrum München
Helmholtz Zentrum Muenchen
Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir.in Prof. Dr. Veronika von Messling
Geschaeftsfuehrung: Prof. Dr. med. Dr. h.c. Matthias Tschoep, Kerstin Guenther
Registergericht: Amtsgericht Muenchen HRB 6466
USt-IdNr: DE 129521671
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
From man mkfs.ocfs2:
-C, --cluster-size cluster-size
Valid cluster size values are 4K, 8K, 16K, 32K, 64K, 128K, 256K, 512K and 1M. If omitted, a value will be heuristically determined based on the expected usage of the file system (see the -T option). For volumes expected to store large files, like database files, while a cluster size of 128K or more is recommended, one can opt for a smaller size as long as that value is not smaller than the database block size. For others, use 4K.
An extent is a series of blocks in a file. When a file grows, its last extent is grown if there are free blocks on disk following the extent, or a new extent is added using free blocks from someplace else on the disk. The filefrag -v command will list all extents of a file, and whether they’re shared with other files or not.
Thanks,
Herbert.
Quoted 43 lines · Bernd
Quoted 9 lines · ----- On Jan 14, 2021, at 2:50 AM, Gang He [email protected] wrote:
Hi Lentes,
see my comments inline.
Quoted 5 lines
Some questions:
What is a cluster ?
What is an extent ?Quoted 8 lines
In the traditional file system, a file consists of meta-data blocks and data blocks, but for ocfs2 file system, a file consists of meta-data blocks and data clusters, the cluster size can greater than the block size to save meta-data block consumption.
The file data is contained by clusters, the file meta data is contained by blocks, there are few kind of meta-data blocks, e.g. extent blocks looks like to store cluster pointers.What is the size of a cluster ? 1MB ?
And what is an extent ?Thanks.
Bernd
Helmholtz Zentrum MünchenHelmholtz Zentrum Muenchen
Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir.in Prof. Dr. Veronika von Messling
Geschaeftsfuehrung: Prof. Dr. med. Dr.h.c. Matthias Tschoep, Kerstin Guenther
Registergericht: Amtsgericht Muenchen HRB 6466
USt-IdNr: DE 129521671
Quoted 4 lines
_______________________________________________
Ocfs2-users mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-users
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 10 lines · ----- On Jan 14, 2021, at 6:52 PM, herbert van den bergh…
From man mkfs.ocfs2:
-C, --cluster-size cluster-size
Valid cluster size values are 4K, 8K, 16K, 32K, 64K, 128K, 256K, 512K and 1M. If omitted, a value will be heuristically determined based on the expected usage of the file system (see the -T option). For volumes expected to store large files, like database files, while a cluster size of 128K or more is recommended, one can opt for a smaller size as long as that value is not smaller than the database block size. For others, use 4K.
Quoted 6 lines
An extent is a series of blocks in a file. When a file grows, its last extent is grown if there are free blocks on disk following the extent, or a new extent is added using free blocks from someplace else on the disk. The filefrag -v command will list all extents of a file, and whether they’re shared with other files or not.
Thanks.
Bernd
Helmholtz Zentrum München
Helmholtz Zentrum Muenchen
Deutsches Forschungszentrum fuer Gesundheit und Umwelt (GmbH) Ingolstaedter Landstr. 1
85764 Neuherberg
www.helmholtz-muenchen.de
Aufsichtsratsvorsitzende: MinDir.in Prof. Dr. Veronika von Messling
Geschaeftsfuehrung: Prof. Dr. med. Dr. h.c. Matthias Tschoep, Kerstin Guenther
Registergericht: Amtsgericht Muenchen HRB 6466
USt-IdNr: DE 129521671
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel