canonical / canonical/multipass

A mounted folder appears as 1000GB inside the instance

Open
#1,706 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
9.2k
Forks
828
Avg merge
3d 1h
Merged PRs (30d)
44

Description

**Describe the bug**
I don't know if this is really a bug or 'expected' behaviour.
When I mount a folder from the host, the instance tells me the mountpoint is 1000GB in size.

**To Reproduce**
How, and what happened?
1. `mkdir $HOME/test`
2. `multipass launch lts -n mount-test`
3. `multipass mount $HOME/test mount-test:/mnt/test`
4. `multipass exec mount-test -- df -h`
```
Filesystem Size Used Avail Use% Mounted on
udev 474M 0 474M 0% /dev
tmpfs 99M 940K 98M 1% /run
/dev/vda1 4.7G 1.3G 3.5G 27% /
tmpfs 491M 0 491M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 491M 0 491M 0% /sys/fs/cgroup
/dev/vda15 105M 3.9M 101M 4% /boot/efi
/dev/loop0 30M 30M 0 100% /snap/snapd/8542
/dev/loop1 55M 55M 0 100% /snap/core18/1880
/dev/loop2 72M 72M 0 100% /snap/lxd/16558
tmpfs 99M 0 99M 0% /run/user/1000
/dev/loop3 128K 128K 0 100% /snap/bare/5
/dev/loop4 1.2M 1.2M 0 100% /snap/multipass-sshfs/134
:/home/kschneider/test 1000G 0 1000G 0% /mnt/test
```

**Expected behavior**
What did you expect to happen?
The properties of the mounted folder or filesystem will be taken over to the instance.

**Logs**
Please provide logs from the daemon, see [accessing logs](https://multipass.run/docs/accessing-logs) on where to find them on your platform.
```
Aug 25 13:50:07 multipassd[786155]: Stopping mount '/mnt/test' in instance "mount-test"
Aug 25 13:50:08 multipassd[786155]: QProcess: Destroyed while process ("/snap/multipass/2445/bin/sshfs_server") is still running.
Aug 25 13:50:08 multipassd[786155]: Mount '/mnt/test' in instance "mount-test" has stopped
Aug 25 13:50:22 multipassd[786155]: mounting /home/kschneider/test => /mnt/test in mount-test
Aug 25 13:50:22 multipassd[786155]: process program '/snap/multipass/2445/bin/sshfs_server'
Aug 25 13:50:22 multipassd[786155]: process arguments '192.168.122.51, 22, ubuntu, /home/kschneider/test, /mnt/test, 1000:-1,, 1000:-1,'
Aug 25 13:50:22 multipassd[786155]: starting: /snap/multipass/2445/bin/sshfs_server 192.168.122.51 22 ubuntu /home/kschneider/test /mnt/test 1000:-1, 1000:-1,
Aug 25 13:50:22 multipassd[793235]: Applying AppArmor policy: multipass.mount-test.adb33bbd.sshfs_server
```

**Additional info**
- OS: Pop!_OS 20.04 LTS & Ubuntu 18.04
```
$ multipass version
multipass 1.4.0
multipassd 1.4.0
```
```
$ multipass info --all
Name: mount-test
State: Running
IPv4: 192.168.122.51
Release: Ubuntu 20.04.1 LTS
Image hash: 896d13fcadd1 (Ubuntu 20.04 LTS)
Load: 0.00 0.00 0.00
Disk usage: 1.2G out of 4.7G
Memory usage: 138.7M out of 981.2M
Mounts: /home/kschneider/test => /mnt/test
UID map: 1000:default
GID map: 1000:default
```

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the documented mkdir, launch, mount, and df -h commands, then review the daemon logs and sshfs_server arguments shown in the issue. Compare the mounted filesystem size with the host folder and determine whether the behavior is a bug or expected; done means the result is corrected or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
infrastructure, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.