File too large during initial user sync from ActiveDirectory Userstore

jorgw

Member
Jul 18, 2020
10
1
23
56
Hello,

Seems that without filter our large Active Directory is too large with its many thousands of just user objects and the perl module fails as follows:

----------------
added user 'zzznvaquota@fakedomainname.COM'
added user 'zzznvasoc@fakedomainname.COM'
Warning: unable to close filehandle GEN2323 properly: File too large at /usr/share/perl5/PVE/Tools.pm line 241.
TASK ERROR: syncing users failed: error during cfs-locked 'file-user_cfg' operation: unable to write '/etc/pve/user.cfg.tmp.26683' - File too large:
---------------


Any tricks to solve that? (yes, the disk is big enough)


======================

PS: In case you are wondering, here is line 241 of this mentioned Tools.pm file:

}
die "unable to open file '$tmpname' - $!\n" if !$fh;
die "unable to write '$tmpname' - $!\n" unless print $fh $data;
die "closing file '$tmpname' failed - $!\n" unless close $fh;
};
 
Hi,

the pmxcfs can only write files that are smaller than 512KB, so if your user list is too large it will fail.