G.3.4 Restoring the Swap Partition
To restore the swap partition:
-
Set the swap label:
# mkswap -L SWAP-sdn3 /dev/disk/by-hba-slot/snp3 Setting up swapspace version 1, size = 12582907 kB LABEL=SWAP-sdn3, no uuid
-
Verify that the swap partition is restored:
# bdaswapon; bdaswapoff Filename Type Size Used Priority /dev/sda3 partition 12287992 0 1 /dev/sdb3 partition 12287992 0 1
-
Verify that the replaced disk is recognized by the operating system:
$ ls -l /dev/disk/by-label total 0 lrwxrwxrwx 1 root root 10 Aug 3 01:22 BDAUSB -> ../../sdn1 lrwxrwxrwx 1 root root 10 Aug 3 01:22 BDAUSBBOOT -> ../../sdm1 lrwxrwxrwx 1 root root 10 Aug 3 01:22 SWAP-sda3 -> ../../sda3 lrwxrwxrwx 1 root root 10 Aug 3 01:22 SWAP-sdb3 -> ../../sdb3 lrwxrwxrwx 1 root root 10 Aug 3 01:22 u01 -> ../../sda4 lrwxrwxrwx 1 root root 10 Aug 3 01:22 u02 -> ../../sdb4 lrwxrwxrwx 1 root root 10 Aug 3 01:22 u03 -> ../../sdc1 lrwxrwxrwx 1 root root 10 Aug 3 01:22 u04 -> ../../sdd1 . . .
-
If the output does not list the replaced disk:
-
On Linux 6, run
udevadm trigger
.
Then repeat step 3. The
lsscsi
command should also report the correct order of the disks. -
-
Complete the steps in "Restoring the GRUB Master Boot Records and HBA Boot Order".