On Tue, Nov 27, 2001 at 10:41:42PM +0530, sanjay wrote:
> Hi,
> 
> I have following partitions and mounted as under. Now I want 
> to allocate  some  space from /dev/sda9  to /dev/sda6. Is it 
> possible to do it without shutting down the server?
> 
>   Device Boot    Start       End    Blocks   Id  System
> /dev/sda1   *         1      8841  71015301    5  Extended
> /dev/sda5             1         2     16002   83  Linux
> /dev/sda6             3       129   1020096   83  Linux
> /dev/sda7           130       179    401593+  82  Linux swap
> /dev/sda8           180       309   1044193+  83  Linux
> /dev/sda9           310      5480  41536026   83  Linux
> 
> [root@mail /]# df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/sda6             996M  940M   56M  94% /
> /dev/sda5              15M  2.9M   11M  20% /boot
> /dev/sda9              39G  684M   36G   2% /email
> /dev/sda8            1020M   32M  988M   3% /tmp
---end quoted text---

On this kind of set up it would not be possible to "expand"
any partition at the cost of another.You would have to del-
ete all partitions sda6 through sda9 and re-create them.

You would shortly be running out of space in "/". Your "/"
is too small, whereas your "/tmp" is a colossal waste with
1 GB kept for temporary data.  You  can  squeeze  out over
half a gig if you move /usr  to /dev/sda8  and  keep  your 
/tmp under "/" itself.

There is absolutely NO need for a 1 Gig /tmp ... Clear out
/tmp at every reboot through rc.local.

This type of change is a bit tricky. You  need to do it in
an unmounted state (viz after booting through a standalone
rescue disk or floppy based distro like tomsrtbt  or alfa-
linux). In a nutshell the steps are:

o Boot through stand-alone system

o Mount your current /tmp (/dev/sda8) to a mount point

o kill everything on it (rm -rf /mnt/wherever/*).

o Mount "/" at another mount point

o Move (mv) the whole of existing /usr to the mount point 
  of existing "/tmp" (/dev/sda8)

o In the mount point for "/" add a dir /tmp.
  - mkdir /mnt/wherever/tmp
  - chown root.root /mnt/wherever/tmp
  - chmod 777 /mnt/wherever/tmp  

o Change your /etc/fstab to mount /usr
  /dev/sda8    /usr  ext2   defaults   1   2

o reboot through hard-disk

Need more space .... push your /var to /dev/sda9.

If  yours  is  a mail server with lots of storage require-
ments, why play around with that ?  You can move your /var
under /email, and get some additional space at "/" ...  Or
better still, use your whole /dev/sda9 as /var  and  place
/email under it (viz "/var/email"). Method is the same.

HTH

Bish.
  
--
:
####[ Linux One Stanza Tip (LOST) ]###########################

Sub : No password login as user                      LOST #116

Fed up of typing password for every login as an user on  stand
alone boxes ? Edit /etc/login.defs.  NO_PASSWORD_CONSOLE field
should have tty names (e.g. example  below permits no password
entries for tty4,tty5 and tty6):
NO_PASSWORD_CONSOLE       tty4:tty5:tty6

####<[EMAIL PROTECTED]>####################################
:

_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to