7 Replies Latest reply: Oct 23, 2012 2:20 PM by Apostolis RSS

    How to increase disk space

    Apostolis
      Hello,

      I downloaded the Enterprise Java Development VM from the Pre-Built Developer VMs (http://www.oracle.com/technetwork/community/developer-vm/index.html) which has the Oracle Linux 5 OS.

      After some days of using it, on of the partitions does not have any free space. Here is the result of df -all -h:

      [root@localhost oracle]# df -all -h
      Filesystem Size Used Avail Use% Mounted on
      /dev/mapper/VolGroup00-LogVol00
      6.7G 6.1G 228M 97% /
      proc 0 0 0 - /proc
      sysfs 0 0 0 - /sys
      devpts 0 0 0 - /dev/pts
      /dev/sda1 99M 12M 82M 13% /boot
      tmpfs 754M 0 754M 0% /dev/shm
      /dev/sdb1 7.9G 1.9G 5.7G 25% /labs
      none 0 0 0 - /proc/sys/fs/binfmt_misc
      sunrpc 0 0 0 - /var/lib/nfs/rpc_pipefs


      Clearly, the filesystem /dev/mapper/VolGroup00-LogVol00 does not have much space left.

      Is there a way I can increase it?

      Kind regards,
      Apostolis
        • 1. Re: How to increase disk space
          bigdelboy
          Apostolis wrote:
          Hello,

          I downloaded the Enterprise Java Development VM from the Pre-Built Developer VMs (http://www.oracle.com/technetwork/community/developer-vm/index.html) which has the Oracle Linux 5 OS.

          After some days of using it, on of the partitions does not have any free space. Here is the result of df -all -h:

          [root@localhost oracle]# df -all -h
          Filesystem Size Used Avail Use% Mounted on
          /dev/mapper/VolGroup00-LogVol00
          6.7G 6.1G 228M 97% /
          proc 0 0 0 - /proc
          sysfs 0 0 0 - /sys
          devpts 0 0 0 - /dev/pts
          /dev/sda1 99M 12M 82M 13% /boot
          tmpfs 754M 0 754M 0% /dev/shm
          /dev/sdb1 7.9G 1.9G 5.7G 25% /labs
          none 0 0 0 - /proc/sys/fs/binfmt_misc
          sunrpc 0 0 0 - /var/lib/nfs/rpc_pipefs


          Clearly, the filesystem /dev/mapper/VolGroup00-LogVol00 does not have much space left.

          Is there a way I can increase it?

          Kind regards,
          Apostolis
          I confess to not knowing the details of your VM manager ..... however I think you have the following approaches:

          (1) Try to understand what is increasing in the root ( /) fileystem .... are things being written their that should be goiing under labs ?
          ( Can you move something to /labs ?? ).

          (2) Expand VolGroup00 if there is space on the underlying virtual disk.
          --- expand the underlying virtual disk if possible.

          (3) Add an additional virtual disk to VolGroup00


          I cant judge which of these are possible for you and which is the best. Others may know better
          • 2. Re: How to increase disk space
            Apostolis
            Hey,

            Thank you so much for your answer.

            1) I would appreciate a solution that does not require for me to move any files.

            2) I expanded the underlying virtual disk but the filesystem size didn't change.

            3) Could you please let me know how could I add a new virtual disk to VolGroup00?

            Thank you.

            Regards,
            Apostolis
            • 3. Re: How to increase disk space
              Catch-22
              To add more space to a LVM volume group you can try the following:

              Add a new disk to your system (virtual or real) and create a new partition:

              <pre>
              # fdisk /dev/sdb

              Create a new primary partition (/dev/sdb1) and mark it with hex code 8e (linux lvm)
              (n p 1 enter enter t 8e w)

              then:

              # vgextend /dev/VolGroup00 /dev/sdb1
              # lvextend -L+19G /dev/VolGroup00/LogVol00
              # resize2fs /dev/VolGroup00/LogVol00
              </pre>
              • 4. Re: How to increase disk space
                Apostolis
                Hello,

                I log in as root and I try to run the above-mentioned commands (disk, vgextend, lvextend, resize2fs) but they are not found.

                Should I install a software in order to get these commands?

                Regards,
                Apostolis
                • 5. Re: How to increase disk space
                  bigdelboy
                  Apostolis wrote:
                  Hello,

                  I log in as root and I try to run the above-mentioned commands (disk, vgextend, lvextend, resize2fs) but they are not found.

                  Should I install a software in order to get these commands?

                  Regards,
                  Apostolis
                  I am doing a quick answer while not being at a linux machine.

                  These commands are likely to be in /usr/sbin

                  ie ... does /usr/sbin/fdisk work ?

                  Also if you got to root via 'su root' rather than 'su - root' that might be your problem.

                  These comments are a quick guess and I welcome a better suggestion.
                  • 6. Re: How to increase disk space
                    Catch-22
                    You need to login as root, password welcome1. Then open Terminal from the Applications/Accessories menu. You can type the commands as shown. No additional software needs to be installed.
                    • 7. Re: How to increase disk space
                      Apostolis
                      Thank you all for your help!

                      Regards,
                      Apostolis