On Tuesday 13 March 2012 22:52:01 Bonno Bloksma wrote:
> 
> 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?
Older versions of fdisk by default aligns to cylinder. This is deprecated and 
not the case now. Simply suppress this warning by using -cu
> 
> 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?
> 
I think this is a bug in fdisk.
> 
> 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?
In fdisk, a block is 1024 bytes. The partition does not contain integral 
number of blocks, hence the + sign.
> 
> 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?
You should run partprobe(8) or reboot your machine.
> 
> 
> 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/201203161916.32502.mikl...@gmail.com

Reply via email to