Less Known Solaris features: SamFS - Part 6: Configuring disk archiving
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.
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
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
Okay, lets create such a config file for our environment.
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.
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:
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:
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
Okay, we´ve finalized our configuration: Now we have to check the configuration:
Now we tell SamFS to reread it´s config-files
And now we have a running archiver. So … let´s have some fun with it. Copy some files in it. I tend do test it by makeing a recursive copy of the
Now let´s look onto our archival disks:
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:
Please notice, that this isn´t a version of Joerg Schillings star despite of the name.