Don't Do It While It's Still Mounted As A Network-Shared Drive
After you have copied the data content onto its replacement drive, the replacement drive should be mounted in place of your failing drive.
Then mount the failing drive privately and subject that to DBAN or other soft-wiping facility, before it is returned to the supplier for repair /replacement.