# Mount cgroup at boot...

**URL:** <https://forums.suse.com/t/mount-cgroup-at-boot/22563>\
**Category:** SLES Configure-Administer\
**Created:** [April 28, 2012, 6:45pm UTC](https://forums.suse.com/t/mount-cgroup-at-boot/22563 "2012-04-28T18:45:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sup3rior](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sup3rior](https://forums.suse.com/u/sup3rior)\
**Post date:** [April 28, 2012, 6:45pm UTC](https://forums.suse.com/t/mount-cgroup-at-boot/22563/1 "2012-04-28T18:45:20Z")

</div>

Hi,

Trying to setup LXC on a SLES 11 which is working as far as I’ve gotten at the moment. One thing keeps eluding me however, and that is having cgroups mount at boot.

Have added a line to /etc/fstab that reads:

none /cgroup cgroup defaults 0 0

But at boot, it isn’t mounted. Running mount manually (as root) with this command works fine:

mount none -t cgroup /cgroup

Any suggestions?

Regards,  
Anders

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [April 28, 2012, 7:20pm UTC](https://forums.suse.com/t/mount-cgroup-at-boot/22563/2 "2012-04-28T19:20:25Z")

</div>

> [@sup3rior](#):
>
> Hi,
> 
> Trying to setup LXC on a SLES 11 which is working as far as I’ve gotten  
> at the moment. One thing keeps eluding me however, and that is having  
> cgroups mount at boot.
> 
> Have added a line to /etc/fstab that reads:
> 
> none /cgroup cgroup defaults 0 0
> 
> But at boot, it isn’t mounted. Running mount manually (as root) with  
> this command works fine:
> 
> mount none -t cgroup /cgroup
> 
> Any suggestions?
> 
> Regards,  
> Anders

Hi  
On openSUSE running cgroups it’s mounted as tmpfs;

```auto
tmpfs /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,mode=755 0 0
```

What is the output from the mount command after you manually mount?

Have a browse here;  
[http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt](http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt)

–  
Cheers Malcolm Â°Â¿Â° (Linux Counter #276890)  
openSUSE 12.1 (x86\_64) Kernel 3.1.10-1.9-desktop  
up 2:44, 3 users, load average: 0.01, 0.02, 0.05  
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

---

<div class="post-metadata">

**Author:** ![sup3rior](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@sup3rior](https://forums.suse.com/u/sup3rior)\
**Post date:** [April 30, 2012, 1:42pm UTC](https://forums.suse.com/t/mount-cgroup-at-boot/22563/3 "2012-04-30T13:42:37Z")

</div>

[QUOTE=malcolmlewis;4282]Hi  
On openSUSE running cgroups it’s mounted as tmpfs;

```auto
tmpfs /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,mode=755 0 0
```

What is the output from the mount command after you manually mount?

Have a browse here;  
[http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt](http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt)  
[/QUOTE]

Not to strong on SLES yet, but one thing that pops in mind with your post is that I don’t need it to mount it as tmpfs but as cgroup:

```auto
mount -t none cgroup /cgroup
```

Don’t know if there is any difference between SLES and OpenSuse on this part but since I am to use this for running LXC the available documentation for this states that mount point. On the part of mounting this at boot, I’ve only been able to find documentation for either Red Hat or Ubuntu which tells to add the command to etc/fstab so I was hoping that the same command would work on SLES (which it apparently didn’t).

On the subject of output from running the command manually, it doesn’t give any. I run the command as root, no output is given but when starting my LXC container it no longer whines about cgroups not being mounted. Hence my comment that it seems to be working when running it manually.

Regards,  
Anders

---

<div class="post-metadata">

**Author:** ![enovaklbank](https://avatars.discourse-cdn.com/v4/letter/e/aca169/32.png) [@enovaklbank](https://forums.suse.com/u/enovaklbank)\
**Post date:** [May 9, 2012, 4:04pm UTC](https://forums.suse.com/t/mount-cgroup-at-boot/22563/4 "2012-05-09T16:04:19Z")

</div>

Is boot.cgroup enabled on your SLES box?

Check it’s start) section. It first checks and mounts /sys/fs/cgroup with  
mount -t tmpfs tmpfs -o mode=755,nosuid,nodev,noexec /sys/fs/cgroup  
and then the subfolders  
mount -t cgroup -o nosuid,nodev,noexec,$name cgroup “$d”

Maybe you only need to enable this script in order to work.

> Don’t know if there is any difference between SLES and OpenSuse on this part  
> There are a lot… opensuse 12.1 uses Systemd, while SLES uses sysvinit, for example.

---

<div class="post-metadata">

**Author:** ![Willem1](https://avatars.discourse-cdn.com/v4/letter/w/c57346/32.png) [@Willem1](https://forums.suse.com/u/Willem1)\
**Post date:** [May 14, 2012, 11:25am UTC](https://forums.suse.com/t/mount-cgroup-at-boot/22563/5 "2012-05-14T11:25:27Z")

</div>

[QUOTE=enovaklbank;4456]\> Don’t know if there is any difference between SLES and OpenSuse on this part  
There are a lot… opensuse 12.1 uses Systemd, while SLES uses sysvinit, for example.[/QUOTE]

And cgroups are only available/supported on SLES 11 starting SP2 IIRC?

update: scratch that, it’s containers LXC itself I was thinking of… Monday mornings… 😛

Cheers,  
Willem
