OCFS2 showing "No space left on device" on a device with free space
This document (7008696) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 11
Situation
dd: writing `filename.iso': No space left on device
1+0 records in
0+0 records out
2064384 bytes (2.1 MB) copied, 2.37237 seconds, 870 kB/s
Resolution
# tunefs.ocfs2 --fs-features=discontig-bg /dev/sdc1
In case the solution described here above is not applicable, an alternative possible solution which might be helpful is to recreate the file system with a higher data cluster size directive [i.e.: 64K (16 bits) or bigger, see man page for mkfs.ocfs2]. There is no way to change a block size to another value without recreating the file system.
The following command will show the Cluster Size value of the file system:
# debugfs.ocfs2 -n -R "stats" /dev/sdc1 | grep -i "Cluster Size"
Block Size Bits: 12 Cluster Size Bits: 12
You could format it with a 64Kb block size as follows:
# mkfs.ocfs2 -C 64K /dev/sdc1 -F
Another help which may be worth to try to mitigate the issue, is about freeing contiguous space decreasing the number of node-slots (maximum number of nodes that can concurrently mount the partition) when possible. This space is always consumed by the journals for those slots, even if the nodes is not actually used.
In this way it is not necessary to recreate the file system. However, this is possible only if there are node-slots which are not actually needed.
For example, to know the current number of node-slots:
# debugfs.ocfs2 -n -R "stats" /dev/sdc1 | grep -i "Max Node Slots"
p, li { white-space: pre-wrap; }
Max Node Slots: 8
To change it:
# tunefs.ocfs2 -N 3 /dev/sdc1
Cause
Additional Information
4Kb block size is a good recommendation for a large number of small files. If 4kb block size is used for large files it uses a lot a extent_alloc blocks and soon they run low. In conjunction with fragmentation, the filesystem may run out of a contiguous block to alloc for extent_alloc blocks leading to "out of space" errors. This is an OCFS2 limitation, and the problem happens only when creating large files on file system with small Cluster Size.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7008696
- Creation Date: 02-Jun-2011
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com