Mail from "root" - tar: Write error

Status
Not open for further replies.

dvc9

Explorer
Joined
May 2, 2012
Messages
72
Im getting an error mail from my FreeNAS 9.1 instalation.

Config :

DellNX3100
64 GB RAM, 120 GB SSD Intel 520 as LOG,
MD1200 12 x Disks 3TB, 2x Dell PERC H200 Flased as LSI SAS 2008
Intel X520 10GbE Card. configured on 2 Vlans one for 10GbE one on a 1GbE Network.
Realtech 4 X 1gb onboard NIC, one on the big www, and one for another non essensial Vlan

Error :

I have got 24 mails the last day, one each hour with the heading and mail.

--
"Cron <root@FRAG-SERVER> /bin/sh /root/save_rrds.sh"

tar: Write error

--

I have not done anything of Untaring =)
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
That script (save_rrds.sh) is part of the Reporting area of FreeNAS. It is trying to compress the contents of the /var/db/collectd directory and store it in a bzip archive at /data/rrd_dir.tar.bz2. For some reason it is unable to create this bzip file. This sounds like a symptom of your flash drive going bad.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
That script (save_rrds.sh) is part of the Reporting area of FreeNAS. It is trying to compress the contents of the /var/db/collectd directory and store it in a bzip archive at /data/rrd_dir.tar.bz2. For some reason it is unable to create this bzip file. This sounds like a symptom of your flash drive going bad.
The script is creating the tar.bz2 file in /var/db and only after tar successfully finishes it moves the file to /data.
As the error message is from tar and not mv, I don't think the problem is with the flash drive (/data). /var is a ramdrive, so you are probably running out of space there.
Can you please run:
df -h /var
to check free space in /var?
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
Ah yes, sorry I only glanced over the script :). I agree that in that case, since the tar command operates on a RAM disk, you are somehow close to being out of space there. Now the question is, where is the junk piling up? Running the df command as Dusan suggested should hopefully provide more insight.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
And if you are really out of space in /var, you can also run
du -hd3 /var
to find where did the space go.
 

dvc9

Explorer
Joined
May 2, 2012
Messages
72
Thanks for reply.

I where traveling at the moment, and just added my mails to the spam folder =P (whoops)
Anyway, the server is still reporting the same error every hour.

[root@FRAG-SERVER] ~# df -h /var
Filesystem Size Used Avail Capacity Mounted on
/dev/md2 149M 116M 20M 85% /var

I think ill export settings and reinstall a clean FreeNAS , after all it have been upgraded from 8.2 until 9.1.1 without reinstalling.
mabye something happend there =)

Best
Andreas
 

dvc9

Explorer
Joined
May 2, 2012
Messages
72
Ok, I think i fixed it.

Lookes like the file rrd_dir.tar.bz2 did not like to be overwritten.
so i had to mount / and delete the file rrd_dir.tar.bz2 in /data/ then manualy run the script to create a new file.

Code:
mount -uw /
cd /data/
cp rrd_dir.tar.bz2 /mnt/lokalsotorage #For backup
rm -rf rrd_dir.tar.bz2
/bin/sh /root/save_rrds.sh
mount -ur /
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
If it's that old then it's probably the collectd (rrd) history. I think it never gets deleted.
The resulting .bz2 archive may very well be bigger than 20MB (your free space in /var).
Running du -d3 /var | sort -n | tail will show you the largest directories in /var. If /var/db/collectd is the culprit, you can delete the contents of the /var/db/collectd/rrd directory (this will remove the reporting graphs history).
 

dvc9

Explorer
Joined
May 2, 2012
Messages
72
haha, yes that freed up a lot!
Thanks !

now it´s 60 Mb free space =)
 
Status
Not open for further replies.
Top