[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1902
  • Last Modified:

Increase /tmp size

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
sysautomation
Asked:
sysautomation
  • 2
  • 2
  • 2
  • +1
1 Solution
 
Pepe2323Commented:
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
 
gheistCommented:
install "system-config-lvm-gui"
and it will do all the complexities behind nice GUI.
0
 
arnoldCommented:
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
Will You Be GDPR Compliant by 5/28/2018?

GDPR? That's a regulation for the European Union. But, if you collect data from customers or employees within the EU, then you need to know about GDPR and make sure your organization is compliant by May 2018. Check out our preparation checklist to make sure you're on track today!

 
sysautomationAuthor Commented:
Thank you all. The server is running software RAID 10.

Is there any risk involved in shrinking root partition?
0
 
arnoldCommented:
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
 
gheistCommented:
Ubuntu puts /tmp in ramdisk....
0
 
sysautomationAuthor Commented:
Thanks
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now