My FreeBSD partitions are like this :
I would like to delete data completely from the following partitions :
/dev/gpt/var
/dev/gpt/godspeed
/dev/gpt/data
I tried the following commands :
As observed from the above commands, even after executing 'dd' command which is supposed to wipe out all data from '/dev/gpt/var', I can see all the old files are still present.
I can't find any clue why 'dd' command is not able to wipe out data from the file system.
Any idea ?
Thanks !!!
Note: Even if I use '/dev/da0p6' instead of '/dev/gpt/var' in the above 'dd' command, I get the same result.
Code:
pc154:user 12] df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/gpt/rootfs 2.0G 1.7G 144M 92% /
devfs 1.0K 1.0K 0B 100% /dev
/dev/gpt/efi 1.0G 64K 1.0G 0% /efi
/dev/gpt/var 387M 7.9M 348M 2% /var
/dev/gpt/godspeed 1.9G 124K 1.8G 0% /var/db/godspeed
/dev/gpt/data 784G 27G 694G 4% /data
procfs 4.0K 4.0K 0B 100% /proc
linprocfs 4.0K 4.0K 0B 100% /compat/linux/proc
linsysfs 4.0K 4.0K 0B 100% /compat/linux/sys
/dev/gpt/var
/dev/gpt/godspeed
/dev/gpt/data
I tried the following commands :
Code:
pc154:user] pwd
/data <==== my current location
pc154:user]
pc154:user] find /var -name "*" | wc -l
98 <==== total 98 files are present in '/var' folder
pc154:user]
pc154:user] sysctl kern.geom.debugflags=16
kern.geom.debugflags: 16 -> 16
pc154:user]
pc154:user] dd if=/dev/zero of=/dev/gpt/var bs=1024 seek=0 count=396288 <==== zeroing entire 387M of /dev/gpt/var
396288+0 records in
396288+0 records out
405798912 bytes transferred in 10.398334 secs (39025378 bytes/sec)
pc154:user]
pc154:user] sync
pc154:user] find /var -name "*" | wc -l
98 <==== all the 98 files still present in '/var' folder
pc154:user]
As observed from the above commands, even after executing 'dd' command which is supposed to wipe out all data from '/dev/gpt/var', I can see all the old files are still present.
I can't find any clue why 'dd' command is not able to wipe out data from the file system.
Any idea ?
Thanks !!!
Note: Even if I use '/dev/da0p6' instead of '/dev/gpt/var' in the above 'dd' command, I get the same result.