Seafile won't start. Not enough space

I gave the VM Seafile runs on 2 terabytes of storage so I should not be out of storage space. I see /dev/mapper/cl_seafile-root is 100% full though. Why did this happen and what can I do to fix it?

Thanks in advance for any help provided. Always greatly appreciated.

Jeff Savage ~ BetaLeaf

###Specs:
CentOS 7 Minimal
Seafile Server Pro 6.0.4

###Logs:

####Seafile.log

[12/20/2016 02:10:13 AM] ../common/obj-backend-fs.c(240): [obj backend] Failed to open tmp file /opt/seafile/seafile-data/storage/commits/9b338dd3-59f3-4c83-be4b-bba0a3aedd19/3b/6a5aab41ed7c71e0546cdffea8c0968a893e4e.HZKGSY: No space left on device.
[12/20/2016 02:10:13 AM] ../common/obj-backend-fs.c(322): [obj backend] Failed to write obj 9b338dd3-59f3-4c83-be4b-bba0a3aedd19:3b6a5aab41ed7c71e0546cdffea8c0968a893e4e.
[12/20/2016 02:10:24 AM] ../common/seaf-db.c(656): Error exec prep stmt: mysql_stmt_execute failed: Can't create/write to file '/var/tmp/#sql_92b_0.MAI' (Errcode: 28).
[12/20/2016 02:10:24 AM] ../common/seaf-db.c(656): Error exec prep stmt: mysql_stmt_execute failed: Can't create/write to file '/var/tmp/#sql_92b_0.MAI' (Errcode: 28).
[12/20/2016 02:10:24 AM] ../common/seaf-db.c(656): Error exec prep stmt: mysql_stmt_execute failed: Can't create/write to file '/var/tmp/#sql_92b_0.MAI' (Errcode: 28).
[12/20/2016 02:10:44 AM] ../common/seaf-db.c(656): Error exec prep stmt: mysql_stmt_execute failed: Can't create/write to file '/var/tmp/#sql_92b_0.MAI' (Errcode: 28).
[12/20/2016 02:10:44 AM] ../common/seaf-db.c(656): Error exec prep stmt: mysql_stmt_execute failed: Can't create/write to file '/var/tmp/#sql_92b_0.MAI' (Errcode: 28).
[12/20/2016 02:10:44 AM] ../common/seaf-db.c(656): Error exec prep stmt: mysql_stmt_execute failed: Can't create/write to file '/var/tmp/#sql_92b_0.MAI' (Errcode: 28).

####df


####seafile.sh restart

Looks like your mysql server has a problem because of the little storage left on the device. First of all: Did you get some free space?

I’m not sure what you mean. Please explain further.

When I first made the virtual machine, I gave it 2 terabytes of storage space on a single disk. it has not been expanded or otherwise modified.

The df ouptput shows that your disk is full. You have to get free space again.

This thread gives you many hints.

btw. check your “df” command your root filesystem is full and “tmp” is a part of it.

P.S. : All your 2TB are assigned to “home” - I do not want to explain the the Linux filesystem in detail, but I would recommend you to assign all the space to “/” (root - not the root user) - that not a perfect solution but for you it would be the easiest way to solve your problem. Do not create separate partitions for “/boot” or “/home” - maybe you have to chose manual partitioning when you install Centos.

Ok I will do some research and get back with you. Hopefully I will be able to resolve the issue without additional help. Thank you very much.

Ok so here’s what I did.

umounted /dev/cl_seafile/home
lvremove /dev/cl_seafile/home
lvextend -r /dev/mapper/cl_seafile-root -l 510719

510719 was the highest number I could use. Now my df -h reads

My question is did I do this correctly? It looks ok based off of the very little linux I know (I’m a windows kind of guy) but I thought I would check with the experts. Looking forward to hearing back from you.

Hi,
I am not linux guru but you can do it like this…(maybe this is not the best way to do it :slight_smile:)
df –h (show me filestructure)
Root is full. We want to increase root
http://xmodulo.com/manage-lvm-volumes-centos-rhel-7-system-storage-manager.html
Switch off the machine (or VM) (optional)
add new hdd (e.g. new vdi or scsi …) (Add e.g. 3 TB)
restart VM
If we now enter the following in the console should the new HDD be visible.
ls /dev/sd*
New is sdb
Then install the System Storage Manager console
sudo yum install system-storage-manager
After that, check LV volume, standard in CentOS 7 installation uses LVM and XFS filesystem as default.
sudo ssm list
sudo ssm add -p centos /dev/sdb
(ADD disk to LVM Pool)
Increase by 50 GB (This can also be done several times!
sudo ssm resize -s+50GB /dev/centos/root
Check
You can add also more e.g. (if you added a 3TB Disk)
sudo ssm resize -s+2800GB /dev/centos/root
sudo ssm list volumes
For FS Size really get free you will enter the following.
http://ask.xmodulo.com/expand-xfs-file-system.html
sudo xfs_growfs /dev/centos/root
Check with
sudo ssm list volumes
df -h

I’ve done something horribly wrong. What I posted last caused my system to boot in emergency mode.

Yes, because you removed the home folder/LVM. Then extended the space on the root LVM but the home folder still is not there. You deleted all data of /home. Linux saves all user data in the home folder. I can imagine that without this home folder your system does not boot correctly. You should post this on a CentOS Forum, they can help you.

Generally you should always have a backup of your data before doing such things. I hope this is the case?

@BetaLeaf I am afraid this is not the right place to explain you in detail how to install a linux system.
There are many linux distributions you can choose from, I would recommend you to start with Ubuntu (as you did before), because it is a very popular system and it got a big community, where you can get help. If you do not know what LVM is (don’t use it if you do not understand it, because it makes thinks more complicated! - believe me, you do not need it for your kind of VM installation, keep things simple as possible for the beginning!), you should take some time to become familiar with the basic principle of linux.

1 Like

Alright. I gave up the vm and just started fresh. I made sure my partitions were properly sized. I gave /home 10 gb. Wasn’t sure how much I should give it but I didn’t see myself or another software writing data to it. I gave / the rest.

sounds like its running properly now. I guess you already know: if you have installed seafile by using the default paths (by following the documentation), your files might be stored all into the /home folder. that means you might reach your seafile storage maximum at ~10gb. of course your partition(s) can be resized to overcome that limitation.

I use the installer script found at https://github.com/haiwen/seafile-server-installer/ which uses a default data dir of /opt/seafile/seafile-data/ and yes I got it working.

thanks a lot for sharing this hint. then you re surely not running into any storage problems;) I ve had to use https://manual.seafile.com/deploy/ since my apache multi configuration etc is more complex. interesting that the deployment dirs are different: /opt/seafile vs. /home/(user/)seafile. not a problem; just important to mention if some beginner doesnt know how to start… can be installed under theoretically any directory.