-1
df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/md2       1016G   19G  947G   2% /
/dev/md1        496M  149M  322M  32% /boot
/dev/md3        4.0T  238G  3.6T   7% /home
/var/tmpMnt    1008M  858M  100M  95% /tmp

I want to increase /var/tmpMnt to 10GB I fear data lost my server has important sites

  • 1
    First of all, if you fear you might loose data you have one /tmp you should know that this is a directory that often is [cleared out at boot or at shutdown][1] by the operating system / linux distribution. Second, do not place important data you can not afford to loose on /tmp. [1]: http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/tmp.html – pkhamre Feb 06 '14 at 12:27
  • temp is used for temporary files . I mean my server sites are important . I only want to increase /var/tmpMnt to 10 GB so that nothing go wrong on server – Mohammad Alipour Fathkoohi Feb 06 '14 at 12:32

1 Answers1

0

From what i can see your /tmp is backed by a loop mounted file.

The easiest way to expand it (if you don't care for the data there). One possible way to do it is with dd:

  • dd if=/dev/zero of=/var/tmpMnt bs=2M count=5120 - will create 10G empty file (needs to be formatted with a filesystem afterwards)
  • dd if=/dev/zero of=/var/tmpMnt bs=1 count=0 seek=10G - will create empty and SPARSE file that (needs to be formatted with an FS

Additionally looking over the setup:

  • it is not recommended to use /tmp backed by a file - it increases the load.
  • your root is quite big. I really can't imagine what you are going to put in a 1T root partition. I would advise on shrinking it to something smaller.
  • generally with this setup i would recommend to look into LVM for more flexible space allocation.
zeridon
  • 760
  • 3
  • 6