pvcreate: Create a bootloader embedding area by default
PATCH 1/1 pvcreate: Create a bootloader embedding area by default
Default to 1M, to match the amount available to the bootloader on a partition table with modern alignment constraints.
--- lib/config/defaults.h | 1 + lib/metadata/metadata.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
lib/config/defaults.h +1 -0
@@ -103,10 +103,11 @@#define DEFAULT_MAX_LV 0#define DEFAULT_ALLOC_POLICY ALLOC_NORMAL#define DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS 0#define DEFAULT_MAXIMISE_CLING 1#define DEFAULT_CLUSTERED 0 +#define DEFAULT_BOOTLOADERAREASIZE 2048/* sectors */ #define DEFAULT_MSG_PREFIX " "#define DEFAULT_CMD_NAME 0#define DEFAULT_OVERWRITE 0
lib/metadata/metadata.c +1 -1
@@ -1435,11 +1435,11 @@ void pvcreate_params_set_defaults(struct pvcreate_params *pp) pp->yes =0 ; pp->metadataignore =DEFAULT_PVMETADATAIGNORE ; pp->rp.restorefile =0 ; pp->rp.idp =0 ; pp->rp.ba_start =0 ; - pp->rp.ba_size =0 ; + pp->rp.ba_size =DEFAULT_BOOTLOADERAREASIZE ; pp->rp.pe_start =PV_PE_START_CALC ; pp->rp.extent_count =0 ; pp->rp.extent_size =0 ; }
Signature · 1 line
1.8.4.25.g05e4ae6
PATCH 1/1 pvcreate: Create a bootloader embedding area by default
Quoted 2 lines · Gabriel de Perthuis
Default to 1M, to match the amount available to the bootloader on a partition table with modern alignment constraints.
Well, I'd really prefer having this on-demand only by explicit use of "pvcreate --bootloaderareasize". The bootloader area is supposed to be used in specific situations only and we normally don't want it to be created for all PVs by default...
Peter
PATCH 1/1 pvcreate: Create a bootloader embedding area by default
Quoted 8 lines · Gabriel de Perthuis
Quoted 2 lines
Default to 1M, to match the amount available to the bootloader on a partition table with modern alignment constraints.
Well, I'd really prefer having this on-demand only by explicit use of "pvcreate --bootloaderareasize". The bootloader area is supposed to be used in specific situations only and we normally don't want it to be created for all PVs by default...
There isn't any support for adding the area to existing PVs (though there is enough room). I don't see a downside to having the area ready in case it's needed.