Author Topic: Xsession: warning: unable to write to /tmp  (Read 6502 times)

peso7

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Xsession: warning: unable to write to /tmp
« Reply #15 on: February 16, 2011, 10:59:29 pm »
1st of all: Thanks to Escorpiom - nice work and good support

2nd: Hey, Zentyal stuff, where are you? If Escorpiom is right (and I exactly experience the same problem) this is a timebomb. So, please help to overcome the problem - setting up the server is not a handsome solution.

peso7

@Escorpiom: where are those squid files. I only found a couple of small log files in /var/log/squid.

peso7

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Xsession: warning: unable to write to /tmp
« Reply #16 on: February 16, 2011, 11:16:39 pm »
I just created the ticket #2708
You get there by: http://trac.zentyal.org/ticket/2708
Let's see what happens.

Escorpiom

  • Zen Hero
  • *****
  • Posts: 897
  • Karma: +25/-1
    • View Profile
Re: Xsession: warning: unable to write to /tmp
« Reply #17 on: February 17, 2011, 03:21:56 am »
First off,
Partitioning and other harddisk stuff is basic Ubuntu stuff and has little to do with Zentyal itself.
I think that's why Zentyall staff doesn't support these kind of issues.
Although I understand their motivation, it does create a huge gap for people that are new to Linux and decide to try Zentyal as a first step.
Zentyal will only be accessible to the more experienced Linux folks who already know their basics.

So if we want to bridge that gap we will have to do it ourself. There is not much of a community here (judging by the amount of unanswered posts) so we have to build one  :)

I do believe Zentyal to be a great product, and if the next update takes care of the speed issues I could become a happy user.
In the meanwhile, I'll try to help as much as possible at my n00b level.

From what I have gathered, the root fills up because:
- excessive log files
- Squid cache (located at /var/spool/squid)
- Zentyal backups
 
Note that the default cache size is set at 128MB, so Squid cache will only become a problem if you change it manually to something rather big.
For the log files, you can delete the Gzipped logs safely.

As for the resizing, I only dug in to the LVM method a few days ago. At this point I simply haven't got enough information to write a "step-by-step-resizing-manual".
If you decide to set up Zentyal from scratch, in that case I would recommend:
- Choose LVM. It's much more easier in the long rung
- Depending on your harddisk size, choose a large /root. I would do 30GB - 40GB
- Be carefull with the size of your Squid cache. If you choose several gigabytes they WILL be populated in days so take note of of your /root size.
- Do not worry about /home, if you should need more space it's easy to add or relocate.
- For swap, choose two times your mem size. For example, you have 4GB of RAM, swap can be 8GB.
- /boot is rather small and doesn't change from what I've noticed. It's about 195MB with 32MB used on my system. 
 
Other more experienced users may opt to put /var on their own volume. Above is only meant as a n00b guide.
If you have something to add or if something is wrong, please comment. Others will be thankful.

Cheers.
Marcus' Rule:
Blanks & capitals = avoid it and you'll avoid problems...

Sam Graf

  • Guest
Re: Xsession: warning: unable to write to /tmp
« Reply #18 on: February 17, 2011, 02:39:24 pm »
First off,
Partitioning and other harddisk stuff is basic Ubuntu stuff and has little to do with Zentyal itself.
I think that's why Zentyall staff doesn't support these kind of issues.
Although I understand their motivation, it does create a huge gap for people that are new to Linux and decide to try Zentyal as a first step.
Zentyal will only be accessible to the more experienced Linux folks who already know their basics.

This is true of anything Zentyal makes attractive or easier. Because Zentyal includes so many packages, people could come here looking for answers to everything from Ubuntu installation questions (as is the case here) to questions about any given service Zentyal integrates. The breadth of knowledge required to properly support all that looks to me to be considerable.

So Zentyal users can either acquire the habit of looking for help at the home of the packages Zentyal includes (not always productive, regrettably), or, since Zentyal is an open source project, a consistently active community can form and offer help.

