| Summary: | Creating/Deleting sparse files messes with available space | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Joe Julian <joe> |
| Component: | replicate | Assignee: | Pranith Kumar K <pkarampu> |
| Status: | CLOSED WORKSFORME | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.1.2 | CC: | gluster-bugs, vijay |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | --- | Mount Type: | fuse |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Joe Julian
2011-02-15 23:30:12 UTC
(In reply to comment #0) > When creating and deleting a sparse file, the available space is not allocated > and released consistently. > > 1. Create a replicated volume (gluster volume create test1 replica 2 > server1:/var/spool/gluster/disk1 server2:/var/spool/gluster/disk1) > 2. mount the replicated volume (mount -t glusterfs server1:test1 /mnt/test1) > 2. df # note the available space (in my test it is 2498816) > 3. dd if=/dev/zero of=/mnt/test1/testfile1 bs=1 count=1 seek=1M # create a > sparse file > 4. df # the available space has decreased by 1M (2498688) > 5. rm /mnt/test1/testfile1 > 6. df # the available space has not increased (2498688) > > This behavior is not reproducible in 3.0.7. This is working fine for me with the *master* branch. pranith @ /mnt/client 11:18:17 :) $ df /mnt/client Filesystem 1K-blocks Used Available Use% Mounted on pranith-laptop:/vol 96178944 5011456 86281856 6% /mnt/client pranith @ /mnt/client 11:18:28 :) $ sudo dd if=/dev/zero of=testfile1 bs=1 count=1 seek=1M 1+0 records in 1+0 records out 1 byte (1 B) copied, 0.00327276 s, 0.3 kB/s pranith @ /mnt/client 11:18:51 :) $ df /mnt/client Filesystem 1K-blocks Used Available Use% Mounted on pranith-laptop:/vol 96178944 5011456 86281856 6% /mnt/client pranith @ /mnt/client 11:18:53 :) $ df /mnt/client Filesystem 1K-blocks Used Available Use% Mounted on pranith-laptop:/vol 96178944 5011456 86281728 6% /mnt/client pranith @ /mnt/client 11:20:43 :) $ sudo rm -f testfile1 pranith @ /mnt/client 11:20:50 :) $ df /mnt/client Filesystem 1K-blocks Used Available Use% Mounted on pranith-laptop:/vol 96178944 5011456 86281856 6% /mnt/client pranith @ /mnt/client 11:21:33 :) $ sudo gluster volume info Volume Name: vol Type: Replicate Status: Started Number of Bricks: 2 Transport-type: tcp Bricks: Brick1: pranith-laptop:/tmp/1 Brick2: pranith-laptop:/tmp/2 hi, It is working as expected for me. Please re-open the bug if it is observed again. It is better to use "df -B 1 <mount-path>" instead of just df to avoid rounding to nearest block size. Pranith. |