Score:1

multipass moving data directory fail

mu flag

I am following:

https://github.com/canonical/multipass/pull/1789 and https://lucasroesler.com/posts/2020/multipass-data-partition/ to move MULTIPASS_STORAGE to another location, but I am not lucky.

I am setting MULTIPASS_STORAGE=/pendrive/multipass:

/etc/systemd/system/snap.multipass.multipassd.service.d/override.conf

[Service]

Environment=MULTIPASS_STORAGE=/pendrive/multipass

If I run sudo journalctl -au snap.multipass* I get: Caught an unhandled exception: unable to create directory '/pendrive/multipass/cache'

This is my owner and permission (ls -l):

drwxrwxrwx 2 root multipass 4096 mar 28 22:27 multipass

I have my removable mount point like this: /dev/sdb1 /pendrive If I try sudo snap connect multipass:/pendrive I got error: snap "multipass" has no plug named "/pendrive"

Thank you

Score:0
by flag

There is a problem with the snap confinment and Multipass, it cant access the /pendrive directory.

Here is how to fix this: first be sure that Multipass is connected sudo snap connect multipass:removable-media then update the file /etc/systemd/system/snap.multipass.multipassd.service.d/override.conf to use the /media instead with this

[Service]
Environment=MULTIPASS_STORAGE=/media/pendrive/multipass

then set the correct permissions:

sudo mkdir -p /media/pendrive/multipass
sudo chown root:multipass /media/pendrive/multipass
sudo chmod 775 /media/pendrive/multipass

then Update your /etc/fstab file to mount the pendrive under the /media directory: /dev/sdb1 /media/pendrive ...

then replace the ellipsis with the good mount options for your filesystem and restart with this, then this should work:

sudo umount /pendrive
sudo mount /media/pendrive
sudo systemctl daemon-reload
sudo systemctl restart snap.multipass.multipassd.service
Raul Cejas avatar
mu flag
It is very necesary to put my mount point /pendrive bellow /media ? because I should have to change a lot of think not related with multipass
Raul Cejas avatar
mu flag
I implemented you recommend me and it works fine. Thank you
Saxtheowl avatar
by flag
You welcome :) dont forget to accept the question if it solved your problem, also it is not necessary to put your mount point /pendrive below /media
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.