1

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 Answers1

2

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

dadi
  • 21
  • 1
  • thanks! it solves the issue even if I still don't really know why! – claf Feb 25 '16 at 14:00
  • I run `mount -t cgroup -o cpu,cpuset,memory cpu_and_mem /cgroup/cpu_and_mem`, but got the same error -- `mount: /cgroup/cpu_and_mem: cpu_and_mem already mounted or mount point busy.` It did not work after I run `cgclear cpu`, `cgclear memory` and `cgclear cpuset`. How could I fix it? – spongecaptain Apr 21 '22 at 14:58