6.3.7 Unable to Create a Repository on a Device that has Partitions

A repository cannot be hosted on a physical disk that has pre-existing partitions. If you attempt to create a repository on a disk that already has a partition, an error is generated notifying you that the backing device is not allowed to contain partitions. If you are intent on creating a repository on the selected disk, you must delete any pre-existing partitions. This may require you to directly access the Oracle VM Server where the disk is mounted and to manually remove the partition objects on the disk using the fdisk command. For example:

# fdisk /dev/sdb


WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001e791

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        6528    52428800   83  Linux

Command (m for help): d 
Partition number (1): 1

Command (m for help): w
Warning

Using fdisk is data destructive. Make sure you are certain about the disk device name and partitions that you are deleting. It is advisable to make backups of any data that exists on the disk that you are editing before proceeding. This operation should be performed by a skilled systems administrator.

Usually, restarting the affected Oracle VM Server after performing these operations is advisable. In the case of an iSCSI disk, connections to targets need to be re-initiated. In all cases, the storage needs to be refreshed. Simply restarting the Oracle VM Server ensures that all necessary actions are performed.

Once the Oracle VM Server has restarted, you may attempt to recreate the repository.