Hi, I have been using Linux for several years but now I have another learning moment. ;-) I have read several LVM howto sites but still run into things I do not understand. Can someone please answer the 4 embedded questions and tell me what I(?) did wrong.
Using the 6.0.4 amd netinst CD I created a small 10GB virtual machine (VM). I then realized I needed it to be a bit bigger so I wanted to extend the LVM environment and add that space to the /var logical volume. Of course as this is a new VM I just could have started from scratch but I am trying to learn something as well. ;-) First I had a look at the current disk layout using fdisk -l root@wwwgw:~# fdisk -l Disk /dev/sda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000d6e97 Device Boot Start End Blocks Id System /dev/sda1 1 37 291840 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 37 1306 10190849 5 Extended /dev/sda5 37 1306 10190848 8e Linux LVM 1) Why the warning about the 300MB /boot partition not ending on a cylinder boundary? I used the manual setup in the Debian 6.0.4 installation and told it to create a 300MB partition at the beginning of the disk. Did the installation software do something wrong or should I have know something I do not know yet? 2) After that came a lot of warnings about /dev/dm-0, /dev/dm-1, /dev/dm-2, /dev/dm-3 and /dev/dm-4. I know those are LVM2 devices but... Why is fdisk (still) seeing them as disks/partitions it has to show during a listing, and then complain they are not valid? At the VMware level I increased the disk from 10GB to 12GB. Using cfdisk, which in my opinion gives less cause for a user error, I created a new logical sda6 partition in the free space. The end result is: root@wwwgw:~# fdisk -l Disk /dev/sda: 12.9 GB, 12884901888 bytes 255 heads, 63 sectors/track, 1566 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000d6e97 Device Boot Start End Blocks Id System /dev/sda1 1 37 291840 83 Linux Partition 1 does not end on cylinder boundary. /dev/sda2 37 1566 12285008 5 Extended /dev/sda5 37 1306 10190848 8e Linux LVM /dev/sda6 1306 1566 2094127+ 8e Linux 3) Why is there a + at the end of the number of blocks? I then want to make the sda6 partition a LVM physical volume using root@wwwgw:~# pvcreate /dev/sda6 Device /dev/sda6 not found (or ignored by filtering). root@wwwgw:~# indeed, there is no /dev/sda6 yet. 4) Why is /dev/sda6 not there yet? What step am I missing? Ok, after a reboot (it is not a production server yet) the /dev/sda6 is there. Form here on it was (almost) straight sailing. ;-) root@wwwgw:~# pvcreate /dev/sda6 Physical volume "/dev/sda6" successfully created root@wwwgw:~# vgextend vgroup1 /dev/sda6 Volume group "vgroup1" successfully extended Then to runlevel 1 to make sure (almost) nothing is using the /var directory tree and root@wwwgw:~# lvextend -l+2G /dev/vgroup1/lvvar Extending logical volume lvvar to 3.86GiB Logical volume lvvar successfully resized root@wwwgw:~# umount /var Then first a filesystem check as that seems to be needed before resizing. Not doing so will give me a warning although this was not mentioned in the HOWTOs I have read. root@wwwgw:~# fsck -f /dev/vgroup1/lvvar root@wwwgw:~# resize2fs /dev/vgroup1/lvvar root@wwwgw:~# mount /var and back to runlevel 2 Anything else I missed? Bonno Bloksma -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/89d1798a7351d040b4e74e0a043c69d70103c...@einexch-01.tio.nl