Mounting /var early in systemd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello all,

I'm migrating a diskless cluster from initscripts to systemd.  The problem I 
have is that the nodes each need to mount their own separate /var (identified 
by hostname) from the NFS server when they boot.

With initscripts, I used a sysinit_end hook to do the job, which worked pretty 
well.  However, with systemd I've really hit a brick wall.  I can't get the 
unit to start early enough, because systemd creates so many sockets (in /var) 
so early, and there's no target that is ordered before the socket units are 
started.  This means that the early sockets get masked when the "real" /var is 
mounted, and things break.

I think the only solution with systemd is to explicitly specify each socket in 
"Before=" for my unit, which is likely to break if anything changes in future.  
It might also be possible to create a generator that automates this, but 
that's still pretty ugly.

Right now, I'm thinking the only sensible solution is to forget doing it with 
systemd and push the mounting of /var up into initcpio, but that's admitting 
defeat.

Any ideas?
Paul


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux