Need to mount LUN on two linux boxs (one rw the other ro) caveat details inside

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Need to mount LUN on two linux boxs (one rw the other ro) caveat details inside
# 1  
Old 03-08-2012
Need to mount LUN on two linux boxs (one rw the other ro) caveat details inside

Calling all Linux GURU's.

The purpose of this thread is to try an recreate what we already have stood up in my environment, however the steps i am having to produce my own.

I have got multiple applications that dump the data to various LUNs, the LUNs are managed by an Enterprise SAN Storage System (Compellent). My backup server currently in place has all of the LUNs above mounted as RO, the LUN ACL's from the SAN are set such that the Backup server is RO and everything else is RW to the respective server and lun that it writes to.

Question 1) Give the above, if i setup a new rhel6 server, set the LUN ACL as RO from the SAN Server. Will I be able to map the existing lun into the server? I have been battling this for awhile, i assume the answer is no because in order import the VG and LVM you need limited write access to the partition table, correct?

Using test volumes and servers I was able to generate a work around, but unsure if i want apply to production data:
The LUN ACL's are Read Only rights from the SAN to the backup server. (this is how its setup on current backup server)


I have found a convoluted method but im concerned about data corruption

Using a test linux box and a test lun:
Mounted the lun to vm as raw mapped lun,
Create volume group vg0
Created the lvm volume lvol0
Put some dumb data


Go to new backup server:
Iscsiadm -m node -R
Pvscan
Vgscan
Lvscan

Vgchange -ay vg0
Lvchange -ay lvol0
(not mounting the lun just creating the links)

Go back to compellent remove mapping for lun on the new backup server, and then re add as read only.
Now go to backup server and mount.



Thoughts anyone?


# 2  
Old 03-08-2012
Tried your steps in my test environment. It works for me! However, I don't understand your question:
Quote:
Question 1) Give the above, if i setup a new rhel6 server, set the LUN ACL as RO from the SAN Server. Will I be able to map the existing lun into the server?
Are you trying to say that you want to map the LUN as read-only in the test RHEL box while it's mapped already in rw mode in another server?
# 3  
Old 03-08-2012
You should be able to map the LUN as it is and then mount it RO on the linux server and not need to use the ACL.
# 4  
Old 03-08-2012
I think a setup where there is concurrent access to the same lun ( or rather the underlying storage ) will lead to corruption unless something like for example a shared logical volume is being used, but even then you would need some kind of shared filesystem. This is because of caching/buffering that going on on the various hosts and they need to make each other aware of changes. I think you need to use something like snapshots for backup..
# 5  
Old 03-09-2012
It is done quite often in clusters, where either locking the file system or a cluster file system is used.
# 6  
Old 03-09-2012
Question rephrase: Given the above, if i setup a new rhel6 server, set the LUN ACL as RO from the SAN Server. Can I map the existing lun (RO ACL from the SAN) into the server, if so how?

Using iscsi initiator on the rhel6 backup server, I can see the luns, vgscan shows the vg's for the lun's, lvscan same. But I cannot activate the VG or LV. In /dev/ their isnt a corrosponding directory for the vg (and sub symbolic link), their arent any entries for the volumes in /dev/mapper.

When I did the work around when i activated the vg, it created the folder in /dev/ and then when i activated the lvm, it created the symbolic link in the /dev/vg-lun and in /dev/mapper.

Im trying to following good practices, im worried that my hacked method may lead to data corruption on my production luns.
# 7  
Old 03-09-2012
What you are doing is likely to lead to corruption.

Forget what you are doing. What are you trying to accomplish?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Mount a newly added LUN on a GNU/Linux distro

Hi I am not familiar with the linux, but I was asked to create a file system on a LUN from the NetApp that was mapped to the linux server. The server is runing: uname -a Linux localhost.localdomain 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux and now... (6 Replies)
Discussion started by: fretagi
6 Replies

2. Shell Programming and Scripting

How to list all autosys job boxs in command line?

Hi Gurus, I am newbie for autosys scheduler. I am wondering is there a command to list all job boxes or list all autosys jobs? Thanks in advance. (0 Replies)
Discussion started by: ken6503
0 Replies

3. Solaris

How to mount a shared LUN between two hosts?

i had bunch of luns from storedge 3310 mounted on a T2000 and being used. Then i added a second T2000 to the storage array but now i cant mount them on either nodes , i do see them in format though. these luns have data on them and they were mounted on one so how do i mount them read/write on... (5 Replies)
Discussion started by: aliyesami
5 Replies

4. Red Hat

adding LUN to linux server

Hi All, I am new for this blog and this is my first Query on this blog. I would like to dael with graet masters on linux. Here we go, After storage people created the LUN, How to add that LUN to Linux server. (Make that LUN visibility on linux server.) ? How to view the LUN... (5 Replies)
Discussion started by: abhay1983
5 Replies

5. Solaris

import lun data to mount point - Solaris 10

Hi Guys, I have EMC Storage and from this storage I have maped lun5 to Sun Solaris server and I have created on this lun mount point with name /application I have anothere Sun Solaris server and I'll colne lun5 to lun10 from storage level so the data of lun5 will be in lun10 how to... (6 Replies)
Discussion started by: Mr.AIX
6 Replies

6. AIX

Mount a SAN LUN which contains clone copy - AIX 6.1

Hello Everyone, Can someone help me to mount a SAN hdisk which contains a clone data copy(san) of the remote server to the another machine. Both servers are running in AIX. Thanks in advance ! Regards, Gowtham.G (3 Replies)
Discussion started by: gowthamakanthan
3 Replies

7. Red Hat

Can not change timestamp on directory inside cifs mount

Greetings, I have an rsync server that is unable to change the timestamp on any directories inside of cifs mounts. The same thing happens on all of my red hat machines. These machines are all patched, touch -t works on directories inside any other filesystem including NFS mounts. This is... (0 Replies)
Discussion started by: Create
0 Replies

8. Shell Programming and Scripting

Replace aword in a.The replaced word should not be overwitten in perl(details inside)

Hi i am trying to write a perl program where i have to open a 1)directory "unit" 2) rename the files in the dir say file1.txt;file2.txt...file5.txt to file1_a.txt;file2_a.txt,....file5_a.txt ;file1_x.txt ;file2_x.txt 3) open these renamed files and replace the words lets say file1_a.txt... (7 Replies)
Discussion started by: madhul2002
7 Replies

9. Filesystems, Disks and Memory

Finding SAN Lun's on Linux.

Am trying to differentiate between the local disks and LUN's presented from SAN onto the server. Have Tried fdisk -l, however I quite cudn't differentiate the local disks from SAN presented LUN's. Can you pls. let me know the procedure and commands to find this. OS - RHEL 4 SAN - EMC... (3 Replies)
Discussion started by: Crazy_murli
3 Replies

10. Shell Programming and Scripting

Perl log parcer. (for custom logs details inside)

OS:sol8 ok 2 things are very important. I will give examples of the logs and the client file for testing. Object: to display on the web sometime to parse your custom logs basied on the inputed date and client selected. I know alot of ppl are like who care. but i saw a perl script on here... (1 Reply)
Discussion started by: Optimus_P
1 Replies
Login or Register to Ask a Question