PDA

View Full Version : LVM testing



wmdejen
23rd November 2007, 03:29 PM
Hi

I been testing a little with LVM, and a single volume group...

Lad me first take you though what I did...

I installed a Linux, in a virtual machine, with 1 disk (sda) where I created 2GB SWAP and rest to /.. After installation I added a 2nd disk call sdb. I then created a single partition on sdb called sdb1, and added it as a physical volume disk, in LVM. I then created a volume group called dm-0 with sdb1 inside and next a Logical volume called lvol0. As usual there was created a structure in /dev called /dev/dm-0/lvol0, and that was the block device I created my file system on, a ext3 system and mounted it on /data... I then loaded some wallpapers on to it, just to have some data to protect doing re installation... I then re installed the Linux, and in the partitioning section of the installation, I could see the sbd as a PV (Physical Volume). and the partitioning layout of sda, I selected the same layout as before, just leaving the PV, but selected reformatting / and the SWAP.

After the installation I did a pvscan... vgscan and a lvscan, and could see the path to the lvol0 as to be /dev/dm-0/lvol0, but there are no sub folder to /dev/dm-0, but if I mounted /dev/dm-0 I could see my data again... Then from my time fooling around with LVM in the past I know that LVM sometimes make a /dev/mapper/ and beneath that there was a block device called dm--0-lvol0.... What happen to the earlier structure called /dev/dm-0/lvol0?

Where are my LV located now?

Best regards
Dennis Appelon Nielsen

wmdejen
23rd November 2007, 04:47 PM
Hi

Just created a new named VG (dm-3) and I'm now able to see the point.

I now have a sub folder under /dev/dm-3 there is a symbolic link to /dev/mapper/dm--3-lvol0

So I now understand that all LVMs are created under /dev/mapper with there VG name in front and then the LV name after...

Jongi
23rd November 2007, 08:13 PM
i found LVMs to be more trouble than they were worth. Except on my mythtv install.