Hide Forgot
Created 80MB file with chunk size 100MB. stripe_mntpt# stat 80MB.txt File: `80MB.txt' Size: 81920000 Blocks: 160032 IO Block: 131072 regular file Device: 15h/21d Inode: 2884543 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2010-02-24 12:55:40.000000000 +0530 Modify: 2010-02-24 12:55:43.000000000 +0530 Change: 2010-02-24 12:55:43.000000000 +0530 Check it's size in backend export1]$ stat 80MB.txt File: `80MB.txt' Size: 81920000 Blocks: 160008 IO Block: 4096 regular file Device: fd00h/64768d Inode: 2884543 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2010-02-24 12:55:40.000114794 +0530 Modify: 2010-02-24 12:55:43.665112524 +0530 Change: 2010-02-24 12:55:43.665112524 +0530 export2]$ stat 80MB.txt File: `80MB.txt' Size: 0 Blocks: 8 IO Block: 4096 regular empty file Device: fd00h/64768d Inode: 2884541 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2010-02-24 12:55:39.999117041 +0530 Modify: 2010-02-24 12:55:39.999117041 +0530 Change: 2010-02-24 12:55:40.056115350 +0530 export3]$ stat 80MB.txt File: `80MB.txt' Size: 0 Blocks: 8 IO Block: 4096 regular empty file Device: fd00h/64768d Inode: 2884542 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2010-02-24 12:55:39.999117041 +0530 Modify: 2010-02-24 12:55:39.999117041 +0530 Change: 2010-02-24 12:55:40.055118365 +0530 Now decrease the file size by half. stripe_mntpt# truncate -s 40MB 80MB.txt Then check backend dirs. export1]$ stat 80MB.txt File: `80MB.txt' Size: 40000000 Blocks: 78136 IO Block: 4096 regular file Device: fd00h/64768d Inode: 2884543 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2010-02-24 12:55:40.000114794 +0530 Modify: 2010-02-24 12:57:10.195369416 +0530 Change: 2010-02-24 12:57:10.195369416 +0530 export1 is okay. export2$stat 80MB.txt File: `80MB.txt' Size: 40000000 Blocks: 8 IO Block: 4096 regular file Device: fd00h/64768d Inode: 2884541 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2010-02-24 12:55:39.999117041 +0530 Modify: 2010-02-24 12:57:10.195369416 +0530 Change: 2010-02-24 12:57:10.195369416 +0530 export3$ stat 80MB.txt File: `80MB.txt' Size: 40000000 Blocks: 8 IO Block: 4096 regular file Device: fd00h/64768d Inode: 2884542 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2010-02-24 12:55:39.999117041 +0530 Modify: 2010-02-24 12:57:10.198361347 +0530 Change: 2010-02-24 12:57:10.198361347 +0530 export2 , export3 file size has increased.
This behavior is expected. Please notice the 'blocks' field in the stat info you have provided, and it clearly shows that even though sizeof the file is increased, it will be not consuming any more space in backend disk. Also this behavior doesn't effect any operations over stripe translator. Also, user need not bother about the backend layout of the file while using GlusterFS. As this is not a bug, but is a valid behavior of stripe, marking it as Invalid. Regards, Amar