G.3.4 Restoring the Swap Partition

After formatting the HDFS partition, you can restore the swap partition.

To restore the swap partition:

  1. 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
    
  2. 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
    
  3. 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
         .
         .
         .
    
  4. 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.

  5. Complete the steps in "Restoring the GRUB Master Boot Records and HBA Boot Order".