Hey everyone! I've been using Fedora for about two years now and consider myself an intermediate user, but I really struggle with using the command line for managing drives. I'm looking to create Live CDs for some old computers at a local club that only runs Windows. I ran into a couple of issues today:
First, I'm having trouble with the `parted` command. I tried to remove and create a partition, but it seems like the changes didn't apply. Here's the sequence I followed:
1. I initiated parted on `/dev/sdc`.
2. I printed the current state and removed the only partition.
3. I tried to create a new partition with `mkpartfs linux ext4 0 -1`, but it failed due to a misunderstanding on my part.
4. After quitting and checking again, the old partition still appears intact, and my data is still on the drive.
What did I do wrong?
Second, I'm also clueless about benchmarking drives. I've come across tools like `iozone` and `bonnie++`, but their manuals aren't clear on how to use them effectively. I tried `bonnie++` with a command that got stuck. I'd appreciate any tips or examples on using these tools for benchmarking!
Thanks for your help!
2 Answers
It sounds like you’ve mixed up some commands in `parted`. Remember, `mkpartfs` isn’t a valid command there; you want to use `mkpart` for creating a new partition. After making your changes, you should also ensure you're quitting correctly for them to save. As for benchmarking, you might want to start with an easy BASH one-liner like `time for i in $(seq 1 1000); do echo "test data" > testfile_$i.txt; done` to see how fast your drive can handle writing files. It'll give you a rough idea of its performance without dealing with `iozone` or `bonnie++` right away.
For your issues with `parted`, make sure that after you create or delete partitions, you use the `mkpart` command correctly. `mkpartfs` doesn't work the way you expect. If that’s still confusing, check out the `parted` man pages for clearer syntax. Regarding benchmarks, `iozone` and `bonnie++` can be tricky, but both have useful examples in their documentation. If you’re stuck on `bonnie++`, try simplifying the command to `bonnie++ -d /media/my-drive -s 100M` for a brief test of your drive without overwhelming it.

Related Questions
How To Get Your Domain Unblocked From Facebook
How To Find A String In a Directory of Files Using Linux