Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo host, non-identical guests: 9p sharing portage dirs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
1clue
Veteran
Veteran


Joined: 05 Feb 2006
Posts: 1663

PostPosted: Thu Mar 10, 2016 6:01 pm    Post subject: Gentoo host, non-identical guests: 9p sharing portage dirs Reply with quote

Hi,

I have 2 KVM hosts. I want to allow Gentoo guests to borrow the necessary portage directories via 9p sharing.

The hosts are NOT identical hardware and will not be sharing VMs.

The guests will NOT be identical to the host. I'd like to make all common directories be shared read-only via 9p, and all others be individual to the guest.

Can somebody give me an outline of what needs to be where?

Here's what I think:

  1. /etc/portage is specific to each install.
  2. /usr/portage can be safely shared.
  3. /tmp and /var/tmp are tmpfs


Is there anything else I need to worry about?

Is what I have correct?

Thanks.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1065

PostPosted: Thu Mar 10, 2016 7:19 pm    Post subject: Reply with quote

Shared /usr/portage is safe, even when all machines access it at the same time.
9p provides you an ability to share host's directory with the guest, but you have 2 hosts so you will likely need 2 copies of /usr/portage. That is, unless you have some shared storage or are willing to share it over NFS too, and if you did, you'd probably be better skipping the 9p part and going for NFS only. So, with 9p keep /usr/portage at the host, and keep temporary files at each target. Building locally (From target's perspective), it's safe. Building on a share tmpfs should be safe as well thanks to locks emerge creates, though it differs more from "standard", standalone gentoo.
Back to top
View user's profile Send private message
1clue
Veteran
Veteran


Joined: 05 Feb 2006
Posts: 1663

PostPosted: Thu Mar 10, 2016 7:54 pm    Post subject: Reply with quote

I guess I was unclear. I intend to have each host contain its /usr/portage and then use 9p within that host's VMs.

Are there any other biggies that can be shared across multiple non-identical images?

Thanks.
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 3366
Location: UK

PostPosted: Thu Mar 10, 2016 8:26 pm    Post subject: Reply with quote

distfiles seems like an obvious one, you may be able to share /usr/src/linux as well.
_________________
overlay (obs-studio, williamh-free runit and more) | runit-scripts
Back to top
View user's profile Send private message
1clue
Veteran
Veteran


Joined: 05 Feb 2006
Posts: 1663

PostPosted: Thu Mar 10, 2016 8:28 pm    Post subject: Reply with quote

Yes, I was just going to compile all the kernels on the host for that one. Easier comparing configs that way.

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum