Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Creating a custom cgroup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
benesm1
n00b
n00b


Joined: 19 Aug 2004
Posts: 62
Location: Prague, Czech Republic

PostPosted: Tue Apr 05, 2016 8:00 am    Post subject: [SOLVED] Creating a custom cgroup Reply with quote

Hello,
is there a way how to persuade OpenRC to create a cgroup on every boot? I need a cgroup named "systemd", because apparently LXC 2.0 relies on that, eventhough there is no Systemd present. Now I have this in my fstab:
Code:
cgroup                                  /sys/fs/cgroup/systemd  cgroup          none,name=systemd,noauto                        0 0

but I still need to create the mountpoint and mount the cgroup before LXC starts. Is there a nicer solution available?
Back to top
View user's profile Send private message
benesm1
n00b
n00b


Joined: 19 Aug 2004
Posts: 62
Location: Prague, Czech Republic

PostPosted: Sun Apr 10, 2016 12:12 pm    Post subject: Creating a custom cgroup Reply with quote

I will reply myself.
It is necessary to install libcgroup and add the mountpoint to /etc/cgroup/cgconfig.conf:
Code:
mount {
        "name=systemd" = /sys/fs/cgroup/systemd;
}

Then, add cgconfig to runlevel default. This solves the problem itself. If you need it for LXC, create /etc/conf.d/lxc and add the necessary dependencies - I need cgconfig and lxcfs, so the file looks like this:
Code:
rc_use="lxcfs cgconfig"
Back to top
View user's profile Send private message
trumee
Guru
Guru


Joined: 02 Mar 2003
Posts: 549
Location: London,UK

PostPosted: Sun Dec 17, 2017 1:34 pm    Post subject: Reply with quote

I am trying to run Ubuntu under Gentoo OpenRC. Can you help?

Also, how did you get the systemd cgroup on an OpenRC host?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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