Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a hard drive that is not configured, it shows this in fdisk -l:

Disk /dev/dm-2: 107.4 GB, 107369988096 bytes 
255 heads, 63 sectors/track, 13053 cylinders 
Units = cylinders of 16065 * 512 = 8225280 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes 
I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disk identifier: 0x00000000

How would I configure this, and mount it to /var/t3?

Also how would I make it stay configured in case of a reboot?

dmsetup info /dev/dm-2 output:

Name:              tier3-tier3
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      254, 2
Number of targets: 1
share|improve this question

migrated from serverfault.com Jul 3 '13 at 23:17

This question came from our site for system and network administrators.

up vote 4 down vote accepted

This doesn't look like a physical hard drive, more likely it's a LV (Logical Volume) or an encrypted partition or something like that. In any case it's being managed by Device Mapper (hence the /dev/dm- prefix).

Run dmsetup info /dev/dm-2 and post the result here. We'll take it from there.

EDIT: Ok, it's a LVM volume. All you need now is:

  1. Format it (unless it already is formatted)

    mkfs.ext4 -m0 /dev/tier3/tier3

    Make sure there are no existing data before formatting.

  2. Add a record to /etc/fstab for after-reboot automatic mount:

    /dev/tier3/tier3  /var/t3   ext4   defaults   1 2
  3. Try to mount it:

    mount -a
    df /var/t3

    and verify that the first column (Filesystem) shows tier3/tier3 volume

That's it.

share|improve this answer
It is a virtual hard drive. I have updated the question with the output. – Petah Jul 3 '13 at 23:13
@Petah - Thx. See my edit above for further steps. – MLu Jul 3 '13 at 23:37
It shows /dev/mapper/tier3-tier3 is that correct? Seemed to work though – Petah Jul 3 '13 at 23:52
Yes that's correct. /dev/tier3/tier3 and /dev/mapper/tier3-tier3 are both symlinks to /dev/dm-2. Congrats, looks like it works :) – MLu Jul 4 '13 at 0:08
fdisk /dev/dm-2

Then i forget the next question but you'll want to use all the space you can, I think.


fdisk -l /dev/dm-2

Find the name of the partition and run:

mkfs.ext4 /dev/dm-21 

Or what ever your partition was named.

mount /dev/dm-21 /var/t3
share|improve this answer
If it's a LV or something similar you don't want to partition it again. – MLu Jul 3 '13 at 23:04
true enough. I didn't put two and two together with dm && device mapper – lVlint67 Jul 3 '13 at 23:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.