Extend Multipath device on production server

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
bakyaraj
Posts: 11
Joined: 2016/10/05 15:53:58

Extend Multipath device on production server

Post by bakyaraj » 2016/10/10 16:35:35

Hi ,,

I have DB production server in my environment and its need to expand its data disk(/mnt/mysql/data).

And it is configured as multipath device.. So how can I extend the filesystem without any issues..


Thanks
Bakiyaraj

bakyaraj
Posts: 11
Joined: 2016/10/05 15:53:58

Re: Extend Multipath device on production server

Post by bakyaraj » 2016/10/10 16:50:32

I have resized the disk on SAN . And using multipathd -k'resize map mpath11' I have extended the disk.

When i checked with fdisk -l , It shows the extended disk space.

But when i do pvscan it failed to show the extended size, And it only shows previous size.

So help me on the rest of the process.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Extend Multipath device on production server

Post by aks » 2016/10/10 17:21:15

You need PV to "mark" the expanded disk space as a PV, so pvresize could do that, then use vgextend to extend the volume group and then expand your volumes (or create new volumes). Or just use gparted .....

bakyaraj
Posts: 11
Joined: 2016/10/05 15:53:58

Re: Extend Multipath device on production server

Post by bakyaraj » 2016/10/10 17:28:49

Hi aks,

Thanks for the reply.

I tried pvresize too..

# pvresize /dev/mpath/mpath11
Physical volume "/dev/mpath/mpath11" changed
1 physical volume(s) resized / 0 physical volume(s) not resized


And its not showing extended disk

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Extend Multipath device on production server

Post by aks » 2016/10/11 17:44:58

You should have a look at the man page, specifically:
EXAMPLES
Expand the PV on /dev/sda1 after enlarging the partition with fdisk:
pvresize /dev/sda1
did you resize the partition table?

Or as said earlier, use gparted

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Extend Multipath device on production server

Post by TrevorH » 2016/10/11 18:21:08

1 physical volume(s) resized / 0 physical volume(s) not resized
That says it did resize it. If you resized a PV that was already part of a VG then the space is now already available in the VG. Run vgs to see if it lists free space. Now you need to use lvextend or lvresize to make the LV larger.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

bakyaraj
Posts: 11
Joined: 2016/10/05 15:53:58

Re: Extend Multipath device on production server

Post by bakyaraj » 2016/10/11 19:28:48

I have tried "pvresize" command also it showed me as follows and when i check with "vgs" command it doesn't reflect the changes.

#pvresize /dev/mpath/mpath11

Physical volume "/dev/mpath/mpath11" changed
1 physical volume(s) resized / 0 physical volume(s) not resized

# vgs
VG #PV #LV #SN Attr VSize VFree
VolGroup00 1 2 0 wz--n- 203.12G 21.38G
vg_db05 1 1 0 wz--n- 1000.00G 0

# pvscan
PV /dev/mpath/mpath11 VG vg_db05 lvm2 [1000.00 GB / 0 free]
PV /dev/sda2 VG VolGroup00 lvm2 [203.12 GB / 21.38 GB free]

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Extend Multipath device on production server

Post by TrevorH » 2016/10/11 19:55:18

Show the output of fdisk or parted run against that device. I suspect it's larger but unpartitioned so you need to create new partition, run pvcreate on it, add it to the VG with vgextend...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

bakyaraj
Posts: 11
Joined: 2016/10/05 15:53:58

Re: Extend Multipath device on production server

Post by bakyaraj » 2016/10/11 20:39:25

Please check that sdb and sdc shows the real size (extended) of the disk , whereas /dev/dm-2 shows only old size.


# fdisk -l

Disk /dev/sda: 218.2 GB, 218238025728 bytes
255 heads, 63 sectors/track, 26532 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 26532 213013867+ 8e Linux LVM

Disk /dev/sdb: 1395.8 GB, 1395864371200 bytes
255 heads, 63 sectors/track, 169704 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 1395.8 GB, 1395864371200 bytes
255 heads, 63 sectors/track, 169704 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/dm-2: 1073.7 GB, 1073741824000 bytes
255 heads, 63 sectors/track, 130541 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-2 doesn't contain a valid partition table

Post Reply