The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Increasing File system rosyblue SUN Solaris 1 06-21-2007 10:56 AM
increase root file system size in solaris sriram.s SUN Solaris 4 04-02-2007 04:28 AM
Help on increasing fs size kingsto88 HP-UX 5 02-11-2007 07:37 AM
Increasing File Size on AIX Rosie C AIX 1 05-12-2006 05:25 AM
increasing file system big123456 UNIX for Advanced & Expert Users 1 10-25-2005 12:16 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-29-2005
BG_JrAdmin BG_JrAdmin is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 141
increasing ufs file system size in solaris

How do i increase the filesystem size on a root partition?

There is a slice with root on it, its like 2 gigs and nothing else is broken out except home.

I want to increase root filesystem (and slice) and break out /usr and /var.
This is solaris 9, only has solaris volume manager on it.

This system has 2 disks on it, the 2nd disk is not used at this point so i can use it for a swap space so to speak.

anyone care to point me in the right direction?
Thanks!
  #2 (permalink)  
Old 11-30-2005
rhfrommn rhfrommn is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2003
Location: Minnesota
Posts: 424
I think you are out of luck unfortunately. UFS filesystems generally can't be grown. I believe your only choice would be to make a full backup, reinstall solaris laying out the filesystems how you want, then restore from your backup.

If you are using Solaris disksuite you might be able to get around that limitation, but I don't know how. I know with Veritas Volume Manager you can increase a volume and filesystem on the fly. But even then, if it is your encapsulated root volume it is an awfully painful process.
  #3 (permalink)  
Old 11-30-2005
pressy's Avatar
pressy pressy is offline Forum Staff  
solaris cultist
  
 

Join Date: Aug 2003
Location: Vienna / Austria (Europe) [EARTH]
Posts: 726
Exclamation

Quote:
I think you are out of luck unfortunately. UFS filesystems generally can't be grown. I believe your only choice would be to make a full backup, reinstall solaris laying out the filesystems how you want, then restore from your backup.
sry, but that's not true:

see:
Code:
root@jumpy # df -h /testing
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0t2d0s0      240M    65M   150M    31%    /testing
root@jumpy # 
root@jumpy # metainit -f d80 1 1 /dev/dsk/c0t2d0s0
d80: Concat/Stripe is setup
root@jumpy # umount /testing
root@jumpy # mount /dev/md/dsk/d80 /testing
root@jumpy # df -h /testing
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d80        240M    65M   150M    31%    /testing
root@jumpy # metattach d80 /dev/dsk/c0t2d0s1
d80: component is attached
root@jumpy # df -h /testing
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d80        240M    65M   150M    31%    /testing
root@jumpy # growfs -M /testing /dev/md/rdsk/d80
/dev/md/rdsk/d80:       16785120 sectors in 4114 cylinders of 16 tracks, 255 sectors
        8195.9MB in 258 cyl groups (16 c/g, 31.88MB/g, 15296 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 65568, 131104, 196640, 262176, 327712, 393248, 458784, 524320, 589856,
 16191520, 16257056, 16322592, 16388128, 16453664, 16519200, 16584736,
 16650272, 16711712, 16777248,
root@jumpy # df -h /testing
Filesystem             size   used  avail capacity  Mounted on
/dev/md/dsk/d80        7.5G    72M   7.4G     1%    /testing
root@jumpy #
you see? disksuite is complicated, but mighty.... if you are dealing with root partitions it's a pit more sophisticated. i am not sure if it will work to make a concat on the root partitions, never tried it, but i think it won't work. depending on how big your /export/home is you could dump it somewhere to, repartion your harddisk and increase the number of blocks for your root partition with the "format" menue, let the rootslice grow with "growfs", make a new fs on /export/home and restore the dump. i could imagine many ways to do it, e.g. you could use your second disk for /export/home, use the solaris feature to use a file for swapping (could be changed on the fly) and make new partitions on the 2nd disk and restore the system configuration...

but to be honest, if you are not used with solaris, it would be the easiest way for you to reinstall the system, sry

Quote:
Just Ice
also a way to do it, i like your script... but on that, you would need a downtime.... belongs to you


regards
PRESSY

Last edited by pressy; 11-30-2005 at 01:44 PM..
  #4 (permalink)  
Old 11-30-2005
Just Ice's Avatar
Just Ice Just Ice is offline Forum Advisor  
Lights on, brain off.
  
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 637
pressy --- thanks for the compliment but that script is a hack of a hack of a hack (and so on and so forth) and not mine completely ...

anyways, the reformat and the data copies into the 2nd drive can be done during normal working hours with the reboot waiting until after the users are off the system ... i would suggest trying that option first --- maybe there's no need to reinstall the os at all ...
  #5 (permalink)  
Old 11-30-2005
Just Ice's Avatar
Just Ice Just Ice is offline Forum Advisor  
Lights on, brain off.
  
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 637
Code:
if the 2nd drive is empty or reconfigurable --- 

1. partition the 2nd drive into the setup you want to be the final layout

2. newfs all the new data partitions on the 2nd drive

3. copy all the data over from the 1st drive to it's new home on the 2nd drive


if you plan on booting up the 2nd drive as another boot device ---

1. install boot block on / partition of 2nd drive

2. edit /etc/vfstab on 2nd drive to reflect correct disk devices for mounting


if you plan on physically swapping drives ---

1. install boot block on / partition of 2nd drive

2. power off system, swap drives in slot0 and slot1, and boot
... for your first time doing this, i suggest you try to boot the 2nd drive as an alternate boot device as failure of that drive to boot means you missed a step and swapping drives will not make it work any better ...

anyways, i've found through the years that having the / filesystem include everything gave me much more flexibility than breaking out some of it's components --- i.e., the unused spaces in /home, /usr and /var are easily reclaimed if i need more space in /, i can create as many directories as i want without resorting to creative symlinks all over the place, etc. ...

however, there are times i'd at least want some of the sub-directories broken off --- i.e., /var should be it's own filesystem if there is a massive amount of system log activity or if the server is a mail server, /home should be it's own filesystem if you want to contain and enforce quotas on user data, etc.

you need to figure out how you folks want to support the server and how the server is going to be used in the long term so you'll know your better if you want to split out sub-directories into their own filesystems ...

for pointers on intra-disk copies see this script
  #6 (permalink)  
Old 11-30-2005
BG_JrAdmin BG_JrAdmin is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 141
ufsdump | ufsrestore disk to disk

Can you do a ufsdump | ufsrestore disk to disk on different size slices conatining root?

source root partition which contains usr, var, and /. and is 2GB size.
If I do a ufsdump | ufsrestore to the new disk, and then make it boot from the new disk. will this work?
  #7 (permalink)  
Old 12-01-2005
pressy's Avatar
pressy pressy is offline Forum Staff  
solaris cultist
  
 

Join Date: Aug 2003
Location: Vienna / Austria (Europe) [EARTH]
Posts: 726
yes you can, if your original has 2g and the new partitions has more it doesn't matter...

gP
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:31 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0