[mdlug] LVM problem
David Lee Lambert
lamber45 at msu.edu
Thu Jul 10 12:47:10 EDT 2008
I have a workstation with two 150-GB SATA drives. I have a single LVM
volume-group at the end of the second drive, but I wanted to put more
data in the volume-group or experiment with LVM's RAID-1 ability, so I
warm-booted to a rescue-CD, ran "resizext2fs" and "fdisk" to shrink the
root partition, and warm-booted back to Ubuntu Hardy.
I thought I had made a 3-GB swap partition right after the end of the
boot partition, and an unitialized LVM partiton after that:
root at koios:~# fdisk -l /dev/sda
Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000c764e
Device Boot Start End Blocks Id System
/dev/sda1 1 11750 94381843+ 83 Linux
/dev/sda2 11751 19452 61866315 5 Extended
/dev/sda5 11751 12116 2939863+ 82 Linux swap / Solaris
/dev/sda6 12117 19444 58862128+ 8e Linux LVM
However, when I try to initialize the partitions, I can't do it
directly with /dev/sdaX, and when I do it through /dev/mapper the sizes
are wrong:
root at koios:~# mkswap /dev/sda5
/dev/sda5: Device or resource busy
root at koios:~# mkswap /dev/mapper/sda5
Setting up swapspace version 1, size = 96647000 kB
no label, UUID=ae892961-2551-4135-b280-df56d16799a2
root at koios:~# pvcreate -v /dev/mapper/sda6
Wiping cache of LVM-capable devices
Set up physical volume for "/dev/mapper/sda6" with 5879727 available
sectors
Zeroing start of device /dev/mapper/sda6
Physical volume "/dev/mapper/sda6" successfully created
Is there something else I need to do to get the kernel to re-scan that
partition table?
--
David Lee Lambert
cell phone 586-873-8813
preferred e-mail davidl at lmert.com
More information about the mdlug
mailing list