Increasing allocated space to a mount - possible?


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

I could have been clearer.

Perhaps I should have said, "whatever you do, don't do this":

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

My suggestion was to move as much from /usr as you needed to free up enough space to install Oracle.

Code:
cd /usr
mv openwin appserver /export

My statement that "Provided you create a link in /usr to the new location in /export there shouldn't be anything you can't move.", isn't strictly true (/usr/bin/init for example is a link to ../../sbin/init which would no longer be valid for /export/usr/bin since sbin is in / and ../../init would refer to a file in /export and not /), but I certainly didn't mean you to create a new usr directory under export and move everything from /usr into it, or rm -rf /usr.

But I really should have been clearer. Feeling responsible, I did a similar thing on my Solaris - which is now broken. (/export/usr is empty and /usr is no longer there), so I've had to reinstall it.

If your usr directory exists somewhere and you are able to remount / read-write then you should be able to fix this without re-installing.

Once my Solaris is finished installing, I'll have another look.
# 9  
Old 06-28-2009
It's quite okay, no worries - after all, it's still a whole lot of learning and I would never store critical data on a Solaris server before I get more confident in doing stuff like this, so we're never literally screwed Smilie

However, I do have the complete contents of the usr directory. It's located now in /export/usr/. This means that if I can get write mode on the system maintenance, I will be able to restore the /usr directory.

Do you know what to do in order to be able to write stuff (move, create) while in maintenance mode?
When I attempt to do anything that would cause a read-operation on the disk, it says for example:

-bash-3.00# rm usr (attempting to delete usr link in /)
rm: usr not removed: Read-only file system

When i do a df -h to see what's on, we get (sorry for the horrible formatting, writting freehand since I can't SSH to the server atm Smilie):

Code:
df -h
Filesystem size used avail capacity Mounted on
/pci@0,0/pci-ide@f,1/ide@0/cmdk@1,0:a
  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  760M 772K 759M 1%  /etc/svc/volatile
objfs  0K 0K 0K 0%  /system/object
sharefs  0K 0K 0K 0%  /etc/dfs/sharetab

So my mission now is to find out how to get to able to write to the disk so I can restore /usr from /export/usr.
# 10  
Old 06-28-2009
That's a relief I was quite worried that I aided and abetted you in breaking your system!

There is a remount option of the mount command which will mount it read-write, but I don't know if that works for /.

My Solaris is freshly installed, so I will try (once I get past all the "welcome", "did you know" and "configuring...." stuff that it throws up the first time you do anything on it.
# 11  
Old 06-28-2009
That sounds cool Smilie

I have been looking around in search for a "remount" but was unable to find one (attempted a find / -name remount too). Instead, I found mountall in /sbin/.

When I executed mountall, it mounted /tmp and /export/home. When I do a df -h, I now, besides my previous output have got these two:

Code:
swap  995M 0K 695M 0% /tmp
/dev/dsk/c0d1s7 224G 1.4G 221G 1% /export/home

This means that I can now write to /export/home/* but not to anything else. Unfortunately, this also means that I was unable to move /export/usr (and if I could, I would still not be able to create /usr and move the content to it) Smilie
# 12  
Old 06-28-2009
Can you try..

Code:
/sbin/mount -o remount,rw /


Last edited by Scott; 06-28-2009 at 03:01 PM..
# 13  
Old 06-28-2009
Strangely enough, my system does not recognize mount.

-bash-3.00# mount -o remount,rw /
-bash: mount: command not found
-bash-3.00# mount
-bash: mount: command not found

...Even though it is present in /sbin/ (I am in this dir when trying to execute):

-bash-3.00# ls -l | grep mount
-r-xr-xr-x 1 root bin 22992 Jan 23 2005 mount
-r-xr-xr-x 1 root sys 8159 Jan 22 2005 mountall
-r-xr-xr-x 1 root bin 18500 Oct 3 2008 umount
-r-xr-xr-x 1 root sys 7859 Jul 4 2007 umountall

I can only execute mountall and umountall - they share the fact that they are owned by root and belonging to the sys group. However, mount and umount are owned by root and belonging to the bin group. Does this mean anything or is it just "hot air"?
# 14  
Old 06-28-2009
I just broke my Solaris again and tried the mount thing.

Code:
cd /
$ echo x > x
x: cannot create
$ /sbin/mount -o remount,rw /
echo x > x
(it worked)

(you need to either give the full path or cd /sbin and use ./mount)
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