Login or Register to Ask a Question and Join Our Community


How to use space in /tmp to increase root?


 
Thread Tools Search this Thread
Operating Systems Solaris How to use space in /tmp to increase root?
# 1  
Old 08-02-2016
How to use space in /tmp to increase root?

Hello All,

I have solaris server running,
Code:
uname -a
SunOS host 5.9 Generic_112233-12 sun4u sparc SUNW,Sun-Fire-280R

Code:
Filesystem             Size   Used  Available Capacity  Mounted on
/dev/md/dsk/d0         9.8G   8.7G       1.0G    90%    /
/dev/dsk/c1t1d0s3      4.3G   7.7M       4.2G     1%    /tmp

I want to increase my root by 2GB more by consuming the space in /tmp

How can i do that? can anyone help . Also kindly help me with the commands.Thanks.
# 2  
Old 08-02-2016
You can't, as the two file systems are on different disks. Even if they were on the same disk, it would be a risky task that should be reserved to experienced people.

What you can do, though, is redesign the file system tree by e.g. moving a large "branch" to the second disk, freeing its space on disk 1, create a tmp directory within that "branch", and then link /tmp thereto. You'll have to modify /etc/fstab accordingly, and make pretty sure that during boot the FS is available before any of its files are needed.
# 3  
Old 08-02-2016
I would actually ask the reverse question:-
"What is filling up my root filesystem?"
You might help to answer this reviewing the output from the following:-
Code:
cd /
du -ks *|sort -n

You can then work down the largest directories to get a feel for where the space is used. Perhaps you can move these.


Are you using a volume manager at all on this server (Veritas perhaps?) You would be far better to try to split up and shrink the root filesystem to hold just the OS that you need to boot. Data in the root filesystem, whatever directory path you squirrel it away under, is usually bad as if your application runs away, you can end up with a system that will not boot.

I would suggest that splitting out /var (where most OS logs are written to, along with mail files etc.) /home (user personal files) and /tmp would be good practice.


Can you tell us more about the server disk you have?

Output from df -h and a listing from the volume manager of all the volume groups would be useful. That might be a vgdisplay -v or vxdg list & vxdg free


That said, splitting a root filesystem is not a trivial matter. You will probably have to boot to single-user from media so that it is not in use, then move data around before attempting a shrink if your volume manager allows it.


How critical is the server and it's data? It would be prudent to check you can read your backups before starting anything.




Robin

Last edited by rbatte1; 08-02-2016 at 05:21 AM.. Reason: Added the section about using DU to find the directories using most space
# 4  
Old 08-02-2016
Quote:
Originally Posted by RudiC
You can't, as the two file systems are on different disks.
While I agree expanding the file system would be a risky and unrecommended task for unexperienced people, there is actually no evidence / and /tmp are on different disks, more precisely, we do not know from which underlying devices the metadevice used by the root file system is made of but it is probably a mirror with one of its component on the same disk as /tmp. However, the standard layout is locating /tmp immediately before / while for growfs to be possible, it should have been located immediately after /. The bottom line is you probably can't expand / with /tmp but it might be possible to grow / by cannibalizing another file system like /export/home.
# 5  
Old 08-02-2016
Thanks for all the help.I asked the team to provision a 20 GB new LUN to the server.Can we expand the / by using the new LUN?
# 6  
Old 08-03-2016
No. The root file system can only be expanded using contiguous space from the same disk.
# 7  
Old 08-03-2016
Hi,

it seems that ncdu is available too for SunOS. A good menu-driven program for checking used space on your system.

regards,
s.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Increase /tmp file system size dynamically in Solaris zone

Hi Please let me know how to increase the size of /tmp file system from 512m to 1024m dynamically without reboot in solaris zone # df -h Filesystem size used avail capacity Mounted on zones/zone1 11G 1.0G 10.0G 10% / /dev 11G 1.0G ... (6 Replies)
Discussion started by: sb200
6 Replies

2. Linux

How to increase root space from another partition?

Hi OS Experts I would like to increase root partition from another partition so that I can save more documents in Home and Desktop. whether it is possible without formating root partition if so please explain here is o/p of df -h Filesystem Size Used Avail Use% Mounted on /dev/sda9... (8 Replies)
Discussion started by: Akshay Hegde
8 Replies

3. Red Hat

increase root partition

i am using redhat 5.4 and my root size shows 98 %, how can i increase root size # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 77G 16G 75G 98% / /dev/sda1 2.4G 82M 2.2G 4% /boot tmpfs 3.8G 0 3.8G 0%... (8 Replies)
Discussion started by: reply.ravi
8 Replies

4. Solaris

Increase /tmp size temporarily

Hi all system Solaris 10 10/09 s10x_u8wos_08a X86 ufs file system I would like to install SunStudio. After the gui comes up it shows that i need to add swap space of at least 900m. the command swap-s shows 880m free. My question is can you temporarily increase swap by 1 or 2... (3 Replies)
Discussion started by: kc2dws
3 Replies

5. AIX

i-nodes - out of disk space on /tmp

Usage: We run test build jobs that login to our AIX machines and create many small files in /tmp. After these jobs complete, they delete their temporary files that they have created. Issue: After approximately a week /tmp appears to become full. Issuing the command “df –g... (4 Replies)
Discussion started by: bblondin
4 Replies

6. Solaris

increase Root size

Dear all, I am very new to solaris, I have installed solaris 10, i tried installing few softwares into file system, unfortunately system failed to install stating "No space left on device " i searched few threads and it says, we have to increase root size. where my root size is... (2 Replies)
Discussion started by: radhnki
2 Replies

7. Shell Programming and Scripting

/tmp out of space error

Hi , I am a documentum consultant and facing a problem with a shell script that launches an installer to install documentum . The problem i am facing is that , when i invoke the below script to install the software it says - The directory /tmp does not contain enough space to extract... (1 Reply)
Discussion started by: h.shergill
1 Replies

8. Solaris

Increase size of /tmp swap File

Hi Guys I need to increase the size of my /tmp swap file. What is the easiest way to do this. Thanks Carson (2 Replies)
Discussion started by: cmackin
2 Replies

9. UNIX for Dummies Questions & Answers

Moved root directory to tmp

I just received a phone call from a customer who accidentally typed this in: # mv * /tmp They did this from the root directory. I think they thought they were in a different folder. So now no commands work. I even adjusted the path to have the /tmp in front of everything. Even when I went... (8 Replies)
Discussion started by: stufine
8 Replies

10. UNIX for Dummies Questions & Answers

increase size of /tmp

My /tmp is full, and the oracle installation is crashing. How can I increase the size of /tmp, even though I have allocated all the available disk space to other partitions? (2 Replies)
Discussion started by: pkappaz
2 Replies
Login or Register to Ask a Question

Featured Tech Videos