UFS Completely clean very large volume disks in a short time. (20Tb)

Dear experts, colleagues, brothers and friends.Tell me how to clean large-volume disks in a short time.The disks had zfs pools, gmirror, and gstripe. As a result, the disks are in a cluttered state and do not allow the correct creation of gmirror (synchronization errors with disk dump and gpt error 17 errors) and gstripe (gpt error 17 errors). I tried partial erasure, but it didn't help (dd if=/dev/zero of=/dev/ad* count=1000). The only thing that is created and does not cause errors in the process is the zfs pool, but the UFC only needs it for a number of good reasons.On disks up to 500G, the issue was resolved by dd if=/dev/zero of=/dev/ad*, but with disks of 20T each, this process will continue until my death in time.How can I speed up the process and completely clean large-volume disks in a short time?
Please help 🫂
 
IIRC the GPT partition table is at the end of the disk, not the beginning. You need to clean a bit there, then it should be fine.
 
IIRC the GPT partition table is at the end of the disk, not the beginning. You need to clean a bit there, then it should be fine.
its in both locations. also see geom flags for live brute force altering mbr / etc (geom(4))
0x10 (allow foot shooting)
Allow writing to Rank 1 providers. This would, for example,
allow the super-user to overwrite the MBR on the root disk or
write random sectors elsewhere to a mounted disk. The
implications are obvious.
 
IIRC the GPT partition table is at the end of the disk, not the beginning. You need to clean a bit there, then it should be fine.
You're right, the main partition table is at the beginning, and its backup is at the end. The problem is that I'm a little nervous and I can't remember or find information on how to calculate the end of the disk and what command to run to do it. Could you tell me how to do this correctly and with which command with which parameters?
 
A SSD can be erased with camcontrol(8)

To quickly clean a HDD kill and create new partition tables.
For most purposes this procedure is fully sufficient.
But if you really need/want to wipe a drive totally clean, and ensure there is no data left that could be recreated partially, there is no other way than to write to each block of the whole disk, which of course takes its time, especially with such large volumes; also special tools do not otherwise.

You can accelerate dd by adding a high value (~ a bit more than the [measured] write rate of the drive) to ... bs=200M (example; you may test a bit until you find the fastest value); you may also add
status=progress to dd.
Again, to really wipe a HDD really clean, there is no way but to overwrite every single block; or destroy it physically, that's the other way.

But if you're going to reuse the drive yourself again, the recreation of partition tables were fastest, and sufficient.
 
A SSD can be erased with camcontrol(8)

To quickly clean a HDD kill and create new partition tables.
For most purposes this procedure is fully sufficient.
But if you really need/want to wipe a drive totally clean, and ensure there is no data left that could be recreated partially, there is no other way than to write to each block of the whole disk (or destroy is physically); also special tools do so.
You can accelerate dd by adding a high value (~ a bit more than the [measured] write rate of the drive) to ... bs=200M (example; you may test a bit until you find the fastest value); you may also add
status=progress to dd.
Again, to really wipe a HDD really clean, there is no way but to overwrite every single block.
But if you're going to reuse the drive yourself again, the recreation of partition tables were fastest, and sufficient.
I have a sata hdd, but unfortunately I still couldn't figure out how to clean the disk thanks to camcontrol(8). dd I tried to set bs=1000M status=progress - but this did not speed up the process and I will wait until retirement for the task to be completed :rolleyes:
 
These are the incantations I use to wipe the table info fore and aft. Obviously change da8 references to suit your disks.

Code:
   |# dd if=/dev/zero of=/dev/da8 bs=1m count=100
   |# dd if=/dev/zero of=/dev/da8 bs=1m oseek=`diskinfo da8 | awk '{print int($3 / (1024*1024)) - 100;}'`
 
These are the incantations I use to wipe the table info fore and aft. Obviously change da8 references to suit your disks.

Code:
   |# dd if=/dev/zero of=/dev/da8 bs=1m count=100
   |# dd if=/dev/zero of=/dev/da8 bs=1m oseek=`diskinfo da8 | awk '{print int($3 / (1024*1024)) - 100;}'`
Thank you very much. you have helped as much as possible ☕ 🤝
 
Sometimes you can wipe your hard drive very quickly with manufacturer's tools. For instance (if I remember correctly - I studied the docs a while ago) my Toshibas MG encrypt all data internally. You can restore them to virgin state by simply deleting the encryption key. This feature is called Sanitize Instant Erase. Look for something similar on your HDDs.
 
Back
Top