Dear Dev Team,
Attached is a patch against pvfs2-genconfig from pvfs 2.7.1 to allow
setting of the
filesystem name on the command line by adding the option:
--fsname
This makes it easier to automate creation of filesystems on the fly
The filesystem ID cold already be set with --fsid, but there was no way to
set the name with pvfs2-genconfig
Hope someone else finds this useful
Tony
Tony Kew
SAN Administrator
The Center for Computational Research
New York State Center of Excellence
in Bioinformatics & Life Sciences
701 Ellicott Street, Buffalo, NY 14203
CoE Office: (716) 881-8930 Fax: (716) 849-6656
CSE Office: (716) 645-3797 x2174
Cell: (716) 560-0910 Home: (716) 874-2126
"I love deadlines, I love the whooshing noise they make as they go by."
Douglas Adams
--- pvfs2-genconfig.orig 2008-06-27 15:58:23.000000000 -0400
+++ pvfs2-genconfig 2008-06-27 15:57:04.000000000 -0400
@@ -38,6 +38,7 @@ my $opt_first_handle = '';
my $opt_last_handle = '';
my $opt_root_handle = '';
my $opt_fsid = '';
+my $opt_fsname = '';
my $opt_default_num_dfiles = '';
my $opt_default_flow_buffer_size = '';
my $opt_default_flow_buffer_count = '';
@@ -507,6 +508,7 @@ Usage: pvfs2-genconfig [OPTIONS] <fs.con
--last-handle <NUM> last handle value to reserve
--root-handle <NUM> handle value to reserve for root object
--fsid <NUM> fs identifier value
+ --fsname <STRING> fs name
--default-num-dfiles <NUM> number of datafiles to use per file
(defaults to number of I/O servers)
--flow-buffer-size <NUM> set flowbuffersize in bytes
@@ -675,6 +677,17 @@ sub get_fsid
return $fsid;
}
+sub get_fsname
+{
+ my $fsname;
+ if ($opt_fsname) {
+ $fsname = $opt_fsname;
+ } else {
+ $fsname = "pvfs2-fs";
+ }
+ return $fsname;
+}
+
sub get_last_handle
{
my $last_handle;
@@ -1309,6 +1322,7 @@ GetOptions('protocol=s' => \$opt_prot
'flow-buffer-count=i'=> \$opt_default_flow_buffer_count,
'root-handle=i' => \$opt_root_handle,
'fsid=i' => \$opt_fsid,
+ 'fsname=s' => \$opt_fsname,
'trusted=i' => \$opt_security,
'server-job-timeout=i' => \$opt_server_job_timeout,
'client-job-timeout=i' => \$opt_client_job_timeout,
@@ -1493,6 +1507,7 @@ my $default_flow_buffer_size = get_defau
my $default_flow_buffer_count = get_default_flow_buffer_count();
my $root_handle = get_root_handle();
my $fsid = get_fsid();
+my $fsname = get_fsname();
my $server_job_timeout = get_server_job_timeout();
my $client_job_timeout = get_client_job_timeout();
@@ -1516,7 +1531,7 @@ if ($opt_security == 1)
$opt_trusted_network, $opt_trusted_netmask);
}
emit_aliases($output_target);
-emit_filesystem($output_target, "pvfs2-fs", $fsid, $root_handle,
+emit_filesystem($output_target, $fsname , $fsid, $root_handle,
$last_handle, $first_handle, $meta_count + $io_count, $default_num_dfiles,
$default_flow_buffer_size, $default_flow_buffer_count);
if ($opt_metaspec) {
_______________________________________________
Pvfs2-developers mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-developers