Professional Web Applications Themes

Grow Partion or Map /usr and /var to New Partition Out of Disk Space - Linux Setup, Configuration & Administration

I have two hard disks. One has the /boot and windows the other has / .The second hard disk has all of the Linux partitions. In addition the second drive had a windows partition that I repartitioned Linux ext3. All I need really is to grow the / partition which is now 3.7 gig or add the new partition which is 4.1 gig with some mapping /usr and /var. My problem is that I don't want to reinstall Redhat 9.0 since I have everything working so I would have to copy the existing /usr and /var to the new partition ...

  1. #1

    Default Grow Partion or Map /usr and /var to New Partition Out of Disk Space

    I have two hard disks. One has the /boot and windows the other has / .The
    second hard disk has all of the Linux partitions. In addition the second
    drive had a windows partition that I repartitioned Linux ext3. All I need
    really is to grow the / partition which is now 3.7 gig or add the new
    partition which is 4.1 gig with some mapping /usr and /var. My problem is
    that I don't want to reinstall Redhat 9.0 since I have everything working
    so I would have to copy the existing /usr and /var to the new partition
    and let the operating system know where they are.

    Thanks!

    Gary Guest

  2. #2

    Default Re: Grow Partion or Map /usr and /var to New Partition Out of DiskSpace

    On Fri, 28 Nov 2003 07:22:11 -0600, Gary Heinl <net> wrote:
     

    .... to grow the current partition, you simply re-create it
    to include the new size you want. let's say you have:
    /dev/hdb1 == 3.7 gig, formatted as ext3
    /dev/hdb2 == 4.1 gig, formatted as ext3

    you want hdb1 to include (grow it) hdb2 (using fdisk):

    1) delete partition /dev/hdb2
    2) let fdisk tell you the starting cylinder # for hdb1
    3) delete /dev/hdb1
    4) create a new Linux (hdb1) partition, using the starting
    cylinder number given in (2) and for the size, give
    it the sum of 3.7+4.1 or 7.8M
    5) grow the filesystem (which already exists) on hdb1

    for a somewhat detailed overview, go here:
    http://groups.google.com/advanced_group_search?hl=en

    .... and use the following msg-id:
    Message-ID: <L25l9.38427$news.prodigy.com>

    in here, i described how a resized a reiserfs
     

    .... simply create the directories on that blank partition,
    copy the directories' contents to the newly created ones,
    then specify the entries in /etc/fstab
    ..
    --
    /// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\
    \\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" ///
    Be free and open and breezy! Enjoy! Things won't get any
    better so get used to it.
    mjt Guest

  3. #3

    Default Re: Grow Partion or Map /usr and /var to New Partition Out of Disk Space


    "Gary Heinl" <net> wrote in message
    news:net... 

    Well yeah, there are two options

    1. grow the / , using ext2resize.

    basically, the freespace (the unusued partition) has to be directly after
    the end of /

    if this is the case, or you are prepared to make this the case on your own,

    steps are
    i. use fdisk to delete the unused partition
    ii delete the / partition and recreate it with the same starting cylinder
    but taking up all the free space ...
    iii resize...




    2. or just mount the new partition at /usr, as you say


     


    yep, so how to do that ?

    mkdir /mnt/varusr
    mount /dev/hdb2 /mnt/varusr
    cd /mnt/varusr
    mkdir usr
    cd usr
    find /usr | cpio -pvdum .
    cd ..
    cd var
    find /var | cpio -pvdum .
    cd /
    mv usr u
    mv var v
    ln -s /mnt/varusr/usr usr
    ln -s /mnt/varisr/var var
    vi /etc/fstab - and put the varusr partition in
    rm -rf v u &
     


    Leon. Guest

Similar Threads

  1. Removing Linux partition from a disk???
    By Tom in forum Linux Setup, Configuration & Administration
    Replies: 7
    Last Post: November 8th, 06:38 AM
  2. partition hard disk
    By cljlk in forum Sun Solaris
    Replies: 2
    Last Post: August 14th, 09:29 AM
  3. how to know the size of a raw disk partition ?
    By Fletcher Glenn in forum UNIX Programming
    Replies: 2
    Last Post: August 11th, 12:41 PM
  4. Why Does SP1a Install Need Space on System Partition
    By Eddie in forum Windows Setup, Administration & Security
    Replies: 3
    Last Post: August 6th, 10:34 AM
  5. Disk Partition
    By S Hebbar in forum Windows XP/2000/ME
    Replies: 3
    Last Post: July 15th, 01:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139