From owner-freebsd-questions@FreeBSD.ORG Thu Oct 11 21:31:20 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE9EA16A481 for ; Thu, 11 Oct 2007 21:31:20 +0000 (UTC) (envelope-from jamesh@lanl.gov) Received: from mailwasher.lanl.gov (mailwasher.lanl.gov [204.121.3.2]) by mx1.freebsd.org (Postfix) with ESMTP id 6E8FC13C465 for ; Thu, 11 Oct 2007 21:31:20 +0000 (UTC) (envelope-from jamesh@lanl.gov) Received: from mailrelay2.lanl.gov (mailrelay2.lanl.gov [128.165.4.103]) by mailwasher.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l9BLVIQw011049; Thu, 11 Oct 2007 15:31:18 -0600 Received: from oppie-mail.lanl.gov (oppie-mail.lanl.gov [128.165.4.123]) by mailrelay2.lanl.gov (8.13.8/8.13.8/(ccn-5)) with ESMTP id l9BLVHQU019560; Thu, 11 Oct 2007 15:31:17 -0600 Received: from [128.165.86.10] (secretariat.lanl.gov [128.165.86.10]) by oppie-mail.lanl.gov (Postfix) with ESMTP id 75A871F8009; Thu, 11 Oct 2007 15:31:15 -0600 (MDT) From: James To: freebsd-questions In-Reply-To: <470E8FB6.1040208@phreaker.net> References: <470E7825.7070607@phreaker.net> <1192132684.33933.2.camel@secretariat.lanl.gov> <470E896A.6050802@phreaker.net> <1192136174.33933.13.camel@secretariat.lanl.gov> <470E8FB6.1040208@phreaker.net> Organization: Los Alamos National Laboratories Date: Thu, 11 Oct 2007 15:31:53 -0600 Message-Id: <1192138313.33933.25.camel@secretariat.lanl.gov> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 FreeBSD GNOME Team Port X-CTN-5-MailScanner-Information: Please see http://network.lanl.gov/email/virus-scan.php X-CTN-5-MailScanner: Found to be clean X-CTN-5-MailScanner-From: jamesh@lanl.gov X-Spam-Status: No Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "mr. phreak" Subject: Re: NFS export question && diskless dirs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jamesh@lanl.gov List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Oct 2007 21:31:20 -0000 On Thu, 2007-10-11 at 23:03 +0200, mr. phreak wrote: > James wrote: > > On Thu, 2007-10-11 at 22:36 +0200, mr. phreak wrote: > >> James wrote: > >> > > >> > > >> > On Thu, 2007-10-11 at 21:23 +0200, mr. phreak wrote: > >> >> hi. I have a question regarding NFS-exports. > >> >> > >> >> /etc/exports > >> >> /diskless/ro -ro -maproot=root leia > >> >> /diskless/kernels leia > >> >> /diskless/rw leia > >> >> /usr -ro -alldirs leia > >> >> /home -alldirs leia > >> >> /etc -ro -alldirs -maproot=root leia > >> >> > >> >> but mountd only recognize /diskless/ro - /usr - /home/ and /etc > >> >> (showmount -e). How can I export > >> >> > >> >> /diskless/ro -ro && /diskless/kernels with rw && /diskless/rw with rw > >> >> tothe same host??? > >> >> > >> >> Also, I have another question. Is it possible to run a diskless system > >> >> with /var and /tmp mounted > >> >> on a NFS-mount instead of using memory-disks? If possible, I'd gladly > >> >> appreciate some tips or > >> >> links. > >> >> > >> >> Best regards, > >> >> J > >> >> _______________________________________________ > >> >> freebsd-questions@freebsd.org mailing list > >> >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions > >> >> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org " > >> >> > >> > > >> > > >> > > >> > Check out the handbook page on NFS: > >> > > >> > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-nfs.html > >> > > >> > > >> > "In /etc/exports, each line represents the export information for one > >> > file system to one host. A remote host can only be specified once per > >> > file system, and may only have one default entry. For example, assume > >> > that /usr is a single file system. The following /etc/exports would be > >> > invalid: > >> > > >> > # Invalid when /usr is one file system > >> > /usr/src client > >> > /usr/ports client > >> > > >> > One file system, /usr, has two lines specifying exports to the same > >> > host, client. The correct format for this situation is: > >> > > >> > /usr/src /usr/ports client > >> > > >> > The properties of one file system exported to a given host must all > >> > occur on one line. Lines without a client specified are treated as a > >> > single host. This limits how you can export file systems, but for most > >> > people this is not an issue." > >> > >> Yeah, I know. I read it as well. I guess I'll have to create separate > >> filesystems if I want to export them with different permissions to the > >> same host... I thought the mountd -r was a sollution to skip that. But I > >> guess I was > >> wrong. > >> > >> > > > > > > Reading on in the handbook has this: > > > > The following is an example of a valid export list, where /usr and > > /exports are local file systems: > > > > # Export src and ports to client01 and client02, but only > > # client01 has root privileges on it > > /usr/src /usr/ports -maproot=root client01 > > /usr/src /usr/ports client02 > > # The client machines have root and can mount anywhere > > # on /exports. Anyone in the world can mount /exports/obj read-only > > /exports -alldirs -maproot=root client01 client02 > > /exports/obj -ro > > > > > > > > The handbook claims that /exports is a single file system, yet it treats /exports/obj as a separate entity > > on a separate line. I was wondering if this was a result of /exports being exported in its entirety. You might > > want to goof around with that, see if it'll let you do what you want to do. > > > > > I've played around, and my conclusion is that you can have the same > dirs/filesystems on seperate lines, IF the host entry isn't the same. > i.e if the example above would have client01 and client02 on /export/obj > it would be a > erratic entry. However it's a shame because it means you cannot export > subdirs of a same filesystem with different permissions to the same host(s). Well, now, that gives some hope. Open up /etc/hosts and make a couple of junk entries, like: 192.168.1.77 junkhost.host 192.168.1.78 junkhost2.host And use *them* in your exports to differentiate each nfs line. Even better, don't use hostnames in /etc/exports, just use junk ip addresses. That *surely* can't be the only way to permanently differentiate the lines, but it might be a good way to start. James