Solved

Increase /tmp size

Posted on 2014-09-19
7
1,476 Views
Last Modified: 2014-09-21
Hi

I am using Centos 6.3 64 bit and have following partitions:

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg-root   1.8T  493G  1.3T  29% /
tmpfs                 7.8G  8.6M  7.8G   1% /dev/shm
/dev/md0              243M   29M  202M  13% /boot
/dev/mapper/vg-tmp   1008M  959M     0 100% /tmp


I need to increase /tmp size. LVM is following:
[root@scm ~]# vgdisplay 
  --- Volume group ---
  VG Name               vg
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               1.82 TiB
  PE Size               32.00 MiB
  Total PE              59601
  Alloc PE / Size       59600 / 1.82 TiB
  Free  PE / Size       1 / 32.00 MiB
  VG UUID               Yg3Tb1-H2eg-dtuN-tvl8-kpi3-oFhr-X1eZC0
   
[root@scm ~]# lvdisplay 
  --- Logical volume ---
  LV Path                /dev/vg/root
  LV Name                root
  VG Name                vg
  LV UUID                eLDqgA-cXM6-c0yw-yN7M-q35J-dNV1-9sYGjr
  LV Write Access        read/write
  LV Creation host, time ergo.lusovps.com, 2012-11-05 01:53:29 -0600
  LV Status              available
  # open                 1
  LV Size                1.81 TiB
  Current LE             59317
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     4096
  Block device           253:0
   
  --- Logical volume ---
  LV Path                /dev/vg/tmp
  LV Name                tmp
  VG Name                vg
  LV UUID                f0zmre-FaVR-856g-gCWU-FI10-xzfj-tE62GF
  LV Write Access        read/write
  LV Creation host, time ergo.lusovps.com, 2012-11-05 02:21:29 -0600
  LV Status              available
  # open                 1
  LV Size                1.00 GiB
  Current LE             32
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     4096
  Block device           253:2
   
  --- Logical volume ---
  LV Path                /dev/vg/swap
  LV Name                swap
  VG Name                vg
  LV UUID                fDkOaZ-BVGm-FcFR-rf7L-CJyq-ODjB-Y0Fcyu
  LV Write Access        read/write
  LV Creation host, time ergo.lusovps.com, 2012-11-05 02:21:31 -0600
  LV Status              available
  # open                 1
  LV Size                7.84 GiB
  Current LE             251
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     4096
  Block device           253:1

Open in new window


Can someone please guide me increasing /tmp size without any risk of loosing data. This is a production server. I need the size of /tmp to be 30GB.

Thanks in advance.
0
Comment
Question by:sysautomation
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 8

Accepted Solution

by:
Pepe2323 earned 500 total points
ID: 40333398
Hi

The first thing i can see is that u don't available space on the Volume group

Free  PE / Size       1 / 32.00 MiB

So the options are shrink root in order to release those 30 G you need it or add a new disk

Shrink Steps can be find on this link
http://rbgeek.wordpress.com/2013/02/11/how-to-reduce-the-root-partition-in-lvm/
 i prefer u check the link be cause it also has images and do all steps with details than explain it here.

Once you have those 30G release then you will be able to see it on the Volume group

vgdisplay vg

take a look to this:

Free  PE / Size

To extend TMP

first extend de logical volume

lvextend /dev/vg/tmp -L + 30G

Then Extend the file system

resize2fs /dev/vg/tmp

df -h and now u shall see the new space


Regards.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40333604
install "system-config-lvm-gui"
and it will do all the complexities behind nice GUI.
0
 
LVL 78

Expert Comment

by:arnold
ID: 40334030
You would need to use lvresize -30GB  on the root it seems that during the configuration you did not create a swap partition which is added/reflected as /tmp

Then you would use lvresize to increase /tmp

For
Consider future partitioning
/boot 500M-1g
Swap
/
/usr 5G
/var 5G
/var/log 2G
/home
The non identified sizes depend what the system does.

Please fdisk -l
Or gparted --list

If you are already using software raid /boot. Setting up raided volumes for /var /usr and other booting required mount points will provide for disk tolerance. Data on non-raided would still be lost.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:sysautomation
ID: 40334039
Thank you all. The server is running software RAID 10.

Is there any risk involved in shrinking root partition?
0
 
LVL 78

Expert Comment

by:arnold
ID: 40334044
There is always risk. Such that one should always have a good backup.

If you have a test system, you shoul try the procedure there.

You need to be comfortable with it.


/tmp what is in there?  You should have a process that simply deletes all from it, or based on age I.e. Anything older than 3 days
Find /tmp -mtime +3 -exec rm {}\;
The above will delete files older than three days.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40334122
Ubuntu puts /tmp in ramdisk....
0
 

Author Closing Comment

by:sysautomation
ID: 40335983
Thanks
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question