On Wednesday 2017-01-04 20:35, Wols Lists wrote:
On 02/01/17 23:42, sdm wrote:
You need to specify mkfs to format a partition, not a block device. For instance:|`mkfs.ext4 /dev/sdc1` NOT |||`mkfs.ext4 /dev/sdc`. btrfs can handle formatting an entire block device without having first created a partition. Ext4 can't. Example: `mkfs.btrfs /dev/sdc` would create one large partition on a hard drive.| |
That's wrong. If you give the command
mkfs.ext4 /dev/sdc
it will work fine. Which means it's **** dangerous :-) because if you've gone and partitioned your disk etc etc it will simply stomp all over it quite happily, including any data you may have put in other partitions. (I haven't played with it - hopfully it requires a -f option by default, but I doubt it :-( All mkfs expects is a block device, and I doubt it cares whether it's sdc or sdc1. It probably can't even tell!
Although running mkfs on a bare drive such is sdc is a pretty stupid idea. Not because you shouldn't, but because nobody else does. And
I do regularly. Exactly for /dev/sdc. It's my (scsi) floppy drive. never saw a partitioned floppy. ;)
leaving nasty surprises like that for the next guy is exactly what will cause a catastrophic failure, as they do what they think should be safe and it does something nasty on your non-standard setup :-( Somebody modified a system of mine to do that, and every time I went there afterwards I had to watch out to make sure I didn't cause a disaster.
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org