![]() Shred: /dev/sdd: pass 1/4 (random).2.8GiB/2.8TiB 0%Äepending on the drive's size (here a 3TB drive), properly erasing the data will take some time. Shred not only works on mounted file systems, it also works directly on ~ $ sudo shred -vfz /dev/sdd Another command I recently came across is shred. dd would be a command which would do the job. There are a couple of methods which can be used to completely wipe the data off the drive. Removing the RAID information from the drive is not enough - the drive still contains partitions and the data itself. I/O size (minimum/optimal): 512 bytes / 512 bytes Erasing / wiping data Sector size (logical/physical): 512 bytes / 512 bytes dev/sdd: calling ioctl to re-read partition table: sudo fdisk -l /dev/sddÄisk /dev/sdd: 2.75 TiB, 3000592982016 bytes, 5860533168 sectors dev/sdd: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa Wipefs also removes the partition table of a sudo wipefs -a /dev/sdd When used without any options, wipefs lists all visible filesystems and the offsets of their basic. wipefs does not erase the filesystem itself nor any other data from the device. wipefs does not erase the filesystem itself nor any other data from the device wipefs can erase filesystem, raid or partition-table signatures (magic strings) from the specified device to make the signatures invisible for libblkid. ![]() Wipefs can erase filesystem, raid or partition-table signatures (magic strings) from the specified device to make the signatures invisible for libblkid. This should (according to the man page) also remove the mdadm superblock and other informational "signatures": The RAID array md127 is now ~ $ cat /proc/mdstatĪnd now -zero-superblock should ~ $ sudo mdadm -zero-superblock /dev/sdd1 Alternative: wipefsĪn alternative would be the wipefs command. We first need to stop this RAID ~ $ sudo mdadm -stop /dev/md127 delete partition table.Note the RAID array md127: It appeared on its own and lists the first partition of the newly connected drive /dev/sdd. /dev/mmcblk3p4 2885632 14876671 11991040 5.7G 83 Linux. The reason is that the Linux Kernel automatically spun up a new array for the new ~ $ cat /proc/mdstat In this situation the -zero-superblock action did not work on the drive. Mdadm: Couldn't open /dev/sdd for write - not zeroing If the device contains a valid md superblock, the block is overwritten with sudo mdadm -zero-superblock /dev/sdd Let's wipe the RAID superblock on /dev/sdd with mdadm: In this case, the drive was detected as /dev/sdd. sd 6:0:0:0: Assuming drive cache: write through it may be necessary to wipe the disk using the wipefs command before. After the drive was connected, you should be able to see the drive appearing as /dev/sdX.
0 Comments
Leave a Reply. |