Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I need to format a partition.

But I have one LVM on my machine (VirtualBox) that is composed of two different two partitions of two Virtual HDD's (sdb5 and sdc5)

fdisk output enter image description here

df output

enter image description here

share|improve this question
1  
You need to add more detail to your question. Is that VirtualBox on a Logical Volume, or a Logical Volume within VirtualBox? How many Volume Groups? How were they created, ie from which Physical Volumes? –  bdowning Feb 16 '13 at 12:16
    
Redhat is running on Virtual Box –  OmiPenguin Feb 16 '13 at 12:47
1  
So RH is on VBox. What OS is VirtualBox running on top of? You initialize "Physical Volumes" with pvcreate, then group PVs into a "Volume Group". From a volume group you create "Logical Volumes" each of which may be formatted with any file system you chose. The issue is that if you created the Volume Group/Logical Volumes from the OS running VirtualBox, then you need to manage the VG/LV from that OS, not from the VBox client OS, it will be dealing with virtual disks. –  bdowning Feb 16 '13 at 17:10
add comment

1 Answer

up vote 0 down vote accepted

Lvm doesnt change the way how you format a partition. lets say you would have an lvgroup called group1 and an lvolume called volume1 then your command should look likr this for ext3:

mkfs.ext3 /dev/group1/volume1

in case you dont have any lvgroups or lvolumes yet, you have to use the according LVM tools to create them. The manpages of vgcreate and lvcreate can tell you how to do that.

share|improve this answer
    
No I have Volume Group and LV –  OmiPenguin Feb 16 '13 at 12:58
    
in that case you just use the normal mkfs tools on the device you want to format. the lvm devices are presented as /dev/lvgroup/lvolume –  mauro.stettler Feb 16 '13 at 13:01
1  
i just saw your df output only now. on your case the device for your logical volume should be /dev/mapper/VolGroup00-LogVol00 –  mauro.stettler Feb 16 '13 at 13:02
    
For some reason before posting question it mkfs said that device is in use when I already unmounted the partition. But now its ok Thanks for giving me info –  OmiPenguin Feb 16 '13 at 13:08
add comment

Your Answer

 
discard

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.