Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I create a logical volume on a specific physical volume

Status
Not open for further replies.

macrun95

Technical User
Dec 5, 2005
28
US
I have 2 physical volumes (/dev/sdb1 and /dev/sdb2) in a volume group called datavg. I have created 2 filesystems (/mnt/testfs and /mnt/test2fs) and lvcreate created them both on /dev/sdb1. Is there a way to create another logical volume and specify it be created on /dev/sdb2? I can do it in AIX but I don't know if it can be done in Linux. I'm running Cent0S 6.0.

Thanks,
Eric
 
I may be missing somthing in the question but as I understand it the whole point of LVM is that your partitions are not tied to any one hard disk

once you have your group defined it can span multiple disks meaning the file systems can also span multiple disks.

if you explicity want a file system on a particular disk then define it as a normal partition & don't make it part of an LVM

A Maintenance contract is essential, not a Luxury.
Do things on the cheap & it will cost you dear
 
Use [tt]lvcreate[/tt] to make an LV and then, separately format a filesystem on it.
In your case it would look something like:
[tt]lvcreate -L 512M -n lvol1 vg00 /dev/sdb2[/tt]
I randomly chose the name and the size of the volume. The VG is assumed to be [tt]vg00[/tt]. Change to fit your needs.
Now format it with [tt]mkfs.ext3[/tt], etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top