I'm wanting to add a Swap partition to a CentOS 7 machine (running in VirtualBox). However, when I try and add it I get this error:
partx -a /dev/sdd1
partx: /dev/sdd: error adding partition 1
Here's the output of fdisk /dev/sdd
Command (m for help): p
Disk /dev/sdd: 8589 MB, 8589934592 bytes, 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x1b359154
Device Boot Start End Blocks Id System
/dev/sdd1 2048 4196351 2097152 83 Linux
Any suggestions?
Try to load the nbd module with
max_part
parameter:It fixed this issue for me.
Reference