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

Add functionality to add disk devices without formatting them #1393

Closed
afbjorklund opened this issue Feb 28, 2023 · 2 comments · Fixed by #1516
Closed

Add functionality to add disk devices without formatting them #1393

afbjorklund opened this issue Feb 28, 2023 · 2 comments · Fixed by #1516
Labels
enhancement New feature or request

Comments

@afbjorklund
Copy link
Member

Description

Make it an option to create disks, without adding the GPT partitions or the ext4 filesystem.

This probably means that the structure needs to become a map, but it could support both ?

additionalDisks:
- "data"
additionalDisks:
- name: "data"
  format: false

I was using it to try out Ceph, but I suppose there could be other uses for not formatting...


The workaround was to remove the filesystem (with wipefs) and remove the signature (with gdisk)

Then I was able to use cephadm, to start up the cluster using containers... Worked nicely, with dashboard.

@afbjorklund
Copy link
Member Author

afbjorklund commented Mar 1, 2023

Changing file system would also be useful, for Gluster:

mkfs.xfs -i size=512

The default value of the such an "mkfs" parameter is:

mkfs.ext4

@afbjorklund
Copy link
Member Author

afbjorklund commented Mar 1, 2023

Once cephadm is done with it, it's actually using LVM.

root@lima-ceph:/# pvs
  PV         VG                                        Fmt  Attr PSize   PFree
  /dev/vdb   ceph-77b946de-840e-4b15-b127-35b290c4f81a lvm2 a--  <50.00g    0 
root@lima-ceph:/# lvs
  LV                                             VG                                        Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  osd-block-f487ff0e-51c4-4dc9-878f-d565e2929867 ceph-77b946de-840e-4b15-b127-35b290c4f81a -wi-a----- <50.00g                                                    

So it should probably skip trying to repartion it later...

[   15.162669] cloud-init[4393]: + [[ ! -b /dev/disk/by-label/lima-data ]]
[   15.163329] cloud-init[4393]: + echo type=linux
[   15.166989] cloud-init[4393]: + sfdisk --label gpt /dev/vdb
[   15.169010] cloud-init[4393]: Checking that no-one is using this disk right now ... FAILED
[   15.169777] cloud-init[4393]: This disk is currently in use - repartitioning is probably a bad idea.
[   15.170512] cloud-init[4393]: Umount all file systems, and swapoff all swap partitions on this disk.
[   15.171286] cloud-init[4393]: Use the --no-reread flag to suppress this check.
[   15.172393] cloud-init[4393]: sfdisk: Use the --force flag to overrule all checks.

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

Successfully merging a pull request may close this issue.

2 participants