In my opinion, if you feel the need to write bash scripts that mount and/or format drives, there's already something wrong with your approach.
Depending on the environment (old school linux system vs. orchestration suite) I'd rather do it manually, or if possible, let IaC (eg. Terraform, Ansible) handle such infrastructure tasks.
For lots of people, bash is the hammer, everything's a nail. Can be very frustrating to inherit such environments.