Skip to content

Commit

Permalink
Adds a small delay between creating a partition and formatting it. (#188
Browse files Browse the repository at this point in the history
)

* Adds a small delay between creating a partition and formatting it.

* Reduces delay between parted and mkfs to 1s.
  • Loading branch information
nkinkade authored Jul 29, 2020
1 parent 53d8c7c commit 66c28ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions configs/stage3_ubuntu/etc/systemd/system/format-cache.service
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ ExecStart=/usr/sbin/parted --align=optimal --script /dev/sda \
mkpart data xfs 0%% 90%% \
mkpart docker xfs 90%% 100%%

# There is potentially a delay between parted creating partitions and those
# partitions devices (e.g., /dev/sda1) showing in in /dev.
ExecStart=sleep 1

# Format and label each partition.
# Note: the labels could make the formatting conditional in the future.
ExecStart=/usr/sbin/mkfs.xfs -f -L cache-data /dev/sda1
Expand Down

0 comments on commit 66c28ed

Please sign in to comment.