If an "lvremove" is immediately followed by an "lvcreate" for an LV with the same name, "mkswap" (and maybe other commands) occasionally fail with "Device or resource busy". Work around it by using sync and sleep.
If an "lvremove" is immediately followed by an "lvcreate" for an LV with the same name, "mkswap" (and maybe other commands) occasionally fail with "Device or resource busy". Work around it by using sync and sleep.