Hi, On Wed, 15 Jul 2015 14:49:18 +0200 Holger Parplies <w...@parplies.de> wrote:
> Hi, > > Kerim Gueney wrote on 2015-07-09 17:10:25 +0200 [Re: Create LVM > Volume on Blockdevice]: > > [...] > > >Here is the main question, is it possible to create a pv directly > > >on a block device without having a partition? > > I am not entirely sure but I think that's possible, yes. I just ran > > pvcreate /dev/sda in a test environment and created a VG and LV on > > top of it just fine. > > yes, manually, it definitely is possible. yes, i've done that many times. I wanted to achieve that using fai because it saves time when increasing the size of a virtual disk. When the pv is directly on the block device you do a pvscan and everyting is fine. Using a partition table you will have to deal with that. > > > [...] > > it appears that everything you want is possible but setup-storage > > doesn't support it, yet. I'll try and implement a solution for your > > usecase in the upcoming days. > > I don't use setup-storage, but from what I've read on the list > recently, one idea does spring to mind: That was my solution as well. I use setup-storage for sda -> /boot partition + rootvg. This constellation works very well (but it would also be possible to get rid of the /boot as a own partition if i would not use setup-storage here. sdb gets provisioned by a script (only when a sdb is present), which works very nice at the moment. > > Stefan Schörghofer wrote on 2015-07-07 15:18:35 +0200 [Create LVM > Volume on Blockdevice]: > > [...] > > My current Diskconfig looks like this: > > -------------------------------------------------- > > # DATAVG > > disk_config sdb disklabel:msdos > > > > disk_config lvm > > vg datavg sdb > > datavg-datalv /data 8G xfs rw > > -------------------------------------------------- > > What happens if you leave out the "disklabel" part? My guess - from > what I've read rather than actual experience - is that setup-storage > would not create a partition table, and consequently pvcreate (or the > kernel?) would not complain when trying to prepare /dev/sdb for LVM. > In any case, the "disklabel:msdos" is wrong, strictly speaking, > because you don't want an msdos partition table on /dev/sdb - you > want an LVM PV there. I tried to don't write a partition table. So having just the disk_config lvm part...it was also not working (sorry..i can't remember the exact error message) Kerim Gueney told me already that what I want is currently not possible using setup-storage but he tries to implement it. So i guess i will give it a try when the next version is released. > > Hope that helps. > > Regards, > Holger Thanks a lot best regards, Stefan