root and home full? (HDA stopped)

schox
Posts: 23
Joined: Thu Jan 26, 2012 1:17 pm

root and home full? (HDA stopped)

Postby schox » Tue Jul 31, 2012 11:39 am

Hi

I´ve got a problem - I think the root and home partitions are full, and my server has stopped working...

What I´ve got is a system with 3 disks - one disk is root and home - and 2 are used for shares (grehole and timecapsule).
Transmission is running on system, and started complaing about "no space left on device" during a download (all torrents stopped eventually) - http://hda/ suddenly gave me "Ruby on rails errormessage" and Greyhole and Squeezebox server stopped.

df -h outputs this:

Code: Select all

[root@motherf me]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_motherf-lv_root 50G 47G 0 100% / tmpfs 1000M 0 1000M 0% /dev/shm /dev/sda1 485M 30M 430M 7% /boot /dev/mapper/vg_motherf-lv_home 20G 19G 56M 100% /home /dev/sdb1 1.8T 410G 1.4T 24% /var/hda/files/drives/drive1 /dev/sdc1 1.8T 430G 1.3T 25% /var/hda/files/drives/drive2
The greyhole.log say:

Code: Select all

[root@motherf me]# tail -f /var/log/greyhole.log Jul 31 19:51:05 7 read_smb_spool: Processing Samba spool... Jul 31 19:51:05 7 simplify_tasks: Simplifying pending tasks. Jul 31 19:51:05 7 sleep: Nothing to do... Sleeping. Jul 31 19:51:15 7 sleep: Nothing to do... Sleeping. Jul 31 19:51:25 7 read_smb_spool: Processing Samba spool... Jul 31 19:51:25 7 sleep: Nothing to do... Sleeping. Jul 31 19:51:35 7 sleep: Nothing to do... Sleeping. Jul 31 19:51:45 7 sleep: Nothing to do... Sleeping. Jul 31 19:51:55 7 sleep: Nothing to do... Sleeping. Jul 31 19:57:31 2 sleep: Can't repair settings table: Lost connection to MySQL server during query
mysqld.log

Code: Select all

[root@motherf me]# tail -f /var/log/mysqld.log 120731 19:58:41 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.1.60' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution 120731 20:03:47 [ERROR] /usr/libexec/mysqld: Disk is full writing './greyhole/tasks_completed.TMD' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space) 120731 20:03:47 [ERROR] /usr/libexec/mysqld: Retry in 60 secs. Message reprinted in 600 secs 120731 20:13:47 [ERROR] /usr/libexec/mysqld: Retry in 60 secs. Message reprinted in 600 secs 120731 20:18:53 [ERROR] /usr/libexec/mysqld: Disk is full writing './greyhole/settings.TMD' (Errcode: 28). Waiting for someone to free space... (Expect up to 60 secs delay for server to continue after freeing disk space) 120731 20:18:53 [ERROR] /usr/libexec/mysqld: Retry in 60 secs. Message reprinted in 600 secs 120731 20:23:47 [ERROR] /usr/libexec/mysqld: Retry in 60 secs. Message reprinted in 600 secs 120731 20:28:53 [ERROR] /usr/libexec/mysqld: Retry in 60 secs. Message reprinted in 600 secs 120731 20:33:47 [ERROR] /usr/libexec/mysqld: Retry in 60 secs. Message reprinted in 600 secs
Last config change was today when I uninstalled "PS3mediaserver" via hda setup GUI

soooo... what do I do to correct this, and stop it from happening again?


Thomas

schox
Posts: 23
Joined: Thu Jan 26, 2012 1:17 pm

Re: root and home full? (HDA stopped)

Postby schox » Tue Jul 31, 2012 3:37 pm

I got the system up and running again (deleting temp files, mlocate.db and spotify cashe) - but this is not a solution.

Root is still almost full (6% free) and /home is also full (5%)

Transmission is writing to a share ( Torrents /var/hda/files/torrents ) but it it is not using Samba to do so(?), as I understand this may cause trouble for Greyhole.

Might this be the "root" cause of the problems?

Any other things I might do to free up home and root?

The system is headless - but I had to install full workstation fedora to be able to run the Amahi installer - Can i do anything to prevent "X" from starting at reboot - and then un-install gnome and X?

