I am using Solaris on a VirtualBox image. The image has 16.00 GB as virtual size and 6.69 GB as actual size. The disk is full. Why in Solaris I see a 6GB disk and not a 16GB disk? Is there a way to extend it instead of configuring another disk?

UPDATE: Solaris disks

Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0d0s0        6.4G   5.7G   703M    90%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   709M   952K   708M     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
                   6.4G   5.7G   703M    90%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
swap                   708M    80K   708M     1%    /tmp
swap                   708M    24K   708M     1%    /var/run
/dev/dsk/c0d0s7        8.8G   8.9M   8.7G     1%    /export/home

-bash-3.00$ cat vfstab
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c0d0s1 -       -       swap    -       no      -
/dev/dsk/c0d0s0 /dev/rdsk/c0d0s0        /       ufs     1       no      -
/dev/dsk/c0d0s7 /dev/rdsk/c0d0s7        /export/home    ufs     2       yes     -
/devices        -       /devices        devfs   -       no      -
sharefs -       /etc/dfs/sharetab       sharefs -       no      -
ctfs    -       /system/contract        ctfs    -       no      -
objfs   -       /system/object  objfs   -       no      -
swap    -       /tmp    tmpfs   -       yes     -
  • Is the disk full or is is just a partition that is full. Can you edit your question and add the output of df -h please? – Iain Feb 3 '11 at 12:33

You have one disk in the system /dev/dsk/c0d0. This disk has two partitions

/dev/dsk/c0d0s0 which is 6.4G and is 90% used.


/dev/dsk/c0d0s7 which is 8.8G and is 1% used

The total size of the 2 partitions is 15.2G which is pretty much the 16G of the vdisk your system is built on.

You may want to review how/where you are storing your data so it can be placed on the effectively empty partition.

  • This is slightly more complex. The disk has one Solaris partition spanning the whole disk (c0d0p1) and that partition contains at least 5 slices (s0,s1,s7,s8 and s9), three of which are of significant size (6.4, 8.8 and 0.7 G). – jlliagre Feb 3 '11 at 23:18

Your image seems to be compressed. Yes, you can extend it, but extending involves converting your image to raw format using this command:

VBoxManage clonehd -format RAW image.vdi image.raw

If your host system is Linux, you will be able to extend a raw image like this:

dd if=/dev/zero of=add.raw bs=1024 count=0 seek=10000000

cat add.raw >> image.raw

rm add.raw

At this point you will get your extended image in a raw format, you should convert it back:

VBoxManage convertfromraw image.raw image.vdi

You should resize your partition to fit an unpartitioned space then. I usually use a GParted bootable iso image for that. You should configure your VM to boot from the GParted image and perform the resize from GParted interface then. I'm not sure GParted can resize Solaris partitions.

  • I am using Solaris – rtacconi Feb 3 '11 at 12:36
  • I think @Alex is talking about the host and @rtacconi is talking about the guest? Maybe rtacconi is running solaris for both? – Bart Silverstrim Feb 3 '11 at 12:47
  • Solaris commands should be basically the same, not sure if dd supports seek parameter under Solaris, you can use dd if=/dev/zer0 of=add.raw bs=1024 count=10000000 if it does not. It will take some time since this command creates a 10G file on disk. You can use a lower count value if it is enough for you. – Alex Feb 3 '11 at 12:48
  • Yes my host is mac osx and guest solaris... sorry – rtacconi Feb 3 '11 at 12:49
  • The file is a vmdk not vdi – rtacconi Feb 3 '11 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.