Eric H. Johnson on 28 Sep 2013 16:54:49 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Spanning volumes with LVM (Ubuntu)


Rich, et al,

I have no idea what I did and I think I need to start over. I did notice
that I missed changing the partition type to 8e. So I undid the LVM and
started over, and this time missed the pvcreate and went straight to the
vgextend. While that tutorial
(http://www.tutonics.com/2012/11/ubuntu-lvm-guide-part-1.html) has the
information I want, I really hate the way the sections keep opening and
closing on me, especially in firefox, and I end up missing something. It
shows I don't really know what I am doing and just copying steps.

At any rate, I have no idea how to undo where I am and start over. The 1TB
drive (dsc) is now showing 2TB in size and coming in at sdb when it was
originally sdc. Now I just want to blow everything away and start over, but
I am not sure how to do that.

Output from FDisk
-----------------------------------------------------------
Disk /dev/sda: 3000.6 GB, 3000592982016 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00085ba9

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      499711      248832   83  Linux
/dev/sdb2          501758  1953523711   976510977    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sdb5          501760  1953523711   976510976   83  Linux

Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
90 heads, 3 sectors/track, 21705678 cylinders, total 5860533168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x6b727299

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  4294967294  2147482623+  8e  Linux LVM

Disk /dev/mapper/sdb5_crypt: 999.9 GB, 999945142272 bytes
255 heads, 63 sectors/track, 121569 cylinders, total 1953017856 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/ubuntu--vg-root: 995.6 GB, 995606134784 bytes
255 heads, 63 sectors/track, 121042 cylinders, total 1944543232 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/ubuntu--vg-swap_1: 4290 MB, 4290772992 bytes
255 heads, 63 sectors/track, 521 cylinders, total 8380416 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
-----------------------------------------------------------

Output from pvdisplay
-----------------------------------------------------------
  --- Physical volume ---
  PV Name               /dev/mapper/sdb5_crypt
  VG Name               ubuntu-vg
  PV Size               931.27 GiB / not usable 2.00 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              238405
  Free PE               11
  Allocated PE          238394
  PV UUID               aCUX6F-vi8y-tjAW-UCLt-yHlk-2Nez-Obnx8j
   
  --- Physical volume ---
  PV Name               /dev/sda1
  VG Name               ubuntu-vg
  PV Size               2.00 TiB / not usable 3.00 MiB
  Allocatable           yes 
  PE Size               4.00 MiB
  Total PE              524287
  Free PE               524287
  Allocated PE          0
  PV UUID               HeVXLC-Agvz-HoFt-sgo6-1Bmr-XVUy-jc0Jov
   
  "/dev/sdb" is a new physical volume of "2.73 TiB"
  --- NEW Physical volume ---
  PV Name               /dev/sdb
  VG Name               
  PV Size               2.73 TiB
  Allocatable           NO
  PE Size               0   
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               erHRAs-CrXF-VF5q-knUt-fBOr-2eYC-vkuub6
-----------------------------------------------------------   
  
Thanks,
Eric



Exact command lines and output would probably help here.

When you used pvcreate/pvextend, did you specify /dev/sdx1, or /dev/sdx?  If
the former there is a decent chance that you only partitioned 2GB.

As you point out ext3/etc can handle large volumes, but they'll only use
whatever lvm exposes to them.

Can you give us the output of pvs, vgs, and lvs?  That will probably make
more clear what is going on.

Also, running lvm alone on top of multiple volumes means that if any drive
fails you're going to lose a lot of data.  You should probably be running
md-raid underneath that unless you just intend to restore the whole thing
from backup anytime you lose a drive, or unless you're running something
like zfs/btrfs (in which case you wouldn't be using lvm).

Rich
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug