Score:0

Attempting to create an RAID array in Ubuntu server 20.10

us flag

I'm attempting to create a RAID 0 RAID array on Ubuntu server 21.10, but I keep getting the following error: mdadm: An option must be given to set the mode before a second device Here is the syntax I used:

~$ sudo mdadm –create –verbose /dev/md0 –level=0 –raid-devices=2 /dev/sdb1 /dev/sdc1
mdadm: An option must be given to set the mode before a second device
(–verbose) is listed

I've seen some websites that list the syntax as:

sudo mdadm -–create -–verbose /dev/md0 -–level=0 -–raid-devices=2 /dev/sdb1 /dev/sdc1

To which I get:

mdadm: invalid option -- '?'
Usage: mdadm --help
for help

I've tried removing the partitions and attempting the command without partitions, still no joy. I've tried the -c vs the --create option, still no fun.

Do I need to install any additional packages in order to create an array?

in flag
Your commands contain some fancy utf8 characters. Some websites that focus on prettyness instead of usefulness replace `-` and `--` with fancy utf8 characters that look prettier but will not work in a command line. If you copied and pasted those lines from a website, just type them again.
Nikita Kipriyanov avatar
za flag
You use "en dashes" instead of hyphens (minus signs) which are needed here.
Score:0
ws flag

I've seen some websites that list the syntax

The first place to look to find the behaviour/syntax of a command is the man pages on your local machine. That way you will be reading the documentation for the binary installed on your machine.

I don't know what version is installed on your machine, but on the one in front of me and others I have used 'create' is directive and not an option; it shouldn't be prefixed with a '-'/

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.