rootfs used 100%

Hi guys, our SuSE server’s rootfs is 100%. What should I need to do? We are using it for SAP B1 version for HANA and this is a production server. See image below for reference. Hope to hear positive response from you guys. :slight_smile:

I’ve done this command to check all the files > 100M. I can see the

-rw------- 1 root       root        26G Jun 20 06:55 /root/.xsession-errors

Can I transfer this to other folder? Or can I delete it?

See image below for the result:

[CODE]find / \( -path /proc -o -path /var/lib/ntp/proc -o -path /hana \) -prune -o -type f -size +100M -print0 | xargs -0 ls -lh

[/CODE]

Hi bryan1207,

gee, 26G .xession-errors? That’s heavy.

That file catches all output from programs involved in your X enviroment, that went to stdout/stderr rather than to files or to some X11 window. So yes, you could delete that file. But note that the file will likely be held open by your current X session (the screen shot shows you’re working via X11 on that server), so the actual file (as in “disk space allocated in the file system”) will only be freed once you have logged off.

OTOH, it’d probably be interesting (for you, not for me :wink: ) to see what process(es) generated that much output, before deleting that file.

Regards,
J

Hi jmozdzen, thanks for the reploy. :slight_smile: How can I know if there’s a current X sessions? Sure, I will backup that first before I delete and check it later. I will send update here.

Hi,

How can I know if there’s a current X sessions?

Well, if you’re logged in via X11 (as in “if you’re using a graphical desktop”) then you have a current X session :slight_smile:

You could use “lsof | grep .xsess” to check who has that file open… probably plenty of programs.

I’m assuming you’re the user that is logged in as “root” via the X11 console - if not, you may need to find the person who is.

Just move the file away, although “df” will then still show all the space used (and lsof will likely report the file as “deleted”). So, you then simply log off that “root” user (likely you) and optionally re-login. The disk space now should be free, as the file formerly known as .xession-errors got actually deleted from the file system (and a new one was created once the root user logged in again)

Regards,
J

On 06/20/2017 10:24 AM, jmozdzen wrote:[color=blue]

Just move the file away, although “df” will then still show all the
space used (and lsof will likely report the file as “deleted”). So, you[/color]

If you do something like the following it will probably recover the space
immediately:

echo -n '' > .xession-errors

[color=blue]

then simply log off that “root” user (likely you) and optionally
re-login. The disk space now should be free, as the file formerly known
as .xession-errors got actually deleted from the file system (and a new
one was created once the root user logged in again)[/color]

Since there are a ton of messages, and presumably no problems (or those
would be in the thread more than this), maybe symlink the pesky thing to
/dev/null:

ln -s /dev/null .xession-errors


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

Thanks for the help guys.