1

I need to find out which systemd service mounts /dev/sdb (aka /mnt/resource) on Windows Azure? I am using Centos 7 image and it is systemd-based and I am trying to launch a service that depends on /mnt/resource mounted already.

Tried googling but not much luck yet.

Michael Pliskin
  • 225
  • 1
  • 12

1 Answers1

1

I managed to find an answer after a while. It is not that simple though:

  • The service that mounts /mnt/resource is called waagent.service
  • However, systemd only allows you to wait till it starts, not till it finishes startup
  • Therefore, it my script I used the following detection code:

LINES=`df | grep /mnt/resource | wc -l`
while [ $LINES -lt 1 ]
do
        sleep 1
        LINES=`df | grep /mnt/resource | wc -l`
done
Michael Pliskin
  • 225
  • 1
  • 12