schox
Posts: 23
Joined: Thu Jan 26, 2012 1:17 pm

Re: root and home full? (HDA stopped)

Postby schox » Wed Aug 01, 2012 2:21 am

To continue this monologe.

"Transmission" is to blame for the problems with full root partition.
Transmission writes to /var/hda/files/torrents - this is a Greyhole share - but transmission put/get all files directly here.

I tryed to move the landing zone of this share - and this solved the real problems with my HDA - but this stopped transmission from working (it stil try to download to "/var/hda/files/torrents" (even after I set download dir in Transmission GUI to /var/hda/files/drives/drive1/torrents)
Is there a way to have transmission use the storage pool?
Can I mount /var/hda/files/torrents via samba to the "new" "greyholed" sambashare witch directs it to "/var/hda/files/drives/drive1/torrents" - How?

I suspect this will have a impact on transmission performance - but rather slow and safe than crash and burn ;)

I got Amahi because it seemd like a n00b friendly enviroment - Greyhole was the killer feature, and with support for Transmission and Squeezebox it seemd ideal. tonight I wished I had bought a ReadyNas :) (after sleeping some hours I'm back to Amahi is still the best alternative :) )

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: root and home full? (HDA stopped)

Postby bigfoot65 » Wed Aug 01, 2012 5:08 am

You can point the share to any location. There is a file I believe that deals with downloads and that may be why it is not going to the appropriate location. Check these files and modify as needed:

/etc/transmission-daemon/settings.json
/etc/cron.d/amahi-transmission-watch
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

schox
Posts: 23
Joined: Thu Jan 26, 2012 1:17 pm

Re: root and home full? (HDA stopped)

Postby schox » Thu Aug 02, 2012 2:04 am

Thanks.

Only occurence of settings.json I could find - was much deeper in the filesystem (can't remember exactly where - I'm not at home) - and this file was over written with each restart of Transmission.

What I did, and this works (for now - It's a dirty hack, and needs to be cleaned up)

Moved the Torrents share LZ to /var/hda/files/drives/drive1/torrents from /var/hda/files/torrents
Mounted //HDA/Torrents to /var/hda/files/torrents via "mount cifs"
(This keeps the integrity of the active torrents, without having to manually edit each one to accommodate for the new location, and let Greyhole handle Transmission downloads correctly)
I've made the settings.json read only to allow Transmission Remote to connect (whitelist off)
I've stopped Transmission from starting automatically at boot (mount not ready)

What needs to be done, witch I've not figured out how to do is:
Mount //HDA/Torrents at boot, before transmission starts (I tried /etc/fstabs - but samba was not ready, so mount failed)

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: root and home full? (HDA stopped)

Postby bigfoot65 » Thu Aug 02, 2012 4:55 am

Interesting. Please let us know location of your .json file. There is some strange behavior with this app, primarily due to the change in downloads folder I presume.

Also, you can delay the starting or the transmission-daemon via the init script. We will have to check the current settings and see what to adjust.

Another option that might work would be to create a symlink from the original torrent share to the new one. This is a common practice in Linux and you will see them used for a variety of reasons.

I take it you are accessing Transmission remotely outside your network? This is Fedora, right? If so, then I probably gave you the wrong path. I gave you the one for Ubuntu. Will have to look at this more.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

schox
Posts: 23
Joined: Thu Jan 26, 2012 1:17 pm

Re: root and home full? (HDA stopped)

Postby schox » Thu Aug 02, 2012 7:53 am

Interesting. Please let us know location of your .json file. There is some strange behavior with this app, primarily due to the change in downloads folder I presume.
The .json file is located here:

Code: Select all

/var/lib/transmission/.config/transmission-daemon/settings.json /var/lib/transmission/.config/transmission-daemon/settings.json.bak
Also, you can delay the starting or the transmission-daemon via the init script. We will have to check the current settings and see what to adjust.
Where is this init script? - may be able to adapt this to also do the mounting? - also - is it possible to adapt the action (script?) for Transmission start/stop/restart in the Amahi-setting-webIF? (http://hda/setup?sub=servers&tab=setting)
Another option that might work would be to create a symlink from the original torrent share to the new one. This is a common practice in Linux and you will see them used for a variety of reasons.
the "problem" with doing this, as I understand, is that Greyhole then does not handle the saving of the files? - by doing the mounting via the Samba share, it processes the files throug Greyhole, is that correct?
I take it you are accessing Transmission remotely outside your network? This is Fedora, right? If so, then I probably gave you the wrong path. I gave you the one for Ubuntu. Will have to look at this more.
No - I´m using Transmission Remote on my local network - to be able to perform tasks that is not available through the Transmission WebIF - Like "force verify local data" - the setting.json have this lines in them:

Code: Select all

"rpc-whitelist": "127.0.0.1", "rpc-whitelist-enabled": true,
I´ve changed that to

Code: Select all

"rpc-whitelist": "127.0.0.1", "rpc-whitelist-enabled": false,
before I made the file read-only
since my HDA is not accessible from WAN (only forwarded ports are the torrent-ports)

Yes - I use Fedora14 - witch was the current supported version at the time of installing Amahi

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: root and home full? (HDA stopped)

Postby bigfoot65 » Thu Aug 02, 2012 8:15 am

The init script is located in /etc/init.d directory. Not sure if you can do the share mount in there, but may be possible.

Also, are you using the mount_shares_locally script with Greyhole? Using a symlink between the two different download locations should not present a problem, but not 100% sure.

You mentioned using Transmission remote. Is that the Amahi web app or an add-on?
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

schox
Posts: 23
Joined: Thu Jan 26, 2012 1:17 pm

Re: root and home full? (HDA stopped)

Postby schox » Thu Aug 02, 2012 8:38 am

I will look into it :) thanks
A quick look at the file : /etc/init.d/amahi-transmission indicates this this is responsible for setting download-dir and "restoring" the settings.json (I might be wrong ;) )

I use the transmission WebApp normally - but it is missing some features - so I´ve downloaded this : http://code.google.com/p/transmisson-remote-gui/ to my Mac - to be able to control more of the AmahiTransmission functions. - The rcp-whitelist block this program by default.

I´m not using the mount_shares_locally script - as this mount all shares, and I only need the Torrent-share - and I needed it at /var/hda/files - not /var/mnt

schox
Posts: 23
Joined: Thu Jan 26, 2012 1:17 pm

Re: root and home full? (HDA stopped)

Postby schox » Thu Aug 02, 2012 1:38 pm

Well - it works :)

I do not know if it is bulletproof - here is an update:

I edited the file /etc/rc.d/init.d/amahi-transmission

I looked for the "start" label and changed it to:

Code: Select all

start() { # Check that networking is configured. [ ${NETWORKING} = "no" ] && exit 1 # Mount share sleep 3 mount -t cifs //HDA/Torrents /var/hda/files/torrents if [[ ! -e $TRANSMISSION_DIR ]]; then ...
and I looked for the "stop" label and changed it to this:

Code: Select all

stop() { echo -n $"Shutting down Transmission daemon: " killproc $DAEMON RETVAL=$? [ $RETVAL = 0 ] && success $"$base shutdown" || failure $"$base shutdown" rm -f $LOCKFILE $PIDFILE #unmount the share before quiting umount /var/hda/files/torrents || { echo "umount failed, continuing anyways..." ; : ; } echo return $RETVAL }
This will delay the start and restart of transmission with 3 seconds (just to make sure samba has had time to start)

I´ve not looked into the settings.json issue (file being re-written on restart of transmission) - but can anyone explain what this block do? (from file /etc/rc.d/init.d/amahi-transmission )

Code: Select all

if [ -x /var/lib/transmission/.config/transmission-daemon/blocklists/ ]; then cd /var/lib/transmission/.config/transmission-daemon/blocklists/ wget -q -O level1.gz http://update.transmissionbt.com/level1.gz if [ -f level1 ]; then rm -f level1; fi if [ -f level1.bin ]; then rm -f level1.bin; fi gunzip level1.gz chown transmission:transmission level1 fi sed --in-place=.bak -e 's/"blocklist-enabled": false/"blocklist-enabled": true/' /var/lib/transmission/.config/transmission-daemon/settings.json echo -n $"Starting Transmission daemon... " if [ ! -f /var/lib/transmission/.config/transmission-daemon/settings.json ]; then daemon --user transmission $TRANSMISSION_BIN -w $TRANSMISSION_DIR

Who is online

Users browsing this forum: No registered users and 18 guests