"ERROR: V-3-22626: <filename> file allocation error - Invalid argument" appears when resizing Quick I/O (QIO) files using "qiomkfile -e"
book
Article ID: 100033390
calendar_today
Updated On:
Description
Error Message
V-3-22626: file allocation error - Invalid argumentIn the example below,
qiomkfile -e can successfully extend an existing QIO file ("datafile") but fails with its duplicate ("datacopy") created by an OS-level copy:
# qiomkfile -s 10m datafile
# cp .datafile .datacopy ; ln -s .datacopy::cdev:vxfs: datacopy
# ls -lai
---SNIP---
7 -rw-r--r-- 1 root root 10485760 Nov 21 01:03 .datacopy
4 -rw-r--r-- 1 root root 10485760 Nov 21 01:02 .datafile
8 lrwxrwxrwx 1 root root 21 Nov 21 01:03 datacopy -> .datacopy::cdev:vxfs:
6 lrwxrwxrwx 1 root root 21 Nov 21 01:02 datafile -> .datafile::cdev:vxfs:
# qiomkfile -e 1m datafile
( no output; file is successfully resized )
# qiomkfile -e 1m datacopy
UX:vxfs qiomkfile: ERROR: V-3-22626: 'datacopy' file allocation error - Invalid argument
Cause
In VxFS (Veritas File System) version 6.0, the behavior of qiomkfile regarding file extensions was changed such that the target file size would be calculated by adding the specified parameter to the reserved block count in the file's inode, rather than the total number of blocks allocated. This was in order to address an edge case in which a resize operation could fail when the file size was very close to 2 GB (the "largefiles" boundary).
In case the reserved block count has been reset to zero for any reason (one example being a manual copy operation using an OS command that does not transfer VxFS-specific inode attributes), the calculated target file size will be smaller than the current file size, unless the specified happens to be larger than the current file size, and thus be rejected as an invalid value.
Resolution
Code changes have been made so that qiomkfile can calculate the correct target file size even if the reserved block count is set to zero. In such cases, the total number of allocated blocks will be used instead.
The fix will be included in all future releases of Veritas File System. Please contact Veritas Support if a hot fix patch for a previous version of VxFS is required.
As a workaround, qiomkfile -r can be used instead for extending Quick I/O files that have been manually copied, or restored, from backup. Once a file is successfully extended using qiomkfile -r, its reserved block count will have been reset to a correct (non-zero) value, subsequently allowing qiomkfile -e to start working again, without encountering the same error.
Issue/Introduction
On systems running Veritas File System (VxFS) 6.0, or later, attempts to resize (extend) Quick I/O (QIO) files using qiomkfile -e <growby> after they have been restored from backup (or manually copied using OS-level commands/utilities) fail.
Additional Information
ETrack: 3904794
Was this article helpful?
thumb_up
Yes
thumb_down
No