OpenVZ Forum


Home » Mailing lists » Devel » Containers HOWTO? (Where do I start?)
RE: Containers HOWTO? (Where do I start?) [message #41981 is a reply to message #41979] Wed, 08 December 2010 21:17 Go to previous message
Rob Landley is currently offline  Rob Landley
Messages: 19
Registered: December 2010
Junior Member
> A few places to start since you want to start from the ground up:
>
> 1. man clone

Yup, got that one already.

> 2. man pivot_root

I wrote the busybox switch_root implementation, which meant I had to
really _understand_ the full horror of the pivot_root implementation
and why it _wasn't_ switch_root (examining every process in the system
so you can move their chroot entry for kernel threads and daemons is
really ugly, but you can't unmount a filesystem that has processes
pinning it). Although come to think of it I thought kernel threads were
parked in initramfs these days? (Doesn't initrd overmount initramfs?
Now I have to go look at what the code's doing again...)

But how does pivot_root enter into this when you haven't got an initrd to
free? I thought when you killed a container's init process that killed all
the children and freed the resources, so how does pivot_root enter
into this? (You don't reparent existing processes, you span new ones,
right?)

> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6 .git ;a=tree;f=Documentation/cgroups;h=8c6b3f6c41a929f8db38b51a39 442387ecbd5986;hb=HEAD

Ah, _that_ is what i was looking for. Documentation/cgroups.

I'll look at #3 and #5 after reading that.

Thanks,

Rob
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containe rs
 
Read Message
Read Message
Previous Topic: RE: trying to build simple checkpoint/restart recipes
Next Topic: Re: [Lxc-users] regular lxc development call?
Goto Forum:
  


Current Time: Wed Oct 15 23:04:58 GMT 2025

Total time taken to generate the page: 0.46441 seconds