juicedata/juicefs · error
create table acl: %s
Error message
create table acl: %s
What it means
syncAllTables (pkg/meta/sql.go:603) creates/auto-migrates the `acl` table via xorm Sync2; failure is wrapped as "create table acl: %s". The acl table stores POSIX ACL entries for files/directories. Failure aborts metadata engine initialization; since it is late in the sequence, earlier tables already exist and only the acl DDL failed.
Source
Thrown at pkg/meta/sql.go:604
return fmt.Errorf("create table node, symlink, xattr: %s", err)
}
if err := m.syncTable(new(chunk), new(sliceRef), new(delslices)); err != nil {
return fmt.Errorf("create table chunk, chunk_ref, delslices: %s", err)
}
if err := m.syncTable(new(session2), new(sustained), new(delfile)); err != nil {
return fmt.Errorf("create table session2, sustaind, delfile: %s", err)
}
if err := m.syncTable(new(flock), new(plock), new(dirQuota), new(userGroupQuota)); err != nil {
return fmt.Errorf("create table flock, plock, dirQuota, userGroupQuota: %s", err)
}
if err := m.syncTable(new(dirStats)); err != nil {
return fmt.Errorf("create table dirStats: %s", err)
}
if err := m.syncTable(new(detachedNode)); err != nil {
return fmt.Errorf("create table detachedNode: %s", err)
}
if err := m.syncTable(new(acl)); err != nil {
return fmt.Errorf("create table acl: %s", err)
}
if err := m.syncTable(new(delegationToken)); err != nil {
return fmt.Errorf("create table delegationToken: %s", err)
}
if err := m.syncTable(new(changeLog)); err != nil {
return fmt.Errorf("create table changeLog: %s", err)
}
return nil
}
func (m *dbMeta) doInit(format *Format, force bool) error {
if err := m.syncAllTables(); err != nil {
return err
}
var s = setting{Name: "format"}
var ok bool
err := m.simpleTxn(Background(), func(ses *xorm.Session) (err error) {
ok, err = ses.Get(&s)View on GitHub (pinned to c9a67b23e8)
Solutions
- Inspect the wrapped driver error for the exact DB-side reason and address it.
- Grant the DB user CREATE/ALTER rights so the new acl table can be added to existing volumes.
- Free DB storage or raise quota if the schema hit limits during init.
- After backup, drop an incompatible pre-existing acl table and re-run init.
- Re-run the command; Sync2 is idempotent and will only create the missing acl table.
Defensive patterns
Strategy: validation
Validate before calling
// Preflight before enabling ACL on existing volumes: // SHOW GRANTS FOR CURRENT_USER(); -- CREATE needed to add the acl table // MySQL: SHOW TABLES LIKE 'jfs_acl'; -- if present from another tool, compare schema first
Try / catch
if err := initMeta(); err != nil {
if strings.Contains(err.Error(), "create table acl") {
return fmt.Errorf("acl table DDL failed; grant CREATE/ALTER or resolve conflicting table: %w", err)
}
return err
} Prevention
- Grant CREATE/ALTER before the first mount after enabling ACL-related features.
- Never let unrelated tools create tables with the same (prefixed) names in the JuiceFS schema.
- Dump metadata (juicefs dump) before upgrades so a failed acl migration can be recovered from.
- Ensure late-init resource exhaustion is unlikely: keep DB disk usage below capacity.
When it happens
Trigger: Metadata engine initialization when Sync2 on the acl bean fails: privileges, storage exhaustion reached late in init, connection drop, or an existing acl table with incompatible columns (e.g. created by a different tool).
Common situations: ACL support enabled in newer JuiceFS versions requires creating this table on legacy volumes whose DB user has since been downgraded; schema table-count limits; collation/charset conflicts on existing acl tables.
Related errors
- create table setting, counter: %s
- create table edge: %s
- create table node, symlink, xattr: %s
- create table chunk, chunk_ref, delslices: %s
- create table session2, sustaind, delfile: %s
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/c809946b7b248713.
Report an issue: GitHub.