Open akorn opened 4 years ago
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.
Bump, to keep the bot away.
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.
Bump, to keep the bot away.
System information
Describe the problem you're observing
When creating a pool on two SSDs, I made a typo. Instead of
zpool create ... /dev/sd[ae]7
I typedzpool create ... /dev/sd[ae7]
and pressed ENTER.zpool
happily overwrote my partition tables. There wasn't any other data on the SSDs yet, but there might have been; as it was, I only noticed afterzfs receive
-ing a few hundred gigabytes into the new pool. I had to destroy the new pool, re-create the partitions, and re-receive the data, causing unnecessary wear on the SSDs. If my partitions had contained data, it would have been destroyed (although, looking at #4016, maybezpool
would have warned me then?).I think it might be better to require
-f
inzpool create
(as well as probablyzpool attach
andzpool add
) if the requested operation would overwrite an existing partition table.Describe how to reproduce the problem
Create some partitions on a disk (mine was gpt, but I don't suppose it matters), then create a zpool from the whole disk.
This is similar to #4016 but not identical, as I didn't actually have any filesystem in any of the destroyed partitions yet.