How can I mount two more subsystems on one directory in cgroups?

763 Views Asked by At

I'm studying computer engineering in university. During my study I have some problems.

I want to mount two subsystems on one directory.

I tried as follows

mount -t cgroup -o cpu,cpuset cpu_and_cpuset /cgroup/cpu_and_cpuset

This command is guided in redhat manual page.

Red Hat Manual Page Link

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-Creating_a_Hierarchy_and_Attaching_Subsystems.html

In my linux error is occured.

error message is

mount: cpu_and_cpuset already mounted or /cgroup/cpu_and_cpuset busy

But I didn't mounted any subsystems.
and /cgroup/cpu_and_cpuset is created just before.
For troubleshooting I tried unmount all cgroups subsystems.
and I retried this command. but result was same.

when mount a single subsystems, there is no problems.
If these subsystems mounted each directory, and set proper attribute, we can make up the environment that looks like two subsystems mounted on one directory.
But it's not a correct answer for me.

What is problem in my command?
Is there any solutions for this error?

1

There are 1 best solutions below

2
On

I have met this issue,I just solved it now.

You can try the command "cgclear" to destory the hierarchies.

for example:

cgclear cpu

cgclear memory