Score:0

Single SAN with ocfs2 and gfs2

in flag
Ray

I have a single SAN with two virtual drives. (i.e., they are separate mounts, but they are mapped to the same IP address) For example, if I do ls /dev/disk/by-path/, I see this:

ip-172.16.100.5:3260-iscsi-iqn.[all same]-lun-0@
ip-172.16.100.5:3260-iscsi-iqn.[all same]-lun-1@
ip-172.16.100.6:3260-iscsi-iqn.[all same]-lun-0@
ip-172.16.100.6:3260-iscsi-iqn.[all same]-lun-1@

(There are two entries for each because I am using multipath as well.)

Currently, I'm using OCFS2 (Oracle Cluster Filesystem) for both virtual drives. However, I would like to try GFS2 with one of them. I think/hope that this is not a problem. It would be like a single server exports two filesystems, one using Samba and one using NFS. At least, that's what I think.

However, given that the other virtual drive (i.e., the one that will remain using OCFS2) has data, I would like to ask to see if anyone can see an issue with this.

The server is running Ubuntu 20.04 .

Any advice would be appreciated! Thank you!

Score:1
cn flag

No, GFS2 and OCFS2 cannot share the same LUNs. Switching between implies a storage migration to new volumes, perhaps via backup restore.

NFS and SMB are file share protocols. On the wire is a file abstraction, file system of the server does not matter. SMB and NFS servers exist for Windows, UNIX, and Linux, all exporting their favorite local file systems.

GFS2 and OCFS2, in contrast, are shared storage file systems. A SAN presents the same block device LUNs to multiple hosts. Distributed lock managers keep things consistent. Just like your favorite local file system, each has their own specific on disk structure. Similar to mounting an ext4 file system as xfs, refuses to mount at best and corruption at worst. Unlike local systems, they also need a lock manager API, and I don't think these two are compatible.

in flag
Ray
Thank you! The two virtual drives share the same IP address but, but have different LUNs. I guess the correct term is that they are different logical disks? If I `ls /dev/disk/by-path/`, I see two entries for each, as shown in my update to the question. Is it still a problem to have GFS2 for one and OCFS2 for the other? (And thank you for the link; that PDF file was very informative!)
John Mahowald avatar
cn flag
Set aside how many LUNs and/or paths you have for a minute. Shared storage file systems lay down their own disk format. Imagine XFS, but with a distributed lock manager. You can't just pretend it also is EXT4 formatted. Try to mount a *test* OCFS2 volume as GFS2 and see what happens.
in flag
Ray
Oh...sorry, I guess what I meant was I have a LUN 0 and LUN 1 both as OCFS2 now. Would it be safe to wipe LUN 1 and format it as a GFS2. Can LUN 0 as an OCFS2 and LUN 1 as a GFS2 (and both mounted as what they were formatted as) co-exist on the same SAN with the same IP address.
John Mahowald avatar
cn flag
Different LUNs can be different file systems, its all just blocks. Otherwise how else would SANs serve heterogeneous environments. Up to you to accomplish such a migration safely, again probably via backup restore.
in flag
Ray
I see! So, initially, the concern you raised was based on OCFS2 and GFS2 with the same LUN -- which, as you pointed out, can't be done. As for why I'm doing it...I guess it's to see if GFS2 is "better". I'm having an issue with OCFS2 that has already made me perform a backup. So, I need to restore and I guess I'm asking myself if I should restore to OCFS2 again or give GFS2 a try (given another LUN on the same SAN is OCFS2). At least it's ok to try... Thank you very much for your help; seems hard to find information about them.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.