But it seems like the majority of people here are drawn by what Zentyal makes possible for Linux noobs rather than by any preexisting Linux expertise (including me). That creates pressure on the Zentyal staff, and it creates frustration here, sadly.

Which is just to say that I agree 100% with
So if we want to bridge that gap we will have to do it ourself. There is not much of a community here (judging by the amount of unanswered posts) so we have to build one  :)

A tall order for a bunch of even the best-intentioned noobs to pull off, but that's the way it is. IMHO, of course. :)

organetic

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Xsession: warning: unable to write to /tmp
« Reply #19 on: March 01, 2011, 08:31:31 pm »
I do believe that I've managed to find a solution (at least temporary) for this nasty problem that affects all production servers out there.

I have a home volume group of around 442GB, so what I've made was to take out 30GB of /home and gave it to /root

I've made the following procedures:

1 - Boot the Zentyal Server with the official installation CD
2 - select the option the option to repair the computer with the instaled Zentyal
3 - after selecting the network card and time zone, DO NOT mount a volume
4 - Select the option to execute a console
5 - type the following commands,

first, check your server name and size of the home volume group typing the following command:

# lvdisplay

then, after checking names and sizes

# e2fsck /dev/your-server-name/home
# resize2fs -f /dev/your-server-name/home 412G
# lvreduce -L412G /dev/your-server-name/home
# lvextend -L30G /dev/your-server-name/root
# e2fsck /dev/your-server-name/root
# resize2fs /dev/your-server-name/root

please notice that I've used 412G but you can use another size to define your home partition.
Just don't forget that the space you'll earn for root is the diference between what you had and what you choose here.

Maybe someone can make a script with these commands, asking the user what size to give to root.
and auto-detecting the name of the computer. This would be the preferrable way.

As for my part, at least, the server is now working ok after all.

Please take this as a first approach to the problem, and develop it more.

The Zentyal team could make a script like this run at the end of the installation, so this problem would never happen again.

I'm just worried that the root size keeps expanding... Will this bug eat the whole 30GB ?!!


Sam Graf

  • Guest
Re: Xsession: warning: unable to write to /tmp
« Reply #20 on: March 01, 2011, 10:01:34 pm »
I just took a second test server out of production after months of operation from 9.1GB Fujitsu drives. I'm still inclined to think the problem is in using the Ubuntu automated partition feature. At least nothing in my experience so far indicates that Zentyal has a bug that causes it to eat up all the available space in /. Maybe I have just been able to dodge the bullet?

Escorpiom

  • Zen Hero
  • *****
  • Posts: 897
  • Karma: +25/-1
    • View Profile
Re: Xsession: warning: unable to write to /tmp
« Reply #21 on: March 03, 2011, 11:48:32 am »
Excelent post by organetic. That's the kind of howto we can go by. Thanks!

Sam is right. It is not a Zentyal bug. It is just the automatic partitioning future from Ubuntu.
What Zentyal staff can do perhaps is put up a warning to choose partition sizes carefully.
Anyway I've learned from this and with every new setup I will be skipping the auto-partitioning.

BTW Sam, those 9GB drives seem rather small to me, you might not have had all the modules installed/running. Or had the squid cache set very small? Purge logs frequently?
I'd be more happy with some 40GB partition, using 10GB for the Squid cache.

Cheers.
Marcus' Rule:
Blanks & capitals = avoid it and you'll avoid problems...

Sam Graf

  • Guest
Re: Xsession: warning: unable to write to /tmp
« Reply #22 on: March 03, 2011, 02:11:01 pm »
Quite right. These test machines (old Dell PowerEdge 2500s) were providing primarily infrastructure and gateway services with Samba running to provide some select file sharing and Samba testing. The Squid cache was left at the default primarily to limit RAM use. Log rotations were the default weekly (when the logs were enabled, which wasn't always the case given problems talked about elsewhere). It was not a full-blown Zentyal installation by any means.

I've got a similarly set up test server running with 18 GB drives, and the system is using 2111 Mb (not including the default-sized Squid cache). I'm not advocating the use of small drives or anything, but I am saying that running the majority of Zentyal's services (anything I could real-world test) on small drives has not been a problem to me, so far. :)

EDIT: I should probably add, for context, that it's been this way since I first deployed eBox 1.0 in a production environment using a Dell OptiPlex GX110 -- tiny drives, limited RAM. It's a terrible thing to do to a piece of software under testing, for sure. But it's been an awesome learning experience!
« Last Edit: March 03, 2011, 02:17:07 pm by Sam Graf »

arun

  • Zen Monk
  • **
  • Posts: 86
  • Karma: +0/-0
  • no windows, no gates, all open
    • View Profile
Re: Xsession: warning: unable to write to /tmp
« Reply #23 on: March 14, 2011, 01:13:55 pm »
Dear Escorpiom and Organetic,

Thanks for your post. My two server have crashed in such a manner, I was surprised and almost decided to leave Zentyal, but your post has helped me to restore the things in place.

thanks again.
Hope Zentyal and Ubuntu would be listening.

Arun

stuartiannaylor

  • Guest
Re: Xsession: warning: unable to write to /tmp
« Reply #24 on: May 02, 2011, 12:45:06 am »
I have had the same. Total server crash and exactly same problems. Its a proper PAI to not be able to use something simple like gparted on a livecd.
I hate command line scripts for something as critical as partition playing.
Anyway thanks for the posts as here goes.

What I don't understand, is exactly what is filling the root partition? If someone could say then I could clean the aged files?

Stuart

aerithilynn

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Xsession: warning: unable to write to /tmp
« Reply #25 on: May 09, 2011, 03:08:27 am »
I have had the same. Total server crash and exactly same problems. Its a proper PAI to not be able to use something simple like gparted on a livecd.
I hate command line scripts for something as critical as partition playing.
Anyway thanks for the posts as here goes.

What I don't understand, is exactly what is filling the root partition? If someone could say then I could clean the aged files?

Stuart



as for me, i am also new to Linux , moreover Zentyal / ubuntu

for root drive, my server having backup function of every week.
for the moment, i keep clearing the path /var/lib/ebox/.cache/duplicity

you will need to use sudo rm -r * to do this.

however occasionally , the space may cloud from somewhere. now i am still studying this ...

aryana.haribawa

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +5/-0
    • View Profile
Re: Xsession: warning: unable to write to /tmp
« Reply #26 on: July 07, 2011, 06:29:33 am »
Hi, have you solved this problem? If Not, I have written a doc on how to resize Zentyal Root LVM Partition safely. This problem is very common.

Andre

aryana.haribawa

  • Zen Apprentice
  • *
  • Posts: 10
  • Karma: +5/-0
    • View Profile
Re: Xsession: warning: unable to write to /tmp
« Reply #27 on: July 07, 2011, 06:47:45 am »
Hi, have you solved this problem? If Not, I have written a doc on how to resize Zentyal Root LVM Partition safely. This problem is very common.

Andre

stuartiannaylor

  • Guest
Re: Xsession: warning: unable to write to /tmp
« Reply #28 on: July 08, 2011, 05:09:15 pm »
I resized the partitions and all worked perfect.

I must admit I was a little nervous. The server was in limbo and I would of prefered to do a backup before the resize.

If you install Zentyal please read the above and change the default partitioning that "Ubuntu" provides. This is an "Ubuntu" problem and not Zentyal but I am sure that they could tweak this at one stage.

Install Zentyal and resize the LVMs before you go to production. You will be sorry otherwise.
ps. Thanks for that doc

jfeher

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Xsession: warning: unable to write to /tmp
« Reply #29 on: February 04, 2012, 09:35:27 am »
I faced the same problem this morning.
sudo apt-get clean and a restart solved it.
Hope it helps others.