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

Feature idea: wipefs --recursive #1682

Open
t-8ch opened this issue May 5, 2022 · 4 comments
Open

Feature idea: wipefs --recursive #1682

t-8ch opened this issue May 5, 2022 · 4 comments
Labels
TODO We going to think about it ;-)

Comments

@t-8ch
Copy link
Member

t-8ch commented May 5, 2022

Intended behavior: wipefs --recursive would operate on the specified device and its subdevices, for example all the partitions of a disk.

This would make it easier to get all unwanted signature.

It would solve a problem I experienced, where wiping the partition table of disk lead to the provisioning tool recreating an identical one and then rediscovering the old filesystems.

@karelzak
Copy link
Collaborator

karelzak commented May 6, 2022

You can use wipefs /dev/sda* to wipe all partitions and whole-disk device.

@t-8ch
Copy link
Member Author

t-8ch commented Jun 4, 2022

This would only work for partitions of the default /dev/* names. Using /dev/disk/by- symlinks or more elaborate child devices would require additional work.

As this is really only QoL-improvement feel free to close the ticket if you think it's not worth it.

@karelzak
Copy link
Collaborator

karelzak commented Jun 6, 2022

Hmm ... a good point. You're right that getting a partition name on the command line could be tricky in some cases.

Do we have any command for this purpose, something like "lspart /dev/sda"? (I do not mean fdisk because it parses partition table, and it does not care how partitions are mapped to /dev nodes.)

@karelzak karelzak added the TODO We going to think about it ;-) label Jun 6, 2022
@t-8ch
Copy link
Member Author

t-8ch commented Jun 6, 2022

Wouldn't it be better to also wipe sub-devices that are not partitions? For example lvm PVs, bcache caches, luks volumes, etc.
Then it would be more or less what lsblk /dev/sda would do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TODO We going to think about it ;-)
Projects
None yet
Development

No branches or pull requests

2 participants