space of zones need changes


 
Thread Tools Search this Thread
Operating Systems Solaris space of zones need changes
# 1  
Old 08-22-2008
space of zones need changes

On one of our servers we have to zones set up on separate slices.

zone1 is on slice /dev/dsk/c1t0d0s0

zone2 is on slice /dev/dsk/c1t2d0s6

zone2 has a lot of space and zone1 is about to crash because there is
no more space.

directory is /export/zone1 and /export/zone2

How would I move space from zone2 to zone1, about 15G to move?Smilie

Code:
# uname -a
SunOS server5 5.10 Generic_118833-03 sun4v sparc SUNW,Sun-Fire-T200

# cat /etc/release
                       Solaris 10 1/06 s10s_u1wos_19a SPARC
           Copyright 2005 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                           Assembled 07 December 2005

Code:
# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c1t0d0s0       54G    52G   1.8G    97%    /
/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                   2.2G   1.0M   2.2G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
/platform/sun4v/lib/libc_psr/libc_psr_hwcap1.so.1
                        54G    52G   1.8G    97%    /platform/sun4v/lib/libc_psr.so.1
/platform/sun4v/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                        54G    52G   1.8G    97%    /platform/sun4v/lib/sparcv9/libc_psr.so.1
fd                       0K     0K     0K     0%    /dev/fd
/dev/dsk/c1t0d0s1      4.9G   227M   4.7G     5%    /var
swap                   2.2G    25M   2.2G     2%    /tmp
swap                   2.2G    80K   2.2G     1%    /var/run
/dev/dsk/c1t2d0s6       67G    46G    20G    70%    /export/zones2

# 2  
Old 08-22-2008
well.. there are a few things here. you can't "grow" the root slice. this is a limitation of growfs. is zone1 a global or non-global zone? please issue `zoneadm list` and post output.

one way you can add more space is use zonecfg to add another filesystem to this zone. push all your data to this newly added fs. if you don't have any space on the disk left, you will have to shrink other slices. you will lose all data so backup what you need. or you can simply add another disk.
# 3  
Old 08-23-2008
Code:
# zoneadm list -v
  ID NAME             STATUS         PATH
   0 global           running        /
   3 zone1           running        /export/zones/zone1
   4 zone2           running        /export/zones2/zone2

don't really want to add a disk, only if I really have too.

Actually zone1 is on disk c1t0d0 and zone2 is on disk c1t2d0 and
they are mirrored with raidctl.

What if I create a dir in global zone in zone2. Then access it
from zone1, like following?

Code:
global#mkdir /export/zones2/zone2/root/zone1
global#zonecfg -z zone1
zonecfg:app>add fs
zonecfg:app:fs>set dir=/new/space
zonecfg:app:fs>set special=/export/zones2/zone2/root/zone1
zonecfg:app:fs>set type=lofs
zonecfg:app:fs>end
zonecfg:app>commit
zonecfg:app>exit
global#

# 4  
Old 08-24-2008
It worked in a test environment.

Just need to

Code:
zoneadm -z zone1 reboot

# 5  
Old 08-24-2008
You could have just move the zone1 root altogether from the / filesystem to the /export/zones2 one then have the zone setting adjusted.

Of course, this should be done with zone1 halted.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Gawk --- produce the output in pattern space instead of END space

hi, I'm trying to calculate IP addresses and their respective calls to our apache Server. The standard format of the input is HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST IP DATE/TIME - - "GET/POST reuest" "User Agent" HOST... (2 Replies)
Discussion started by: busyboy
2 Replies

2. UNIX for Advanced & Expert Users

Need to remove leading space from awk statement space from calculation

I created a awk state to calculate the number of success however when the query runs it has a leading zero. Any ideas on how to remove the leading zero from the calculation? Here is my query: cat myfile.log | grep | awk '{print $2,$3,$7,$11,$15,$19,$23,$27,$31,$35($19/$15*100)}' 02:00:00... (1 Reply)
Discussion started by: bizomb
1 Replies

3. UNIX for Dummies Questions & Answers

Difference between space and [[:space:]] in regular expression

May I know the difference between space in keyboard and ] in regular expression I entered the following find . -type f -print | xargs grep -n 'dt=' | cut -d":" -f3 | sed 's/^ *dt=/dt=/g' After "^" there is a space. and the result is... dt=`date +%Y%m%d%H%M%S` dt=`date +%Y%m%d`... (6 Replies)
Discussion started by: bobbygsk
6 Replies

4. UNIX for Dummies Questions & Answers

Changing only the first space to a tab in a space delimited text file

Hi, I have a space delimited text file but I only want to change the first space to a tab and keep the rest of the spaces intact. How do I go about doing that? Thanks! (3 Replies)
Discussion started by: evelibertine
3 Replies

5. Fedora

Need to incrwase PHYSICAL VOLUME space on hard drive with free space on it

Hi, I run Fedora 17. I created a physical volume of 30GB on a disk with 60GB of space so there is 30GB of free space. On the physical volume, I created my volume group and logical volumes. I assigned all the space in the physical volume to my volume group. I need to add the 30GB of free space... (1 Reply)
Discussion started by: mojoman
1 Replies

6. Solaris

No space left on device but free space and inodes are available...

hi guys, me again ;) i recently opened a thread about physical to zone migration. My zone is mounted over a "bigger" LUN (500GB) and step is now to move the old files, from the physical server, to my zone. We are talking about 22mio of files. i used rsync to do that and every time at... (8 Replies)
Discussion started by: beta17
8 Replies

7. Linux

How to reclaim the space which i used to increse the swap space on Xen,

Hi, i have done a blunder here, i increased the swap space on Xen5.6 server machine using below steps :- 1056 dd if=/dev/zero of=/root/myswapfile bs=1M count=1024 1057 ls -l /root/myswapfile 1058 chmod 600 /root/myswapfile 1059 mkswap /root/myswapfile 1060 swapon /root/myswapfile ... (1 Reply)
Discussion started by: apm
1 Replies

8. Shell Programming and Scripting

Stripping out more than a space from a line, but keep single space.

Hi all, Is there a way to perform the above, I am trying to strip out more than one space from a line, but keep the single space. See below output example. My Name is test test2 test3 test4 test5 My Name is test test2 test3 test4 test5 Please note that the lines would contain... (7 Replies)
Discussion started by: eo29
7 Replies

9. Shell Programming and Scripting

Calculate total space, total used space and total free space in filesystem names matching keyword

Good afternoon! Im new at scripting and Im trying to write a script to calculate total space, total used space and total free space in filesystem names matching a keyword (in this one we will use keyword virginia). Please dont be mean or harsh, like I said Im new and trying my best. Scripting... (4 Replies)
Discussion started by: bigben1220
4 Replies

10. UNIX for Advanced & Expert Users

wake up user space thread from kernel space ISR

Hello, I'm searching for a proper way to let the kernel space ISR(implemented in a kernel module) wake up a user space thread on a hardware interrupt. Except for sending a real-time signal, is it possible to use a semaphore? I've searched it on google, but it seems impossible to share a... (0 Replies)
Discussion started by: aaronwong
0 Replies
Login or Register to Ask a Question