SQLite Forum

[solved] disk I/O error on F2FS
Hi, I'm looking for help with a problem (obviously)

sqlite Databases on my /home are basically unusable because they always fail with I/O error. Even a fresh database will only work for the first command, once it's been created on the disk it'll be unusable.

Example ```
$ sqlite3 new.db
SQLite version 3.36.0 2021-06-18 18:36:39
Enter ".help" for usage hints.
sqlite> CREATE TABLE ex1 (a INTEGER);
sqlite> CREATE TABLE ex2 (a INTEGER);
Error: disk I/O error
sqlite> CREATE TABLE ex3 (a INTEGER);
Error: disk I/O error

The same commands work on other disks. I have some on ext4, tmpfs and some on f2fs.

The one that crashes has lots of options in fstab, I don't remember where I got these from:

`UUID=... /home f2fs rw,relatime,lazytime,background_gc=on,discard,no_heap,inline_xattr,inline_data,inline_dentry,flush_merge,extent_cache,mode=adaptive,active_logs=6,alloc_mode=default,fsync_mode=posix 0 0`

The other f2fs disk that does work has default options:

`UUID=... /other f2fs defaults,noatime 0 1`

So one of the mount options on /home breaks sqlite I think.

My OS is arch linux so I can't really track when I installed what version of sqlite but I did notice some weird behavior during the last weeks (firefox addons broken, discord autologin broken) that might be related. Thanks to Lutris for actually showing me an error message. That means I can't say what version introduced the problem but I think it's 3.36 because 3.35 is months older.

Additional info: Kernel 5.13.14-xanmod1 (right now)

Final question: is this a problem that can be fixed in sqlite or are my mount options just wrong?