Solved

How to migrate a existing Lun with a different Lun

Posted on 2014-09-27
3
277 Views
Last Modified: 2014-10-07
As part of a Storage Migration project, Storage team allocated a new Lun for Swap disk as a replacement for the existing swap lun.

I have partitioned the new lun with the same partition table as existing lun.

Whats the next step I should follow so that it will not affect application running in the system. ( Migrating from old swap lun to new swap lun )

I want to replace the existing swap lun disk with the new swap lun.
0
Comment
Question by:bt74
3 Comments
 
LVL 21

Accepted Solution

by:
robocat earned 500 total points
ID: 40348348
Look for the old swap in the entries in /etc/vfstab and comment it out
(e.g.)
#/dev/dsk/c1d0s1 - - swap - no -

Next add a line in /etc/vfstab referring to the new slice you want to use

/dev/dsk/c5d0s1 - - swap - no -

Now remove the swap from active usage and add the new one

/usr/sbin/swap -d /dev/dsk/c1d0s1

/usr/sbin/swap -a /dev/dsk/c5d0s1

Check that everything went to plan:

swap -l

Make sure you refer the the correct devices or you could accidentally cause a lot of issues.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40348496
swapoff -a ; swapon -a
will stop using any swap you are using and use whatever it has in fstab.
0
 
LVL 16

Expert Comment

by:Joseph Gan
ID: 40351107
For Unix/Solaris OS, using /etc/vfstab to delete old swap lun, and add new swap lun. Then follow robacat's instruction.
For Linux OS, using /etc/fstab to delete old swap lun, and add new swap lun. Then follow gheist's instrauction.

You did not mentioned which OS you are using.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Each year, investment in cloud platforms grows more than 20% (https://www.immun.io/hubfs/Immunio_2016/Content/Marketing/Cloud-Security-Report-2016.pdf?submissionGuid=a8d80a00-6fee-4b85-81db-a4e28f681762) as an increasing number of companies begin to…
The question appears often enough, how do I transfer my data from my old server to the new server while preserving file shares, share permissions, and NTFS permisions.  Here are my tips for handling such a transfer.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question