XFS syncs
Hi,
I issue 'mkdir abc' on my xfs partition the cut off the power. After reboot there's no 'abc' directoy. However, when I do that on ext4 the 'abc' direcory is always created after reboots. All the settings, about mount options are default for my distro. What am I missing or how do I change the things of the jounral or whatever?
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 7 lines · On 7/3/2014 1:05 PM, [email protected] wrote:
Hi,
I issue 'mkdir abc' on my xfs partition the cut off the power. After reboot there's no 'abc' directoy. However, when I do that on ext4 the 'abc' direcory is always created after reboots. All the settings, about mount options are default for my distro. What am I missing or how do I change the things of the jounral or whatever?
So, you want XFS to behave like EXT4, is this correct? Do you have an actual workload where you need to cut power immediately after issuing commands, as described above?
Cheers,
Stan
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 4 lines · On Thu, Jul 03, 2014 at 10:05:53PM +0400, [email protected] wrote:
Hi,
I issue 'mkdir abc' on my xfs partition the cut off the power. After reboot there's no 'abc' directoy.
Because you didn't sync(1) the filesystem or fsync(2) the directory before you cut the power. Hence the change never hit the disk.
Quoted 2 lines
However, when I do that on ext4
the 'abc' direcory is always created after reboots.
That'll be pure fluke - ext4 delays journal writes on namespace operations just like XFS does.
Quoted 3 lines
All the
settings, about mount options are default for my distro. What am I missing or how do I change the things of the jounral or whatever?
If you want directory operations to hitthe disk immediately, then mount with the "-o wsync" option. Be aware, however, that this will kill performance unless you have expensive storage with a large amount of battery backed write cache in front of the disks. There's a good chance it will also cause excessive wear on SSDs due to the frequent journal writes.
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Hello Dave,
Thanks for the explanation and your suggestion to use wsync option.
Quoted 26 lines · Dave Chinner
Quoted 4 lines · On Thu, Jul 03, 2014 at 10:05:53PM +0400, [email protected] wrote:
Hi,
I issue 'mkdir abc' on my xfs partition the cut off the power. After reboot there's no 'abc' directoy.
Because you didn't sync(1) the filesystem or fsync(2) the directory before you cut the power. Hence the change never hit the disk.
Quoted 2 lines
However, when I do that on ext4
the 'abc' direcory is always created after reboots.That'll be pure fluke - ext4 delays journal writes on namespace operations just like XFS does.
Quoted 3 lines
All the
settings, about mount options are default for my distro. What am I missing or how do I change the things of the jounral or whatever?If you want directory operations to hitthe disk immediately, then mount with the "-o wsync" option. Be aware, however, that this will kill performance unless you have expensive storage with a large amount of battery backed write cache in front of the disks. There's a good chance it will also cause excessive wear on SSDs due to the frequent journal writes.
Quoted 4 lines
Cheers,
Dave.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs