Re: Help with systemd

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

 



I put the systemd service files that I use to map a RBD and mount the
filesystem before starting up PostgreSQL into the following gist. It's
probably not perfect, but it seems to work for me. Personally, I like
using a native service to accomplish this rather than using fstab and
the generator.

https://gist.github.com/jcollie/60f8b278d1ac5eadb4794db1f4c0e87d

On Mon, Aug 22, 2016 at 1:16 PM, K.C. Wong <kcwong@xxxxxxxxxxx> wrote:
> Folks,
>
> I have some services that depends on RBD images getting
> mounted prior to service start-up. I am having a really
> hard time getting out of systemd dependency hell.
>
> * I create a run-once systemd service that basically does
>   the rbd map operation, and set it start after network.target,
>   network-online.target, and ceph.target (probably overkill)
> * I added 'x-systemd.requires=<rbd map service>' to the
>   mount-point in /etc/fstab
>
> And when the system reboot, it'd complain about ordering
> cycle and sometimes resulting in rescue mode. Because the
> filesystem is 'xfs', I believe systemd-fstab-generator
> classifies the mount-point as 'local-fs'. Is there a way
> to force a 'remote-fs' reclassification? Or is there some
> other way to get out of this ordering nightmare... Old
> school 'S' and 'K' numbers are *so* simple; I'd trade
> consistency for speed any day.
>
> Thanks for any suggestion or insight.
>
> -kc
> BTW, I disable NetworkManager which, I know, kind of breaks
> network-online.target.
>
> K.C. Wong
> kcwong@xxxxxxxxxxx
> 4096R/B8995EDE  E527 CBE8 023E 79EA 8BBB  5C77 23A6 92E9 B899 5EDE
> hkps://hkps.pool.sks-keyservers.net
>
>
> _______________________________________________
> ceph-users mailing list
> ceph-users@xxxxxxxxxxxxxx
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>



-- 
Jeff Ollie
The majestik møøse is one of the mäni interesting furry animals in Sweden.
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux