0

I'm doing a school project and we've been given access to some servers, so we can build a simple Cassandra database. I need to mount a drive on each instance -- there are four instances.

The instruction list this command:

sudo mkfs –t ext4 /dev/vdc

however, this gives me the following error:

mke2fs 1.42 (29-Nov-2011) mkfs.ext2: invalid blocks 'ext4' on device '–t'

I think I'm missing the number of blocks on the command sudo mkfs –t ext4 /dev/vdc. However, I don't know what number to put as an argument.

Here is some associated output that may help, but I don't know what it means.

Disk /dev/vdc: 2147.5 GB, 2147483648000 bytes
16 heads, 63 sectors/track, 4161015 cylinders, total 4194304000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/vdc doesn't contain a valid partition table

Any help/tips/pointers would be much appreciated.

2 Answers 2

1

First thing to look at,

Disk /dev/vdc doesn't contain a valid partition table

So you probably still need to make a partition with the help of fdisk. Please see check the following article on how to do so. It explains it, step-by-step.

how to use fdisk to manage partitions on linux (howtogeek.com)

It uses /dev/sda as the partition in the examples, just change that to /dev/vdc. The article ends with setting up the filesystem with mkfs.ext4, so you should be pretty much setup after this.

As for mounting the new partition, please check these first if still needed:

Fstab & AutomaticallyMountPartitions

1
  • 2
    /dev/vdc is a disk not partition. Your partitions will be /dev/vdc1, /dev/vdc2 and so on, depending on how many you want (might be just one).
    – madneon
    Commented Mar 25, 2015 at 23:24
0

The problem was that I pasted the command from a pdf file. Works fine when typed.

1
  • To be honest I'm not entirely sure, but the instance I'm using is an Ubuntu image, so I'm assumed it was an Ubuntu system. Sorry if my terminology is off. I'm still learning.
    – slmyers
    Commented Mar 26, 2015 at 2:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .