Adding PVs to a group

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

 



Hello,

I'm still fairly new to using LVM, and I need to do something on a live server, so just need to be sure of what I'm doing...

Hardware:

3ware 9500S-8 Raid card with 8 Seagate 160GB hard drives

Ports 0 & 1 are mirrored, and contain:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         100      803218+  83  Linux
/dev/sda2             101         163      506047+  82  Linux swap
/dev/sda3             164        2654    20008957+  83  Linux
/dev/sda4            2655       19450   134913870   83  Linux

The other 6 are set up in a Raid 10, and contain:

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       24900   200009218+  8e  Linux LVM
/dev/sdb2           24901       58352   268703190   8e  Linux LVM

pvscan shows:

myhost # pvscan
  /dev/cdrom: open failed: Read-only file system
  Attempt to close device '/dev/cdrom' which is not open.
  PV /dev/sdb1   VG vg2   lvm2 [190.74 GB / 0    free]
  Total: 1 [190.74 GB] / in use: 1 [190.74 GB] / in no VG: 0 [0   ]
myhost #

lvscan shows:

myhost # lvscan
  ACTIVE            '/dev/vg2/home' [50.00 GB] inherit
  ACTIVE            '/dev/vg2/usr' [20.00 GB] inherit
  ACTIVE            '/dev/vg2/var' [120.74 GB] inherit
myhost #

So, /dev/sdb2 was being used for backups, but I was finally able to convince the boss to let me get a QNAP NAS, so am using that for backups now.

What I want to do is make the space from /dev/sdb2 available to my vg2 volume group, so I can extend my /var partition (it is filling up fast - damn email packrats)....

Am I correct in that all I need to do is:

vgextend vg2 /dev/sdb2

then I can extend any of the logical volumes?

What I want to do is add all of /dev/sdb2 to the /var partition, so am I correct taht to do this I would do:

lvextend -l %FREE /dev/vg2/var

(I think the %FREE is how I tell it to use all of it, right?)

then resize the filesystem (it is reiserfs):

umount /dev/vg2/var
resize_reiserfs /dev/vg2/var
mount -t reiserfs /dev/vg2/var /var

Thanks for any help and/or suggestions...

--

Best regards,

Charles

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux