Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ns resize calc nsze/ncap need check Namespace Size/Capacity Granularity first #14

Open
kwzhu123 opened this issue Aug 5, 2024 · 0 comments

Comments

@kwzhu123
Copy link

kwzhu123 commented Aug 5, 2024

1
/src/autoval_ssd/lib/utils/storage/nvme/nvme_resize_utils.py
def ns_resize(
host: Host,
nvme_id_ctrls: Dict[str, Any],
sweep_param_unit: SweepParamUnitEnum,
sweep_param_key: SweepParamKeyEnum,
device: str,
sweep_param_value: Union[int, float],
**kwargs: Dict[Any, Any],
) -> None:
...
nsze = NvmeResizeUtil.get_idema_lba_counts(num_bytes, block_size)
ncap = nsze

2
need check ns Granularity first, some vendor's drive have LBA count alignt limit
sudo nvme id-ns-granularity /dev/nvme0
NSG : Namespace Size Granularity : 0x1000
NCG : Namespace Capacity Granularity : 0x1000 #need 4k alignt

3
NVMe Specification
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant