Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount directories directly into $HOME #65

Merged
merged 4 commits into from
Apr 2, 2024
Merged

Mount directories directly into $HOME #65

merged 4 commits into from
Apr 2, 2024

Conversation

fkorotkov
Copy link
Contributor

After introducing of cirruslabs/tart#733 we can use different VirtioFS tags for different directories and precisely mount them into exact locations.

/Volumes/My Shared Files/ default path is error-prone since some tools don't like whitespaces in paths. With this change directories will be directly mounted into $HOME.

Fixes #64

After introducing of cirruslabs/tart#733 we can use different VirtioFS tags for different directories and precisely mount them into exact locations.

`/Volumes/My Shared Files/` default path is error-prone since some tools don't like whitespaces in paths. With this change directories will be directly mounted into `$HOME`.

Fixes #64
defer session.Close()

mountScript := fmt.Sprintf(
"mount_virtiofs tart.virtiofs.%s /Users/%s/%s\n",
Copy link
Contributor

@edigaryev edigaryev Mar 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mount_virtiofs expects a directory to be already created, so we should probably stuff an mkdir -p && ... here to avoid the job failing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch. See 012a73f

defer session.Close()

mkdirScript := fmt.Sprintf(
"mkdir -p /Users/%s/%s",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about abstracting Users/%s/%s into separate variable to avoid mismatches between mkdir and mount invocations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. See 9e2887a

@edigaryev edigaryev merged commit 8689a13 into main Apr 2, 2024
1 check passed
@edigaryev edigaryev deleted the mount-into-home branch April 2, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to change mount point of mounted directories
2 participants