Increasing allocated space to a mount - possible?


 
Thread Tools Search this Thread
Operating Systems Solaris Increasing allocated space to a mount - possible?
# 1  
Old 06-28-2009
Increasing allocated space to a mount - possible?

Hey guys,

I am somewhat new to Solaris - and very new when it comes to mounts.

My problem is that when I installed Solaris, I allocated way too little diskspace to my / mount (it first became obvious now, however, because of new needs).

Code:
bash-3.00# df -h 
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0d1s0        4.6G   3.9G   741M    85%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   933M   888K   932M     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
                       4.6G   3.9G   741M    85%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   1.0G   107M   932M    11%    /tmp
swap                   932M    24K   932M     1%    /var/run
/dev/dsk/c0d1s7        224G   1.4G   221G     1%    /export/home

As you can see, I have lots of space allocated to /export/home.

My question is - can I (and how?) do I take 100 gb of space from /export/home and allocate to my / mount without literally screwing my system over?

The primary reason for this is that installing Oracle on my server requires at least 1,1-1,5 gb of available disk space on /. As you can see above, I only have 741 mb free disk space.

I hope you can point me in the right direction.
Please keep in mind that I never have played with mounts before on UNIX, so please be gentle Smilie
# 2  
Old 06-28-2009
It can be done, but not exatly in the way you describe it.

Can you post a
Code:
du -sk /*

So we can see to what directories your space is allocated on the root disk. There are obvious directories such as /var and /usr that can be moved to new partitions, but we need to be sure you aren't using /opt or similar directories heavily.
# 3  
Old 06-28-2009
That sounds good. I am more than open for suggestions, if it can save me a reinstall ;o)

Here's the result of a du -sk /*:

Code:
bash-3.00# du -sk /*
6       /Desktop
1       /Documents
1       /bin
78453   /boot
34000   /core
646     /dev
120     /devices
63271   /etc
1411938 /export
0       /home
93865   /kernel
26280   /lib
8       /lost+found
1       /mnt
0       /net
397457  /opt
55907   /platform
790598  /proc
2       /rmdisk
1740    /sbin
6714    /system
109496  /tmp
1807    /u03
2647479 /usr
641947  /var
0       /vol

# 4  
Old 06-28-2009
From this we see that /usr is (probably) created on the root filfesystem. And it's very big.

Code:
# df -k /usr
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2              5524368   4497236    741980  86% /

You should look at this
Code:
du -sk /usr/*

and perhaps move some stuff to /export (which is huge).

i.e.
Code:
cd /usr
mv _something_ /export
ln -s /export/_something_

(it's safer to do this when there are no users on the system, and maybe even from single user mode)

There's also other articles on the Forum about Solaris filesystems:

i.e.

increase root file system size in solaris

https://www.unix.com/filesystems-disk...laris-8-a.html
# 5  
Old 06-28-2009
That sounds interesting, Scott. Is there something in /usr/ that I should *not* move or can it all be moved safely to /export without corrupting any dependencies, links etc?

(I think you are absolutely right that it should be done from single user mode to be on the safe side).

Just for good manners, here's a du -sk /usr/*:

Code:
bash-3.00# du -sk /usr/*
1       /usr/5bin
1       /usr/X
107206  /usr/X11
1       /usr/X11R6
1       /usr/adm
53383   /usr/apache
16059   /usr/apache2
108642  /usr/appserver
140     /usr/aset
48898   /usr/bin
1831    /usr/ccs
6051    /usr/demo
1       /usr/dict
80643   /usr/dt
1       /usr/games
6       /usr/gnome
46092   /usr/include
89680   /usr/j2se
1       /usr/java
177537  /usr/jdk
3841    /usr/kernel
4       /usr/kvm
629267  /usr/lib
1       /usr/mail
1       /usr/man
5       /usr/net
1       /usr/news
24      /usr/oasys
1       /usr/old
206702  /usr/openwin
59155   /usr/perl5
29458   /usr/pgadmin3
1350    /usr/platform
95057   /usr/postgres
1       /usr/preserve
15      /usr/proc
1       /usr/pub
53162   /usr/sadm
19161   /usr/sbin
478344  /usr/sfw
303631  /usr/share
3427    /usr/snadm
1       /usr/spool
1       /usr/src
24183   /usr/sunvts
1       /usr/tmp
569     /usr/ucb
159     /usr/ucbinclude
564     /usr/ucblib
389     /usr/vmsys
2556    /usr/xpg4
429     /usr/xpg6


Last edited by brightstorm; 06-28-2009 at 11:00 AM.. Reason: added a "du -sk /usr/*"
# 6  
Old 06-28-2009
Provided you create a link in /usr to the new location in /export there shouldn't be anything you can't move.
# 7  
Old 06-28-2009
I now tried to do the following sequence:

mkdir /export/usr
mv /usr/* /export/usr
/export/usr/bin/ln -s /export/usr usr
rm -rf /usr
/export/usr/bin/mv usr /

Since the ls, mv etc reside in /usr/bin, I had to add a little extra to be able to create the link, remove the old /usr and move the usr-link to /. So far, so good and I was again able to do things without /export/... stuff in front.

However, after rebooting this prevents me from doing anything but going into system maintenance mode. The errors did not make much sense, so I decided to boot it into failsafe since Solaris itself suggested it because there was some diffs in /.

In failsafe, I realized I couldn't really do much (at least, not to my knowledge). In failsafe, I had an empty /usr. I rebooted again and attempted to start in normal mode. It fails and prompting that Console login is not possible and forced me again to enter system maintenance mode.

However, since system maintenance mode is read only, I am wondering - can you enter system maintenance in write mode? The only thing I need to do (as far as I can see) to bring things back in order is to -

1) Delete the usr link in /
2) Create new /usr dir
3) Move all data from /export/usr to /usr.
4) Reboot

Any ideas?

Last edited by brightstorm; 06-28-2009 at 11:54 AM.. Reason: corrected sentence to make more sense
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script to sum up the space allocated to filesystems

Hi , I Would like to know the space allocated by adding up all the allocated space to group of filesystems .. example , df -h|grep /db | awk '{ print $4 }' ---> giving me all the used space on the filesystem but need to know the total used space by adding up all the values (3 Replies)
Discussion started by: nsankineni
3 Replies

2. UNIX for Dummies Questions & Answers

How to find the disk space allocated.

Hello, I need to find the total allocated disk space for the home directory. How can i find that in unix?(in GB). Thanks. (4 Replies)
Discussion started by: kailash19
4 Replies

3. Solaris

How much portion of RAM is allocated to Swap space?

How swap is getting 12GB as its size as per the below output: Filesystem size used avail capacity Mounted on /dev/md/dsk/d0 7.9G 2.1G 5.7G 27% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 12G 1.2M 12G 1%... (3 Replies)
Discussion started by: ramnagaraj
3 Replies

4. Solaris

Increasing disk space of a mount point.

Hi I have a mount point that is in production environment, and is currently filled up. more space has been presented from same original source (EVA). Problem; 1. Can't see presented space 2. After I discover the presented space, how do I go about adding this new space to existing mount point.... (9 Replies)
Discussion started by: Targ
9 Replies

5. UNIX for Dummies Questions & Answers

Increasing swap space

I searched the archives first, but found that there are alot of mixed answers on whether swap space can or can not be increased. Some postings said swap space can be increased using the swap or growfs commands while other postings said you can not increase the permanent size of the swap space. ... (1 Reply)
Discussion started by: Kevin1166
1 Replies

6. Solaris

Can be changeed the allocated space

i am working with solaris 9 and my disk usages are # df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t0d0s0 2148263 1902721 202577 91% / /proc 0 0 0 0% /proc mnttab 0 0 0 ... (3 Replies)
Discussion started by: smartgupta
3 Replies

7. UNIX for Dummies Questions & Answers

Best ways of increasing space on a partition

Hi, On one of our solaris servers, the root partition has filled up,(it was poorly sized in the first place), Does anyone have any advice about the best way to add space to a partition. I'm sure I've read how to do this somewhere before but just can't remember...:( A colleague has suggested... (1 Reply)
Discussion started by: kenny123m
1 Replies

8. UNIX for Dummies Questions & Answers

df+du=Total space allocated(for a file system)

Hi All, Will df+du=Total space allocted for a file system?? Is the above correct. Please correct me If iam wrong. In one my programs the above is not happening. Please help me out. Many thanks. Regards, Manas (2 Replies)
Discussion started by: manas6
2 Replies

9. UNIX for Advanced & Expert Users

Increasing filesystem space

Now, i know a ufs file system can be increased using mkfs but hwo do I take space from a file system and add it to another file system? at my job here, that seems to be possible because I see request on it almost every day. what is the exact command to do this and does the system need to be... (1 Reply)
Discussion started by: TRUEST
1 Replies

10. UNIX for Dummies Questions & Answers

Swap space used greater than allocated using top

Hi there, When I run top on my machine it says I have 497M swap space in use, and 380M swap space free, but I have only allocated 512M swap space to the machine!!!! Does anyone know how swap used is calculated in the top command? Thanks... (1 Reply)
Discussion started by: chorgan
1 Replies
Login or Register to Ask a Question