Ubuntu/Debian: swapoff when using disks
Use swapoff to ensure swap partitions are not mounted prior to 'sgdisk --zap-all' Signed-off-by: Scott G. Ainsworth <scott@ainsworth.us> Signed-off-by: Richard Laager <rlaager@wiktel.com> [Applied the change to Debian Buster; removed Ubuntu 16.04 and 18.04.]
This commit is contained in:
committed by
Richard Laager
parent
1f2ff88863
commit
f2cda9dad5
@@ -174,6 +174,10 @@ Step 2: Disk Formatting
|
|||||||
|
|
||||||
#. If you are re-using a disk, clear it as necessary:
|
#. If you are re-using a disk, clear it as necessary:
|
||||||
|
|
||||||
|
Ensure swap partitions are not in use::
|
||||||
|

|
||||||
|
 swapoff --all
|
||||||
|
|
||||||
If the disk was previously used in an MD array::
|
If the disk was previously used in an MD array::
|
||||||
|
|
||||||
apt install --yes mdadm
|
apt install --yes mdadm
|
||||||
|
|||||||
@@ -158,6 +158,10 @@ be deleted.
|
|||||||
|
|
||||||
DISK=/dev/mmcblk0
|
DISK=/dev/mmcblk0
|
||||||
|
|
||||||
|
#. Ensure swap partitions are not in use::
|
||||||
|
|
||||||
|
sudo swapoff --all
|
||||||
|
|
||||||
#. Clear old ZFS labels::
|
#. Clear old ZFS labels::
|
||||||
|
|
||||||
sudo zpool labelclear -f ${DISK}
|
sudo zpool labelclear -f ${DISK}
|
||||||
|
|||||||
@@ -291,6 +291,10 @@ Step 2: Disk Formatting
|
|||||||
|
|
||||||
#. If you are re-using a disk, clear it as necessary:
|
#. If you are re-using a disk, clear it as necessary:
|
||||||
|
|
||||||
|
Ensure swap partitions are not in use::
|
||||||
|
|
||||||
|
swapoff --all
|
||||||
|
|
||||||
If the disk was previously used in an MD array::
|
If the disk was previously used in an MD array::
|
||||||
|
|
||||||
apt install --yes mdadm
|
apt install --yes mdadm
|
||||||
|
|||||||
Reference in New Issue
Block a user