Re: Grow Filesystems Dynamically

From: Vlad (vgrama_at_yahoo.com)
Date: 06/02/04


Date: 2 Jun 2004 01:03:04 -0700

Hi,

Indeed you can grow the / filesystem without VxVM or SDS.

The prerequisites are:
-> to have unused space on the disk that contains the / slice AFTER
the / slice
   if you only have space before the / file system that's of no use

-> the filesystem must be locked (see lockfs) while being grown. I
didn't
   try with root fs so don't know if it can be locked while being
mounted
   if not then you must boot from CDROM to grow it

How you can do it:
1) make a copy of your VTOC with prtvtoc "/dev/rdsk/c_t_d_s2" so that
if you
   make a mistake while using format you can get back to a working
config

2) with format chose the appropriate disk, then "partition" and then
modify
   the / slice by choosing its number. leave the start cylinder as it
is
   and specify a bigger size.

3) save the new VTOC and check if all UFS filesystems on the system
disk can be
   mounted (if they can't and they could before then you probably did
something
   wrong with format and you must relabel the disk with the good VTOC
saved
   in 1)

4) if all ok now you can grow the / file system to the size of the
slice
   using growfs (see the man page)

Anyone would probably tell you that if you have important data on the
system disk we're talking about you should first back up all it's
filesystems up.

Also you usually don't happen to have space after the / partition. One
could shrink the swap in order to gain some space. But the swap is at
the beginning of the disk so that's no use in this case either.

Good luck,
Vlad Grama.

powere2e@yahoo.com (Life Learner) wrote in message news:<f966c546.0406011700.5e26f1c@posting.google.com>...
> hi,
>
> I am wondering on Solaris is it possible to expand filesystems
> INCLUDING / when they are mounted (in use) without the help of SDS or
> VxVM, I think it is not possible, but an experienced Solaris guy said
> he could do this by simply repartitioning the corresponding
> partition(providing that there is room adjacent to it) and then
> growing the filesystem via an undocumented function of newfs. This
> makes me very confused, can this be done safely on a production box
> even when the filesystem is in use? especially for root?
>
> Thank you very much.



Relevant Pages

  • Re: partially encrypted filesystem
    ... > Of course down to the file system - in this sense. ... > filesystem is optimized to deal nicely with that. ... > which would be less likely to cause massive disk fragmentation. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • growfs on existing metadevice
    ... I need to increase the size of a file system on a Solaris 9 server. ... filesystem is apparently a metadevice, ... newfs the slice I just created above with: ...
    (comp.unix.solaris)
  • Re: Do Linux hard drives need to be defragmented? Thanx in advance
    ... >> If you have a single user single tasking OS it is relatively ... >> sequentially located on the disk for minimum access time will ... > If a file system has run 95% full for a substantial amount of write ... If a filesystem gets to being 95% full, you're in trouble, regardless. ...
    (comp.os.linux.hardware)
  • Re: what to do about "cannot dump to dumpdev hd(1/41): space for
    ... Divvy looks the same, the same 3 bad blocks were complained about when I added the disk with mkdev hd the first time, when I do fsck -ofull on /dev/part4 and /dev/part5 they both have the same warning about the filesystem being larger than the filesystem it is currently in etc. so at this point it looks like a good copy of the original disk. ... This box controls a huge mail sorting machine and apparently the SCO box went down right after they bought it. ... file system is located on. ...
    (comp.unix.sco.misc)
  • Re: usb flash disk, ext3 file systems, enforcing rights, security
    ... I thought I could fix that by putting on an ext3 file system. ... encrypting with a gpg signature, I'm stumped on what I should do. ... Can you put an encrypted file system on a usb flash disk? ... I've not tried creating a new filesystem on a flash drive, but I know my boss reformatted one on his Mac, with the result I couldn't read it on Windows. ...
    (Fedora)