[mdlug] LVM problem
Jeff Hanson
jhansonxi at gmail.com
Thu Jul 10 15:33:56 EDT 2008
On Thu, Jul 10, 2008 at 12:47 PM, David Lee Lambert <lamber45 at msu.edu> wrote:
> 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.
Your setup seems backwards. I did a md/RAID1 > LVM2 > LUKS/dm-crypt.
Putting LVM on RAID seems more logical to me although I don't know why
it wouldn't work the other way around or what the performance
differences would be.
> 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
Something is really strange there. Did you swapoff before you tried
to mkswap? Check with the "free" command to see if swap was being
used. Mine does go through mapper because it's on RAID then
encrypted.
More information about the mdlug
mailing list