1

I'm looking for a way to delete a file from a RAID 6 implementation in a secure fashion (shredding). Do I need to delete the file from the RAID, disassemble the RAID, wipe the free space of each drive, and reassemble the RAID? Will that work? Will the data remain after doing this?

3 Answers 3

3

It all depends on the RAID (and file system) implementation. In a basic RAID 6 implementation, you can just shred the file before deleting it from the file system.

This works because writing to the RAID will cause both the data as well as the parity disks to be updated (usually RAID 6 will have two parity disks).

A more advanced RAID (or file system) may have features to deal better with operations that are terminated halfway through. Such features may leave data in other sectors than those primarily allocated for the file. If any such advanced features are present, the data might still exist if the file has been shredded.

These concerns applies to remapped harddisk sectors. Wear leveling on SSD. File system journals as well as journals in the RAID implementation (if the RAID uses journals).

In case of SSD your best bet is to use the TRIM command. In the other cases, using the shred command is usually safe enough. But if very high security against data leaks is necessary, you may need to take such drastic measures as overwriting the entire drive and then degaus and physically shred each platter.

It is in theory possible for a RAID implementation to offer you better protection against data leaks by encrypting each physical drive with a separate key, and store the keys as a secret sharing across all the disks. This can ensure that if defective disks in the RAID are replaced one at a time, no data can be recovered from the removed disks without breaking the encryption.

In most cases you cannot disassemble the RAID and wipe free space on the underlying drives. This is because the concept of free space is tracked only within the file system, so once the RAID is disassembled there is no way of distinguishing between free and used space. There may be exceptions if the RAID implements the TRIM command, but it is still unlikely to be meaningful to try wiping free space on a disassembled RAID.

1
  • SSD drives are great for secure systems since its truly binary, you can't look at prior writes at all (at least today, AFAIK), and if you write to the whole drive, you should be clearing the data.
    – Jim B
    Mar 3, 2016 at 12:56
0

Could someone recover data from a raid 6 set if it was erased and wiped, with enough resources and time, probably. I can't think of anyone that would say the disk set is secure unless the file system had some sort of full disk encryption or the file itself was encrypted.

6
  • I like a drill with a carbide bit to securely erase data. :)
    – Ron Maupin
    Mar 3, 2016 at 3:34
  • Even that doesn't render data wouldn't stop a well funded attacker, you need to shred the drives (unless the data was encrypted)
    – Jim B
    Mar 3, 2016 at 3:35
  • Enough big holes in a hard drive, and it is shredded beyond recovery, especially when the shavings from the case and platters scratch up what is left of the platters.
    – Ron Maupin
    Mar 3, 2016 at 3:38
  • Unfortunately, replacing the whole drive array is not at this point required and will keep costs down, both time and money. Jim, do you know any more of the specifics of reinitializing the RAID after disassembly?
    – Drise
    Mar 3, 2016 at 3:44
  • @RonMaupin no doubt, drilling a few holes isn't going to make life easy for an attacker, but I think you'd be amazed at what can be recovered these days, again time and money are the keys. My favorite "cheap" destruction method is to plasma torch it. Even where the torch doesn't cut the high temps eliminate even the residual sector data.
    – Jim B
    Mar 3, 2016 at 12:50
0

To shred files, I like to use dd which can overwrite the existing file

dd if=/dev/urandom of=/file/to/shred bs=1m count={Size In MB of File}

To really ensure randomness, you can preform multiple passes

After this it should be safe to rm it.

2
  • That doesn't work for copy-on-write file systems. Mar 3, 2016 at 11:54
  • 1
    @AndrewHenle The method described in this answer does not work reliably on any file system. It truncates the file first, so all the blocks in the file will be freed. Then it will allocate some new blocks and overwrite those. You could end up wiping some other blocks than those which contained the data in the first place.
    – kasperd
    Mar 3, 2016 at 18:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .