3

How can I solve this problem: I have four drive in VirtualBox like below but I want to increase my first partition.

my partition screenshot

dspace@ubuntu:/build/dspace-5.5-src-release$ sudo mvn -U package
[sudo] password for dspace: 
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] DSpace Parent Project
[INFO] DSpace Services Framework :: API and Implementation
[INFO] DSpace Kernel :: API and Implementation
[INFO] DSpace Addon Modules
[INFO] DSpace Kernel :: Additions and Local Customizations
[INFO] DSpace XML-UI (Manakin)
[INFO] DSpace XML-UI (Manakin) :: Local Customizations
[INFO] DSpace JSP-UI
[INFO] DSpace JSP-UI :: Local Customizations
[INFO] DSpace RDF
[INFO] DSpace RDF :: Local Customizations
[INFO] DSpace REST :: API and Implementation
[INFO] DSpace REST :: Local Customizations
[INFO] DSpace SWORD
[INFO] DSpace SWORD :: Local Customizations
[INFO] DSpace SWORD v2
[INFO] DSpace SWORD v2 :: Local Customizations
[INFO] Apache Solr Webapp
[INFO] DSpace SOLR :: Local Customizations
[INFO] DSpace OAI-PMH
[INFO] DSpace OAI-PMH :: Local Customizations
[INFO] DSpace Assembly and Configuration
[INFO] DSpace XML-UI Mirage2 Theme
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building DSpace Parent Project 5.5
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.2:enforce (enforce-maven) @ dspace-parent ---
[INFO] 
[INFO] --- maven-antrun-plugin:1.7:run (native2ascii-utf8) @ dspace-parent ---
[INFO] Executing tasks

Encode any UTF-8 chars in properties:
[INFO] Executed tasks
[INFO] 
[INFO] --- maven-assembly-plugin:2.4.1:single (default) @ dspace-parent ---
[INFO] Reading assembly descriptor: src/main/assembly/testEnvironment.xml
[INFO] Processing sources for module project: org.dspace:dspace-services:jar:5.5
[INFO] Processing sources for module project: org.dspace:dspace-api:jar:5.5
[INFO] Processing sources for module project: org.dspace:dspace-xmlui:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-jspui:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-rdf:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-rest:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-sword:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-swordv2:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-solr:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace-oai:war:5.5
[INFO] Processing sources for module project: org.dspace:dspace:pom:5.5
[INFO] Processing sources for module project: org.dspace:dspace-xmlui-mirage2:war:5.5
[INFO] Processing sources for module project: org.dspace:modules:pom:5.5
[INFO] Processing sources for module project: org.dspace:dspace-api:jar:5.5
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] DSpace Parent Project ............................. FAILURE [7.832s]
[INFO] DSpace Services Framework :: API and Implementation  SKIPPED
[INFO] DSpace Kernel :: API and Implementation ........... SKIPPED
[INFO] DSpace Addon Modules .............................. SKIPPED
[INFO] DSpace Kernel :: Additions and Local Customizations  SKIPPED
[INFO] DSpace XML-UI (Manakin) ........................... SKIPPED
[INFO] DSpace XML-UI (Manakin) :: Local Customizations ... SKIPPED
[INFO] DSpace JSP-UI ..................................... SKIPPED
[INFO] DSpace JSP-UI :: Local Customizations ............. SKIPPED
[INFO] DSpace RDF ........................................ SKIPPED
[INFO] DSpace RDF :: Local Customizations ................ SKIPPED
[INFO] DSpace REST :: API and Implementation ............. SKIPPED
[INFO] DSpace REST :: Local Customizations ............... SKIPPED
[INFO] DSpace SWORD ...................................... SKIPPED
[INFO] DSpace SWORD :: Local Customizations .............. SKIPPED
[INFO] DSpace SWORD v2 ................................... SKIPPED
[INFO] DSpace SWORD v2 :: Local Customizations ........... SKIPPED
[INFO] Apache Solr Webapp ................................ SKIPPED
[INFO] DSpace SOLR :: Local Customizations ............... SKIPPED
[INFO] DSpace OAI-PMH .................................... SKIPPED
[INFO] DSpace OAI-PMH :: Local Customizations ............ SKIPPED
[INFO] DSpace Assembly and Configuration ................. SKIPPED
[INFO] DSpace XML-UI Mirage2 Theme ....................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.755s
[INFO] Finished at: Mon Sep 18 04:25:53 EDT 2017
[INFO] Final Memory: 13M/45M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.4.1:single (default) on project dspace-parent: Failed to create assembly: Error filtering file '/build/dspace-5.5-src-release/dspace/config/dspace.cfg': No space left on device -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Note: I've oracle virtualBox guest with 4 GB hard-disk

How can I increase the disk size of the virtualBox guest?

Yaron
  • 13,173

2 Answers2

4

The error in your log says:

[ERROR] Failed to execute goal \
org.apache.maven.plugins:maven-assembly-plugin:2.4.1:single (default) \
on project dspace-parent: \
Failed to create assembly: \
Error filtering  file '/build/dspace-5.5-src-release/dspace/config/dspace.cfg': \
No space left on device

Which means that you should remove un-needed files from your disk in order to free space for this program.

You can find the problematic areas on your disk using df -h which will show the amount of disk usage by each partition.

This Ask Ubuntu Q&A explain how to increase the hard-disk size of a VirtualBox guest machine.

Zanna
  • 70,465
Yaron
  • 13,173
2

Note that you have 2GB for the /, 1GB for swap, other 2GB for /var and 16GB for /home. Basically you have assigned 2GB for all the operating system, installed programs and, apparently, the /build directory you are using to compile the dspace project.

You may check the free space in each partition using df -h. It is possible that the root has 100% used while you have some free space at /home.


I think you want to resize the / partition. However, it may be not the solution.

  • Resize the partition: You can resize a partition only if you have free space adjacent to the partition. It is possible that / be adjacent to the swap. Then, you may try to boot a LiveCD and use gparted or another tool to remove the swap partition and resize the /. However, you will get only 1GB and you will need a new swap partition.
  • Expand the hard disk, resize the partition and create a new swap partition: You can resize the hard disk, delete the swap, resize the / and create a new swap partition in the remaining space. However, you will get only 1GB more for the root.

Instead of these solutions, there are other solutions you may consider:

  • Expand the hard disk and create a new partition for root: You can resize the hard disk, create a new partition with the free space, move the files from / to the new partition, change the /etc/fstab to mount the new partition as root and configure the boot partition.
  • Add a new hard disk and move your data there: You can add a new virtual disk to the VM, create a set of partitions with a better layout/sizes, move the data there, and configure the boot partition. You can remove later the old virtual disk, or use it as an additional disk.
  • Add a new hard disk and create a data partition there: You can add a new virtual disk to the VM, create a new partition there and move files and folders to there. For instance, you can move the /build directory to the new disk and create a symbolic link to access these folder as usual.
  • Move files to the home partition: For instance, you can move the /build directory (and some others) from the root to the /home partition. For instance to a /home/build folder. You can create a symbolic link to access the resulting folder using the previous /build path.

    $ sudo mv /build /home/.           # move /build to the other partition
    $ sudo ln -s /home/build /build    # create a symbolic link
    

I think that Adding a new disk and moving the data there is the best solution at long term. You will have a better organized disk. However, if you need a solution right now, you may try to move the files to the home partition.

Jaime
  • 1,420