LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Adding a SAN attached LUN to Red Hat (https://www.linuxquestions.org/questions/linux-newbie-8/adding-a-san-attached-lun-to-red-hat-4175579562/)

Hsingh 05-11-2016 05:56 PM

Adding a SAN attached LUN to Red Hat
 
I am transitioning from a SAN admin to Linux admin, so hopefully this is not too dumb of a question. I need to extend a FS, which has SAN attached PV in its Vol Group.
Can I just extend the LUN from Storage array ( NetApp ) or do I need to assign a new LUN and add that to existing Vol group and then extend the Volume ?

jpollard 05-11-2016 08:27 PM

Usually expanding LUN would be done on the NetApp, then the filesystem expanded by the host.

This allows the NetApp to optimize the storage (even to copying the blocks if necessary) without affecting the data.

Now doing something like changing the stripe width on the NetApp would be a different thing. I don't know if the current NetApp OS knows how to copy a lun and still get the block addressing right. I believe it would have to copy the lun to a new one for that to work. Adding to a lun (without changing the striping) should be easy - just append the extension to the end of the existing LUN. I believe the documentation for the NetApp would have the instructions (though the specific instructions might be hard to find - I found their documentation fairly complete, but with some things scattered).

One problem with expanding the filesystem is that some things don't necessarily get expanded (inode table I think, but not sure). If the filesystem is xfs, no problem as the inode list is already dynamically expandable (which is why you may see huge inode numbers - I think they are also the block number of the inode).

NOTE: It has been over 5 years since I worked with NetApp storage devices.

As always, be sure you have something for a backup. Sometimes it is easier and safer to create a new bigger lun, create the new filesystem, and copy the old filesystem. The old lun is the backup...

syg00 05-11-2016 08:58 PM

Note you can't "just add" it - regardless of whether you extend the LUN or add a new one. The new space needs to be formatted for LVM use (pvextend or pvcreate), then the vg extended, then the lv. And before all that you may need to re-scan the bus to make the new/extended storage seen by Linux.
Redhat have some beaut manuals on this.

jpollard 05-12-2016 05:29 AM

True if the system is using lvm on top of the lun.

The usual point of using a SAN is to simplify - and use the SAN to perform that. All the host should see is that the LUN got larger.

Hsingh 05-12-2016 10:01 AM

Thanks for the replies. NetApp's OS will handle the block sizes, and this server already has NetApp LUNs presented.
The previous system admin has been adding new LUNs and then add them to the VG. The only down side with that is now we have several physical volumes to manage.

Now If I can just figure out how to re scan the scsi bus without having to reboot the box :-)

jpollard 05-12-2016 10:13 AM

Since it is a RH based system, there should be an admin script already available:

https://access.redhat.com/documentat...-scsi-bus.html

Not sure where it is in RH 6/7 though.

Another possiblity is documented here:

http://serverfault.com/questions/490...ost0-scan-mean

and I think the shell script referenced above uses this method.

Hsingh 05-13-2016 04:50 PM

Thanks for your help ! Ran into some problems but was able to figure this out.


All times are GMT -5. The time now is 12:26 AM.