Find the answer to your Linux question:
Results 1 to 7 of 7
Hi, New to the forum, and somewhat new to Linux as well so hoping someone can help me get past this... Trying to setup LXC on a SLES 11 which ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2012
    Posts
    3

    Automatically mount /cgroup at boot...


    Hi,

    New to the forum, and somewhat new to Linux as well so hoping someone can help me get past this...

    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 with this command works fine:

    mount none -t cgroup /cgroup

    Hope someone can point me in the right direction

    Regards,
    Anders
    Last edited by sup3rior; 04-27-2012 at 12:03 PM. Reason: typo

  2. #2
    Just Joined!
    Join Date
    Nov 2007
    Location
    San Diego
    Posts
    17
    What does the rest of your /etc/fstab look like?

  3. #3
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    And what happens if you do
    mount /cgroup
    from command line?

    What user are you when
    mount none -t cgroup /cgroup
    works?

  4. #4
    Just Joined!
    Join Date
    Apr 2012
    Posts
    3
    Quote Originally Posted by systemnotes View Post
    What does the rest of your /etc/fstab look like?
    Looks like this:

    /dev/disk/by-id/ata-HITACHI_HTS722016K9SA00_080408DP1D40DFGAUUUP-part1 swap swap defaults 0 0
    /dev/disk/by-id/ata-HITACHI_HTS722016K9SA00_080408DP1D40DFGAUUUP-part2 / ext3 acl,user_xattr 1 1
    proc /proc proc defaults 0 0
    sysfs /sys sysfs noauto 0 0
    debugfs /sys/kernel/debug debugfs noauto 0 0
    usbfs /proc/bus/usb usbfs noauto 0 0
    devpts /dev/pts devpts mode=0620,gid=5 0 0
    none /cgroup cgroup defaults 0 0


    Quote Originally Posted by Mudgen View Post
    And what happens if you do
    mount /cgroup
    from command line?

    What user are you when
    mount none -t cgroup /cgroup
    works?
    Running it as root works as it should, both commands...

  5. #5
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    [QUOTE=sup3rior;889079

    Running it as root works as it should, both commands...[/QUOTE]

    That establishes that your fstab entry is not broken. If this were Red Hat/Centos/Fedora, I'd say to put a mount command in rc.local. But SuSE doesn't do rc.local, you have to trick up your own. You can find how to do that with a Google search for "rc.local suse".

    I've generally found that when auto mounts of non-traditional filesystems occur, it's because the mount is being attempted before some service it depends on is started.

  6. #6
    Just Joined!
    Join Date
    Apr 2012
    Posts
    3
    Quote Originally Posted by Mudgen View Post
    That establishes that your fstab entry is not broken. If this were Red Hat/Centos/Fedora, I'd say to put a mount command in rc.local. But SuSE doesn't do rc.local, you have to trick up your own. You can find how to do that with a Google search for "rc.local suse".

    I've generally found that when auto mounts of non-traditional filesystems occur, it's because the mount is being attempted before some service it depends on is started.
    Googling that seems to suggest that putting it in this file /etc/init.d/after.local which runs the command after the system has entered the desired runlevel.

    But I can't seem to figure out what impact this will have on the fact that this mount is to be used for running LXC containers that start during boot (and hence may be dependent on the cgroups mount before reaching either runlevel 3 or 5).

    Any thoughts on this would be appreciated, and I will in case my own testing (once I get to this part) reveals anything drop a note here on what I encountered.

    Regards,
    Anders

  7. #7
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    Quote Originally Posted by sup3rior View Post
    I've generally found that when problems with auto mounts of non-traditional filesystems occur, it's because the mount is being attempted before some service it depends on is started.
    Just noticed that I had omitted some words previously. Good luck with this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •