{"action":"opened","issue":{"url":"https://api.github.com/repos/rear/rear/issues/540","labels_url":"https://api.github.com/repos/rear/rear/issues/540/labels{/name}","comments_url":"https://api.github.com/repos/rear/rear/issues/540/comments","events_url":"https://api.github.com/repos/rear/rear/issues/540/events","html_url":"https://github.com/rear/rear/issues/540","id":55614211,"number":540,"title":"Implement a generic \"cleanupdisk\" function.","user":{"login":"jsmeix","id":1788608,"avatar_url":"https://avatars.githubusercontent.com/u/1788608?v=3","gravatar_id":"","url":"https://api.github.com/users/jsmeix","html_url":"https://github.com/jsmeix","followers_url":"https://api.github.com/users/jsmeix/followers","following_url":"https://api.github.com/users/jsmeix/following{/other_user}","gists_url":"https://api.github.com/users/jsmeix/gists{/gist_id}","starred_url":"https://api.github.com/users/jsmeix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsmeix/subscriptions","organizations_url":"https://api.github.com/users/jsmeix/orgs","repos_url":"https://api.github.com/users/jsmeix/repos","events_url":"https://api.github.com/users/jsmeix/events{/privacy}","received_events_url":"https://api.github.com/users/jsmeix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-27T12:55:40Z","updated_at":"2015-01-27T12:55:40Z","closed_at":null,"body":"I think rear needs a generic \"cleanupdisk\" function that basically makes an already used harddisk behave as if it was a new harddisk.\r\n\r\nWhen recovery is done on an already used harddisk, the still existing old data on the disk cause varius kind of unexpected weird failures wher each kind is difficult to reproduce (because it depends on what exact old data there is). For some example see https://github.com/rear/rear/issues/533 (therein the issue that on RHEL6 on a used disk mdadm interferes with parted) and https://github.com/rear/rear/issues/415 (\"mkfs -t btrfs\" needs option \"-f\" to enfore making a btrfs on a disk where there is already a btrfs).\r\n\r\nImplementing it might become complicated in practice. (I have new harddisks in mind that might have ex factory a somewhat hidden special partition which must not be wiped or something like this - isn't there something like this for UEFI boot, see http://en.wikipedia.org/wiki/EFI_System_partition ).\r\n\r\nRegardless how complicated it is in practice, one dedicated function that cleans up the disk before anything else is done makes it much cleaner how rear works (instead of various workarounds here and there as needed).\r\n"}}