Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extend /var

Status
Not open for further replies.

ntruby

Technical User
Jan 9, 2005
9
GB
SunOS xxxsrv01 5.9 Generic_117171-07 sun4u sparc SUNW,UltraAX-i2
I have 2 internal disks identically formatted and mirroed using Sun Volume Manager.

This system has been set up with a ridiculously small /var. Also the remaining disk after /var has all been used. But even if I reduce slice 6, which just has a load of soft partitions in it, so that it leaves some free space immediately after the end of slice 1 (/var), how can I safely extend /var into the newly-created free space?

Thanks
Neil

# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 2181903 1815591 322674 85% /
/proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
/dev/md/dsk/d2 67639 44213 16663 73% /var
swap 691864 40 691824 1% /var/run
swap 691824 0 691824 0% /tmp
/dev/md/dsk/d104 481135 1041 431981 1% /usr2
/dev/md/dsk/d103 721711 37376 626599 6% /cmh
/dev/md/dsk/d102 721711 293503 370472 45% /opt/informix
/dev/md/dsk/d101 10324172 6265558 3955373 62% /export/home
/dev/md/dsk/d105 1985327 1096013 829755 57% /var/informix
# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
0. c0t0d0 <ST340824A cyl 19156 alt 2 hd 16 sec 255>
/pci@1f,0/ide@d/dad@0,0
1. c0t2d0 <ST340016A cyl 19156 alt 2 hd 16 sec 255>
/pci@1f,0/ide@d/dad@2,0
Specify disk (enter its number): 0
selecting c0t0d0
[disk formatted, no defect list found]

FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
show - translate a disk address
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
save - save new disk/partition definitions
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> ver
Primary label contents:
Volume name = < >
ascii name = <ST340824A cyl 19156 alt 2 hd 16 sec 255>
pcyl = 19158
ncyl = 19156
acyl = 2
nhead = 16
nsect = 255
Part Tag Flag Cylinders Size Blocks
0 root wm 258 - 1349 2.12GB (1092/0/0) 4455360
1 var wm 1350 - 1385 71.72MB (36/0/0) 146880
2 backup wm 0 - 19155 37.27GB (19156/0/0) 78156480
3 unassigned wu 1 - 5 9.96MB (5/0/0) 20400
4 unassigned wm 6 - 10 9.96MB (5/0/0) 20400
5 swap wm 11 - 257 492.07MB (247/0/0) 1007760
6 unassigned wm 1386 - 19155 34.57GB (17770/0/0) 72501600
7 unassigned wm 0 0 (0/0/0) 0
 
This is managed by Solaris Volume Manager (previously Solaris Disk Suite), right? You need to read up on growfs in the docs at sunsolve.

An alternative might be to create a directory on slice 6, copy the contents of /var to it and then link it to /var, thus increasing the space available without altering any of the slice sizes. Note that this is a fudge and might cause problems if you some to upgrade/reinstall at some stage.
 
It is a strange set-up, including where swap (also small) has it's cyclinders. I'd be tempted to rebuild if at all possible, I'm not sure about playing around with /var though while system is up. Single user mode at least.

However As Ken says slice 6 is a possiblity and we assume it is unused and not mounted. You could simply by using format, increase cyclinder range from 1350-1385 (as it stands)to again start at 1350 and end at say 2000. Then relabel Y. I have done this in the past but not on /var.

 
Strange layout. I really doesn't matter the slice name, as long as the cylinders are where they belong. For example, slice 7 coulde be cylinders 0-1000 and slice 6 could be 1001-1200. That wouldn't be any different than 0 and 1 because the slice name doesn't mean anything as I said, just the cylinders. Makes for a hard deciphering though.

I would guess your soft partitions are on slice 6. The best thing to do would be a backup, repartition the disk, then restore.

Where are the state databases?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top