19.06.2015 Views

ADMIN

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

To do this, you need to<br />

change the mount type from<br />

cluster to local. After doing<br />

so, only a single computer<br />

can mount the filesystem,<br />

and it doesn’t need the cluster<br />

stack to do so.<br />

In all of these actions, you<br />

need to be aware that the<br />

filesystem can be mounted<br />

by more than one computer.<br />

Certain actions that involve,<br />

say, tunefs.ocfs2, will not<br />

work if another computer accesses<br />

the filesystem at the<br />

same time.<br />

The example in Listing 6<br />

shows the user attempting<br />

to modify the label. This<br />

process fails, although the<br />

filesystem is offline (on this<br />

computer). In this case,<br />

mounted.ocfs2 will help: It<br />

checks the OCFS2 header to<br />

identify the computer that is<br />

online with the filesystem.<br />

The most important filesystem<br />

structure data are contained<br />

in the superblock. Just<br />

like other Linux filesystems,<br />

OCFS2 creates backup copies<br />

of the superblock; however,<br />

the approach the OCFS2<br />

developers took is slightly<br />

unusual.<br />

OCFS2 creates a maximum<br />

of six copies at non-configurable<br />

offsets: 1, 4, 16, 64,<br />

and 256GB and 1TB. Needless<br />

to say, OCFS2 volumes<br />

smaller than 1GB (!) don’t<br />

have a copy of the superblock.<br />

To be fair, mkfs.ocfs2<br />

does tell you this when you<br />

generate the filesystem. You<br />

need to watch out for the<br />

Writing backup superblock:<br />

... line.<br />

A neat side effect of these<br />

static backup superblocks is<br />

that you can reference them<br />

by number during a filesystem<br />

check. The example in<br />

Listing 7 shows a damaged<br />

primary superblock that is<br />

preventing mounting and<br />

a simple fsck.ocfs2 from<br />

working. The first backup<br />

makes it possible to restore.<br />

Basically, Yes, but …<br />

On the whole, it is easy to<br />

set up an OCFS2 cluster. The<br />

software is available for a<br />

number of Linux distributions.<br />

Because OCFS2 works<br />

just as well with iSCSI and<br />

Fibre Channel, the hardware<br />

side is not too difficult either.<br />

Setting up the cluster framework<br />

is a fairly simple task<br />

that you can handle with<br />

simple tools like Vi.<br />

Although OCFS2 doesn’t<br />

include sophisticated fencing<br />

technologies, in contrast<br />

to other cluster filesystems,<br />

fencing is not necessary in<br />

many areas. The lack of a<br />

cluster-capable volume manager<br />

makes it easier for the<br />

user to become immersed in<br />

the world of OCFS2. Because<br />

OCFS2 is simpler and less<br />

complex than other cluster<br />

filesystems, it is well worth<br />

investigating.<br />

n<br />

Info<br />

[1] OCFS2: [http:// oss. oracle. com/​<br />

projects/ ocfs2/]<br />

[2] First NFS RFC: [http:// tools. ietf.​<br />

org/ html/ rfc1094]<br />

[3] OpenAFS:<br />

[http:// www. openafs. org/]<br />

[4] GFS: [http:// sources. redhat.​<br />

com/ cluster/ gfs/]<br />

[5] Lustre: [http:// wiki. lustre. org]<br />

[6] Ceph:<br />

[http:// ceph. newdream. net/]<br />

[7] DRBD: [http:// www. drbd. org/]<br />

The Author<br />

Udo Seidel is a teacher of math and<br />

physics and has been an avid supporter<br />

of Linux since 1996. After<br />

completing his PhD, he worked as a<br />

Linux/​Unix trainer, system administrator,<br />

and senior solutions engineer.<br />

He now works as the head of a<br />

Linux/​Unix team for Amadeus Data<br />

Processing GmbH in Erding, Germany.<br />

Linux Pros read<br />

LINUX PRO<br />

Enjoy a rich blend of tutorials, reviews,<br />

international news, and practical<br />

solutions for the technical reader.<br />

Subscribe now<br />

to receive:<br />

3 issues<br />

+ 3 DVDs<br />

for only<br />

$<br />

3.00!<br />

www.linuxpromagazine.com/trial<br />

www.admin-magazine.com<br />

Admin 01<br />

41

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!