Unexplainable delays in execution of parted and sfdisk

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

 



Dear all,

I have my own /usr/bin/card_checker.sh shell script (Card Checker), which check correctness of /dev/sda disk partitioning and make re-partitioning when required.

Main commands of interest, executed by script are:
 parted -s /dev/sda rm 1                # Remove partition 1.
 echo -e ",1024M,83\n,,83" | sfdisk --quiet /dev/sda    # Create 2 Linux partitions.

Script unmount /dev/sda* to be sure disk is not busy before parted and sfdisk execution.

Script operate flawless when started from console by hands. But same script has very long (around 10 minutes) execution of parted and sfdisk commands when called from systemd. With help of "ps ax" command I see that parted or sfdisk stay running and do nothing for a while. They wake up and do normal execution only after around 10 minutes.

The Card Checker Service file is as below:

[Unit]
Description=Card Checker Service
After=network.target
Before=gsiafw-console.service gsiafw.service gsieventmond.service gsiauxpower.service gsilcdpaneld.service guinevere.service

[Service]
Type=oneshot
ExecStart=/usr/bin/card_checker.sh sda
StandardOutput=tty
StandardError=tty

[Install]
WantedBy=multi-user.target


Please, help to understand what need to be additionally configured in that service file to allow normal (fast) execution of parted and sfdisk.

Best wishes.
--
Igor Plyatov

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux