P
P
Pavel Bezrukov2015-02-05 09:56:36
linux
Pavel Bezrukov, 2015-02-05 09:56:36

Why doesn't mount work on boot?

Good afternoon.
I'm trying to install virtualization on Ubuntu Server lxc.
In all instructions, the first step is to mount cgroups, here are examples of instructions link 1 and link 2 .
Since /sys/fs/cgroup is considered the default folder for mounting, I try to mount it:
In the /etc/fstab file I add
cgroup /sys/fs/cgroup cgroup defaults 0 0
And I do
> mount /sys/fs/cgroup
it does not swear , lxc-checkconfig says everything is ok, namespaces are ok.
Then reboot, the reboot is successful, I do lxc-checkconfig writes an error connecting namespases - re-mounting (> mount /sys/fs/cgroup) solves the problem and so on after each reboot.
I decided to try to do as in the example from other articles and change the position of the cgroup mount.
> mkdir /cgroup
In /etc/fstab set new paths
cgroup /cgroup cgroup defaults 0 0
> mount /cgroup
After reboot sometimes (didn't understand under what circumstances) the system reboots and everything works,
But almost always at the boot stage the system stops and the screen last displayed:
[ 5.791510] EXT4-fs (sda1): mounted filesystem without journal. Options: (null)
It helps to restart in recovery mode, and there I just press resume and everything loads, not always, but often happens, after pressing resume at the boot stage it stops with the message mount error, press S to continue (I can’t give the original text), I press S (nothing do) - loaded successfully, logged in, cgroup is already primed. lxc-checkconfig shows everything is ok.
But in normal mode, until I rewind the cgroup will not load.
Googled, there are similar errors, but I did not find a solution. Help me please.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
jcmvbkbc, 2015-02-05
@jcmvbkbc


I add cgroup /sys/fs/cgroup cgroup defaults 0 0 to the /etc/fstab file

It is important where exactly in fstab you add it, because with mount -a the rules are executed sequentially.
Show your fstab.

I
Igor, 2015-02-05
@merryjane

Look towards configuring cgroup through its native configs:

/etc/cgrules.conf
/etc/cgconfig.conf

So /etc/cgconfig.conf usually contains a mount section:
mount {
  cpu = /sys/fs//cgroup/cpu;
  cpuacct = /sys/fs/cgroup/cpuacct;
  devices = /sys/fs/cgroup/devices;
  memory = /sys/fs/cgroup/memory;
  freezer = /sys/fs/cgroup/freezer;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question