[OpenAFS-devel] odd problem with fileserver on irix 6.5
chas williams
chas@cmf.nrl.navy.mil
Sun, 2 Sep 2001 13:41:11 -0400
has anyone else seen this? if you fill up a server partition to 100% (or
as near as you can make it) and restart the fileserver it will complain that
you need to remake your filesystems with size=512. apparently, the check
to see if partitions have appropriately sized inodes tries to call attr_set()
on the mount point. however, attr_set() fails with ENOSPC on very full
partitions. the man page doesnt mention this as one of the possible failures.
i would suggest changing VerifyXFSInodeSize(), to something like the attached
using syssgi(SGI_XFS_FSOPERATIONS,...). i didnt have time to rebuild the
source with this patch and try it out on my system. i just deleted
someone's file to get enough space for the fileserver to 'recognize' the
partition. i think to think of it as a sacrifice to the gods of afs.
--- partition.c.orig Sun Sep 2 08:40:34 2001
+++ partition.c Sun Sep 2 08:45:08 2001
@@ -150,20 +150,17 @@
#include <afs/xfsattrs.h>
static int VerifyXFSInodeSize(char *part, char *fstype)
{
- afs_xfs_attr_t junk;
- int length = SIZEOF_XFS_ATTR_T;
int fd = 0;
int code = -1;
- struct fsxattr fsx;
+ xfs_fsop_geom_t geom;
if (strcmp("xfs", fstype))
return 0;
- if (attr_set(part, AFS_XFS_ATTR, &junk, length, ATTR_ROOT) == 0) {
- if (((fd=open(part, O_RDONLY, 0)) != -1)
- && (fcntl(fd, F_FSGETXATTRA, &fsx) == 0)) {
+ if (((fd=open(part, O_RDONLY, 0)) != -1) {
+ && (syssgi(SGI_XFS_FSOPERATIONS, fd, XFS_FS_GEOMETRY, NULL, &geom) == 0)) {
- if (fsx.fsx_nextents) {
+ if (geom.inodesize < 512) {
Log("Partition %s: XFS inodes too small, exiting.\n", part);
Log("Run xfs_size_check utility and remake partitions.\n");
}
@@ -173,7 +170,6 @@
if (fd > 0)
close(fd);
- (void) attr_remove(part, AFS_XFS_ATTR, ATTR_ROOT);
}
return code;
}