Wednesday, 11 February 2015

change physical disks, stuck topic






I am running 12.04 64bit, on 512gig drive. I have upgraded the system hardware (processor and memory) so why not the disk..
have a spare 1.5t drive, slightly faster than 512g drive

added 1.5t as second physical

used dd -f /dev/sda /dev/sdb

to clone
shut down, removed old drive
put new drive data cable in same sata port
powered on, booted fine...

gparted says the drive has ~1t free, as expected
won't let me resize it into the free space

I used lvm lvdisplay to display the lvms..

had 2. /dev/servername/root, mounted at /
and /dev/servername/swap_1

I turned off swap swapoff -a
then deleted the second lvm
lvdelete /dev/servername/swap_1

then gparted would allow me to expand the partition, so I did to full volume.
the LVM overlay (type 83) also expanded.

however, none of the free space when to the lvm labeled /dev/servername/root

I 'know' that this is inside the extended partition on the drive and inside the type 83 partition.

I just don't know how to resolve this.

vgextend fails, no free space
lvextend wants a physical volume

sam@buildserver:~$ sudo fdisk -l

Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007232d

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 499711 248832 83 Linux
/dev/sda2 501758 2930276351 1464887297 5 Extended
/dev/sda5 501760 2930276351 1464887296 8e Linux LVM

Disk /dev/mapper/buildserver-root: 497.7 GB, 497658363904 bytes
255 heads, 63 sectors/track, 60503 cylinders, total 971988992 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/buildserver-root doesn't contain a valid partition table

sam@buildserver:~$ sudo lvm

lvm> vgdisplay
--- Volume group ---
VG Name buildserver
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size 465.52 GiB
PE Size 4.00 MiB
Total PE 119173
Alloc PE / Size 118651 / 463.48 GiB
Free PE / Size 522 / 2.04 GiB
VG UUID Ni929b-IYXj-FkUU-wvYJ-q0RD-FeTJ-lV5PSF

lvm> lvdisplay
--- Logical volume ---
LV Name /dev/buildserver/root
VG Name buildserver
LV UUID Jgsm3I-1sfz-M3ce-f3a7-oxCc-xmPY-95rRai
LV Write Access read/write
LV Status available
# open 1
LV Size 463.48 GiB
Current LE 118651
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0

lvm> pvdisplay
--- Physical volume ---
PV Name /dev/sda5
VG Name buildserver
PV Size 465.52 GiB / not usable 1.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 119173
Free PE 522
Allocated PE 118651
PV UUID KcUCtV-Ay12-U0bK-A2tP-TCci-oSoQ-gDVysz

lvm> pvs
PV VG Fmt Attr PSize PFree
/dev/sda5 buildserver lvm2 a- 465.52g 2.04g

lvm> pvscan
PV /dev/sda5 VG buildserver lvm2 [465.52 GiB / 2.04 GiB free]
Total: 1 [465.52 GiB] / in use: 1 [465.52 GiB] / in no VG: 0 [0 ]

lvm> lvscan
ACTIVE '/dev/buildserver/root' [463.48 GiB] inherit

lvm> lvmdiskscan
/dev/ram0 [ 64.00 MiB]
/dev/dm-0 [ 463.48 GiB]
/dev/ram1 [ 64.00 MiB]
/dev/sda1 [ 243.00 MiB]
/dev/ram2 [ 64.00 MiB]
/dev/ram3 [ 64.00 MiB]
/dev/ram4 [ 64.00 MiB]
/dev/ram5 [ 64.00 MiB]
/dev/sda5 [ 1.36 TiB] LVM physical volume
/dev/ram6 [ 64.00 MiB]
/dev/ram7 [ 64.00 MiB]
/dev/ram8 [ 64.00 MiB]
/dev/ram9 [ 64.00 MiB]
/dev/ram10 [ 64.00 MiB]
/dev/ram11 [ 64.00 MiB]
/dev/ram12 [ 64.00 MiB]
/dev/ram13 [ 64.00 MiB]
/dev/ram14 [ 64.00 MiB]
/dev/ram15 [ 64.00 MiB]
0 disks
18 partitions
0 LVM physical volume whole disks
1 LVM physical volume
lvm>

I've attached a scren shot of the gparted screen
the disk utility for both physical and the vm

I didn't want to split the vg across volumes as I eventually want to add back the old drive as a second storage facility.

any guidance for this newbie welcomed.











Attached Images












No comments:

Post a Comment