Article View: news.software.nntp
Article #55033Re: Almost there......what's the cause of this?
From: Tricia C. Sesar
Date: Thu, 08 Nov 2001 02:26
Date: Thu, 08 Nov 2001 02:26
45 lines
2498 bytes
2498 bytes
> The best way to handle CNFS buffers on block devices is to create new
> devices for the disk slices that you intend to use. I use the following
> script to do that:
>
> #!/usr/bin/perl -w
> $ID = q$Id: mkdiskdev,v 0.1 1999/03/04 06:24:55 eagle Exp $;
> #
> # mkdiskdev -- Construct a disk block device.
> #
> # Written by Russ Allbery <rra@stanford.edu>
> # Copyright 1998 Board of Trustees, Leland Stanford Jr. University
> #
> # Use this to generate block devices for use as cycbuffs under CNFS. It
> # uses ls -lL to find the correct major and minor numbers for a given
> # device, uses mknod to create a new copy of it in the given directory, and
> # then chowns it to news.news.
> #
> # Usage: mkdiskdev <device> <directory>
>
> use vars qw($ID);
>
> unless (@ARGV == 2) { die "Usage: $0 mkdiskdev <device> <directory>\n" }
> my ($device, $directory) = @ARGV;
> unless (-e "/dev/dsk/$device") { die "$0: device $device not found\n" }
> my $ls = `ls -lL /dev/dsk/$device`;
> my ($major, $minor);
> if ($ls =~ /(\d+),\s+(\d+)/) {
> $major = $1;
> $minor = $2;
> } else {
> die "$0: can't find major and minor numbers for $device\n";
> }
> system ('mknod', "$directory/$device", 'b', $major, $minor) == 0
> or die "$0: mknod exited with status ", ($? >> 8), "\n";
> my $uid = getpwnam 'news';
> my $gid = getgrnam 'news';
> chown ($uid, $gid, "$directory/$device")
> or die "$0: can't chown device: $!\n";
>
>
Thanks again, all!!!
Technical Details
Message-ID:
<3BE9ED3F.253FA6FF@rcn.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!feed2.news.rcn.net!feed1.news.rcn.net!rcn!not-for-mailReferences:
<3BE988EA.9BCDECDC@rcn.com> <ylg07q9fud.fsf@windlord.stanford.edu>Show Full Headers
Complete Article Headers
Message-ID: <3BE9ED3F.253FA6FF@rcn.com> Subject: Re: Almost there......what's the cause of this? Date: Wed, 07 Nov 2001 21:26:07 -0500 From: "Tricia C. Sesar" <trixee@rcn.com> References: <3BE988EA.9BCDECDC@rcn.com> <ylg07q9fud.fsf@windlord.stanford.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!feed2.news.rcn.net!feed1.news.rcn.net!rcn!not-for-mail Newsgroups: news.software.nntp Lines: 44 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: UmFuZG9tSVYVaQwOOuhpPtJ3i2lmdLMCz/IcofA6RFPn11oj77JC9ZF1By/Y+1kb X-Complaints-To: abuse@rcn.com NNTP-Posting-Date: 8 Nov 2001 02:28:58 GMT X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.4.13 i586) X-Accept-Language: en