VirtualBox

Ticket #4154 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

OpenSolaris Guest Shared Folders - no space left on device => Fixed in SVN

Reported by: seiryu Owned by:
Priority: major Component: guest additions
Version: VirtualBox 2.2.4 Keywords: shared folders
Cc: Guest type: Solaris
Host type: Mac OS X

Description

Host OSX 10.5.7
Guest OpenSolaris 2009.06
Vbox 2.2.4

I setup 3 shared folders and mounted them via /etc/vfstab:

_Outbox		-		/host/outbox	vboxfs	-	yes	uid=101,gid=10
Downloads	-		/host/downloads	vboxfs	-	yes	uid=101,gid=10
Sun		-		/host/sun	vboxfs	-	yes	uid=101,gid=10

Did a few mount/unmount while I was getting this setup.

Not seeing any issues with /host/outbox, however the 2nd and 3rd mounts are showing problems. Attempts to access resulting in errors as below.

root@kelekona-vb:/# cp /etc/vfstab /host/downloads  

From host deleted the copied vfstab file after viewing it

root@kelekona-vb:/# ls /host/downloads/*.pkg
ls: cannot access /host/downloads/*.pkg: No such file or directory

There are files that match this pattern

root@kelekona-vb:/# ls /host/downloads
ls: reading directory /host/downloads: No space left on device
root@kelekona-vb:/# ls /host/downloads
ls: reading directory /host/downloads: No space left on device
root@kelekona-vb:/# umount /host/downloads
root@kelekona-vb:/# df -h
Filesystem            Size  Used Avail Use% Mounted on
rpool/ROOT/opensolaris-1
                       13G  4.3G  8.1G  35% /
swap                  632M  320K  632M   1% /etc/svc/volatile
/usr/lib/libc/libc_hwcap1.so.1
                       13G  4.3G  8.1G  35% /lib/libc.so.1
swap                  632M   20K  632M   1% /tmp
swap                  632M   48K  632M   1% /var/run
rpool/export          8.1G   19K  8.1G   1% /export
rpool/export/home     8.1G   19K  8.1G   1% /export/home
rpool/export/home/kbrucker
                      8.2G   65M  8.1G   1% /export/home/kbrucker
rpool                 8.1G   75K  8.1G   1% /rpool
_Outbox               112G   90G   23G  80% /host/outbox
Sun                   112G   90G   23G  80% /host/sun
root@kelekona-vb:/# mount /host/downloads
root@kelekona-vb:/# ls /host/downloads
ls: reading directory /host/downloads: No space left on device
root@kelekona-vb:/# ls /host/sun
ls: reading directory /host/sun: Invalid argument
root@kelekona-vb:/# ls /host/outbox
About.txt  ...

Tried rebooting the guest and errors on /host/downloads and /host/sun persisted.

Powered off VM and re-launched VirtualBox on host to boot fresh with no change in behavior. Looks like only one shared folder is working.

Attaching vbox.log for the initial session.

Attachments

VBox.log Download (70.2 KB) - added by seiryu 5 years ago.
vbox.sf.sol.readdir.patch Download (10.7 KB) - added by foobar42 4 years ago.
Fix out-of-space errors when listing large directories.
vbox.sf.sol.readdir_perf.patch Download (3.7 KB) - added by foobar42 4 years ago.
Improve performance of readdir. Instead of reading one directory entry at a time (i.e. making one guest call per entry) we read in whole chunks at a time. This speeds up the operation by 10 to 20 times.

Change History

Changed 5 years ago by seiryu

comment:1 Changed 5 years ago by seiryu

I've been working on this more - it appears that the errors are in some way associated with the target folders. If I try to only mount the shared folder I have mapped as "Sun", I consistently get the "Invalid Argument" error. Further, if I move the folder into the mapped "_Outbox" folder and try to read it, I get the same error. Vbox.log is not showing any errors.

I believe I've isolated the cause of the invalid arg error. The target folder contains a symlink that has an embedded space character. If the symlink is removed, the folder access works.

I suspect the 'no space' error is due to the directory having a large number of files. The target directory has ~300 files, some with reasonably long file names.

ls -l on the target directory from the OSX side:

drwx------+ 300 ken  staff  10200 Jun  2 07:46 /Users/ken/Downloads

comment:2 Changed 5 years ago by bruff

I'm seeing this with VBox 3.0.2, OS X and OpenSolaris 6 2009 as well.

comment:3 Changed 4 years ago by jglick

I also got "invalid argument" listing a mount which contained a broken symlink (pointed to nonexistent file). Once I removed the symlink the problem went away.

comment:4 Changed 4 years ago by jglick

The symlink issue might just be a symptom of Ticket #818.

comment:5 Changed 4 years ago by bjh

I'm seeing the "No space left on device" error still when I try to view a directory with a couple of hundred files in it.

VirtualBox v3.1.8
Guest OpenSolaris 2009.06 with current guest additions installed.
Host Ubuntu Lucid 32 bit, Intel Core 2 Duo.

comment:6 Changed 4 years ago by scott_barrett

I'm also seeing the "No space left on device" on an OpenSolaris guest when trying to list a directory with 250+ files in it. I can ls or cat a file that I know exists and see it, but listing the directory fails. On a Solaris 10 guest, there is no report of no space left, but the listing failure (and ability to access a file in the directory directly) is the same. A Fedora guest has no such problem with the same shared folder.

In my test folder I have 256 0-length files with names of the form "000001" to "00000256". If I remove a leading zero from each file name, I can successfully list the directory in both solaris guests.

VirtualBox 3.2.4 on Mac OS X 10.5.8 host.

Changed 4 years ago by foobar42

Fix out-of-space errors when listing large directories.

comment:7 Changed 4 years ago by foobar42

Some more info on the fix:

The existing code would fail if the full directory listing could not fit in the buffer passed to the first readdir call. The change here implements the same idea as the linux guest code does: on the first readdir call the full directory list is read into a dynamically allocated buffer (actually a list of buffers), and the readdir calls then copy from this buffer; the buffer is freed when the vnode is closed. This buffer contains dirent_t entries, rather than some slightly more compact list-of-names, because readdir provides the offset as a byte offset in a conceptual array of dirent_t's, and hence we can find our place much easier and faster if we keep actual dirent_t entries around.

Changed 4 years ago by foobar42

Improve performance of readdir. Instead of reading one directory entry at a time (i.e. making one guest call per entry) we read in whole chunks at a time. This speeds up the operation by 10 to 20 times.

comment:8 Changed 4 years ago by ramshankar

  • Summary changed from OpenSolaris Guest Shared Folders - no space left on device to OpenSolaris Guest Shared Folders - no space left on device => Fixed in SVN

The patches from foobar42 fixes this problem and will be available as part of the next release.

comment:9 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use