I've successfully partitioned a logical volume (/dev/dm-2) using sfdisk and fdisk -l now reports there to be a partition /dev/dm-2p1 as desired. However, this device does not seem to exist in /dev/ and I'm unsure why/where to find it so that I can now format it using mkfs.

The output of fdisk -l is:

Disk /dev/dm-2: 20.9 GB, 20971520000 bytes
255 heads, 63 sectors/track, 2549 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

     Device Boot      Start         End      Blocks   Id  System
/dev/dm-2p1               1        2549    20474811   83  Linux

Any help is much appreciated!

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

The device in /dev doesn't exists because the Linux kernel isn't notified about partition table changes automaticly. You can use partprobe (part of Parted) to re-scan your partition table or reboot the machine to have your device nodes created.

link|improve this answer
Thanks. After running this though, there was still no /dev/dm-2p1 device. I found that I actually have to use /dev/mapper/{vgname}-{lvname}p1 to access the partition. Possibly that's a result of using an lv? – Joe Jul 17 '10 at 10:29
feedback

Your Answer

 
or
required, but never shown

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