Re: How to configure the hugepages group in Debian?
- Date: Tue, 7 May 2019 14:51:57 +0300
- From: Reco <recoverym4n@xxxxxxxxxxxx>
- Subject: Re: How to configure the hugepages group in Debian?
On Tue, May 07, 2019 at 01:12:47PM +0200, Mikhail Morfikov wrote:
> # mount | grep -i huge
> hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
> I don't have any fstab entries that would allow to mount /dev/hugepages .
> So something is mounting it automatically, but I couldn't find any info
> what that would be.
This particular systemd part is called dev-hugepages.mount.
> It's not really a problem what and where mounts the resource, but I
> wanted to configure the group that can be set via the
> "vm.hugetlb_shm_group" sysctl parameter. There's info on the Debian wiki
> how to do this, and I wanted to add the following entry to the
> /etc/fstab file in order to configure the group:
> hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M,mode=1770,gid=5555 0 0
> But this doesn't really work. I mean, those mount options aren't
> set or are reset. So how to configure this thing?
By following the usual way of overriding systemd's unit (pagesize=2M is
redundant on i386/amd64 and is harmful on other arches):
cat > systemd/system/dev-hugepages.mount.d/override.conf << EOF
systemctl daemon-reload && systemctl restart dev-hugepages.mount