libvirt/src/storage
John Ferlan 3c4f2e3fb7 disk: Use virStorageBackendZeroPartitionTable
https://bugzilla.redhat.com/show_bug.cgi?id=1439132

During 'matrix' testing of all possible combinations I found that if
device is formated with "gpt" first, then an attempt is made to format
using "mac", a startup will fail.

Deeper analysis by Peter Krempa indicates that the "mac" table fits
into the first block on the disk. Since the GPT disklabel is stored
at LBA address 1 it is not overwritten at all. Thus it's apparent that
the (blkid) detection tool then prefers GPT over a older disklabel.

The GPT disklabel has also a secondary copy at the last LBA of the disk.

So, follow the same logic as the logical pool in clearing a 1MB swath
at the beginning and end of the device to avoid potential issues with
larger sector sizes for the device.

Also fixed a minor formatting nit in virStorageBackendDeviceIsEmpty call.
2017-04-26 07:28:08 -04:00
..
parthelper.c storage: Fix virStorageBackendDiskDeleteVol for device mapper 2016-05-11 09:23:31 -04:00
storage_backend_disk.c disk: Use virStorageBackendZeroPartitionTable 2017-04-26 07:28:08 -04:00
storage_backend_disk.h storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_fs.c storage: util: Pass pool type to virStorageBackendFindGlusterPoolSources 2017-04-04 16:30:45 +02:00
storage_backend_fs.h storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_gluster.c storage: gluster: Implement 'checkPool' method so that state is restored 2017-04-05 12:21:17 +02:00
storage_backend_gluster.h storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_iscsi.c util: Rename virFileWaitForDevices 2017-03-15 21:17:47 -04:00
storage_backend_iscsi.h storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_logical.c logical: Increase the size of the data to wipe 2017-04-26 07:28:08 -04:00
storage_backend_logical.h storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_mpath.c util: Rename virFileWaitForDevices 2017-03-15 21:17:47 -04:00
storage_backend_mpath.h storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_rbd.c storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_rbd.h storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_scsi.c conf: Return the vHBA name from virNodeDeviceCreateVport 2017-03-15 21:17:47 -04:00
storage_backend_scsi.h storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_sheepdog_priv.h storage: sheepdog: Split out functions required for tests 2017-01-19 09:25:51 +01:00
storage_backend_sheepdog.c storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_sheepdog.h storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_vstorage.c storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_vstorage.h storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_zfs.c storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend_zfs.h storage: backend: Refactor registration of the backend drivers 2017-02-21 09:34:30 +01:00
storage_backend.c storage: backend: Use correct stringifier for pool type 2017-04-03 08:42:09 +02:00
storage_backend.h conf: Introduce virstorageobj 2017-03-17 14:40:09 -04:00
storage_driver.c storage: Create helpers to perform FindByUUID and FindByName 2017-04-11 08:49:51 -04:00
storage_driver.h conf: Introduce virstorageobj 2017-03-17 14:40:09 -04:00
storage_util.c storage: Introduce virStorageBackendZeroPartitionTable 2017-04-26 07:28:08 -04:00
storage_util.h storage: Introduce virStorageBackendZeroPartitionTable 2017-04-26 07:28:08 -04:00