Quicksearch

Disclaimer

The individual owning this blog works for Oracle in Germany. The opinions expressed here are his own, are not necessarily reviewed in advance by anyone but the individual author, and neither Oracle nor any other party necessarily agrees with them.

Monday, March 24. 2008

Okay, we will use the simplest case of archiving. Itīs disk archiving. In this configuration SamFS doesnīt use a tape drive for storing data, it simply uses filesystems, or to be more precise, it useses a directory in a filesystem to store itīs data.

Prerequisites

Okay, iīve created two iSCSI-base diskpool at the start to use them as disk archives. Now i will put some further seperation in them by creating directories in it.

Configuring the archiver

So, we have to start to configure the archive medias. Every archive media has itīs VSN. VSN is a shorthand for Volume Serial Name. The VSN identifies a media of your archive. In this case we assign the VSN disk01 with the directory /samfs_archive_1/dir1/

Now we have usable devices for archiving. But have to configure the archiving as the next step. In this step we define the policies for archiving, control the behaviour of he archiver and associate VSNs with archive sets. All this configuration takes place in the file /etc/opt/SUNWsamfs/archiver.cmd.

Okay, lets create such a config file for our environment.

logfile = /var/opt/SUNWsamfs/archiver/log
interval = 2m

Okay, this is easy: The archiver should log itīs work into the file /var/opt/SUNWsamfs/archiver/log. This file is really interesting. I will show you a nifty trick with it later in this tutorial.

The interval directive was responsible for defining the interval between the starts of a process for finding new or updated files (sam-arfind). This behaviour didnīt scaled very well with millions of files in a directory.

Today the default is different. The file system itself knows what files have been updated and SamFS stores this information in a list. Today this setting has a similar effect, but with other methods: Itīs the default setting for the archive aging. It defines the amount of time between the first file added to the todo list for the archiver and the start of the archive. Thus the archiving would start two minutes after adding the first file to the list.

Now we define the archiving policy for the filesystem:

fs = samfs1
arset0 .
1 30s
2 1200s

What does this mean? arset0 is a name of a so called archive set. The contents of this set are defined later-on. The . stands for "every file in the filesystem". Okay, now we tell SamFS to make a first copy to the archiveset arset0.1 after 30 seconds. The second copy is made to the archiveset arset0.1 after 1200 seconds (20 minutes). We have just used the name of some archive sets, now we have to declare them:

vsns
arset0.1 dk disk01
arset0.2 dk disk03
samfs1.1 dk disk02
endvsns

Okay, The translation is quite simple: The archiveset arset0.1 consists is a disk based set and consists out of the VSN disk01. The same for the archive set arset0.2. But wait, we didnīt used an archiveset samfs1.1 so far. Well, you havenīt defined it explicitly. But itīs implicit when you have an archiver configuration for an filesystem. Itīs the default archive set. You can use it for regular archiving, but as we havenīt defined a policy to do so, this archive set is used for storing the meta data of your filesystem. So the assoscation of a VSN to this archive set is mandatory.

So we end up with the follwing archiver.cmd

logfile = /var/opt/SUNWsamfs/archiver/log
interval = 2m

fs = samfs1
arset0 .
1 30s
2 1200s

vsns
arset0.1 dk disk01
arset0.2 dk disk03
samfs1.1 dk disk02
endvsns

Okay, weīve finalized our configuration: Now we have to check the configuration:

You see, your archival media starts to populate. But where are your files, and whatīs up with this f1. Well, they are written in a very specific, very secret and very closed format: These files are simple tar files. SamFS uses the standard tar format to write the archive file.You can look in it with the standard tar or the tar of SamFS:

Less known Solaris features: SamFS
Part 1: Introduction.html Part 2: The theory of Hierarchical Storage Management Part 3: The Jargon of SamFS Part 4: Installation of the packages Part 5: Configuring a SamFS filesystem Part 6: Configuring disk archiving Part 7: Working with SamFS Pa