1752314 Members
5531 Online
108786 Solutions
New Discussion

Re: LVM migration

 
rescuehp17
Frequent Advisor

LVM migration

Hello,

I am trying to migrate the LVM which has 11disks of 256Gb together but for filesystem which i am trying to migrate has only 28Gb allocated. These 11 disks are part of different file systems on the same volume group. I thought to migrate to a 60Gb lun as when I mirror it should have double the disk space but it is failing as may be expecting 256x2 disk space?

How can I migrate to 60Gb lun or what is the best approach to solve this? 

Thank you in an advance!

 

5 REPLIES 5
TTr
Honored Contributor

Re: LVM migration

You need to give more details here.

OS version?
Current configuration details? "11 disks of 256Gb" does not say much. Is it local, SAN based? How is it allocated?
New environment? Where are you getting the new environment from?
Unless you give more details, you can not mirror 256GB-11disks down to 60GB-one-disk

rescuehp17
Frequent Advisor

Re: LVM migration

OS version is 11.31. 11 disks are SAN storage.

/test filesystem is under vgtest, where the logical volume has 11 SAN disk luns of 25Gb each but the LVM is allocated to only 28Gb and that 28Gb is the size of the FS /test. I am trying to migrate from one SAN to different SAN. During this process without downtime, I am migrating and is successful on many servers. This server has different layout and I requested the SAN lun depending on the size of the FS not realizing the same disks are shared with different file systems(logical volumes). So instead of requesting 600Gb luns to mirror all 11 disks, and share the same disks with different file systems on the same volume group, can I migrate to dedicated luns of 60gb or something around that and seperate the disks of its own file system?

 

TTr
Honored Contributor

Re: LVM migration

Can you post the output of "vgdisplay -v /dev/vgtest"

At the LVM level, if your logical volume covers all 256GB, you would have to lvreduce the LV first before you can mirror to a smaller disk. Instead of mirroring you can also use pvmove.

Otherwise you can create a new LV and a new filesystem and copy the filesystem over.

rescuehp17
Frequent Advisor

Re: LVM migration

oh ok, thank you

Bill Hassell
Honored Contributor

Re: LVM migration

...lvreduce...

Be very careful with lvreduce.  You must always reduce the filesystem size first. If you have Online JFS, you can use the fsadm command to change the size of the filesystem. When reducing a filesystem, this command moves any files and directories that exist beyond the new smaller size.

If you don't have Online JFS, there is no way to reduce a filesystem. You must create a new lvol the size you need, initialize the filesystem on it, mount it, then copy the data to the new filesystem.

If you just use lvreduce, sectors that are in use by the filesystem will be destroyed.



Bill Hassell, sysadmin