From owner-freebsd-questions Tue Mar 26 8:44:55 2002 Delivered-To: freebsd-questions@freebsd.org Received: from smtp-1.enteract.com (smtp-1.enteract.com [207.229.143.33]) by hub.freebsd.org (Postfix) with ESMTP id 27CF237B400 for ; Tue, 26 Mar 2002 08:44:46 -0800 (PST) Received: from jamestown.21stcentury.net (24-148-18-101.na.21stcentury.net [24.148.18.101]) by smtp-1.enteract.com (Postfix) with ESMTP id 80584856E; Tue, 26 Mar 2002 10:44:45 -0600 (CST) Received: (from jtm@localhost) by jamestown.21stcentury.net (8.11.6/8.11.3) id g2QGii926255; Tue, 26 Mar 2002 10:44:44 -0600 (CST) (envelope-from jtm63@enteract.com) X-Authentication-Warning: jamestown.21stcentury.net: jtm set sender to jtm63@enteract.com using -f To: Annelise Anderson Cc: Nick Lozinsky , "P.B. Ruiter" , Peter Leftwich , FreeBSD Questions Subject: Re: /usr/home on separate disk? References: From: James McNaughton Date: 26 Mar 2002 10:44:44 -0600 In-Reply-To: Message-ID: <86vgbjjn2b.fsf@jamestown.21stcentury.net> Lines: 108 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Annelise Anderson writes: > On Tue, 26 Mar 2002, Nick Lozinsky wrote: > > > No, no, no...when you are trying to link a device from /dev, you just specify > > the device, so do this: > > > > ln -sf /dev/ad1s1e /usr/home > > > > "P.B. Ruiter" wrote: > > > > > I tried > > > > > > ln -sf /dev/ad1s1e/usr/home /dev/ad0s1g/usr/home > > > > > > which is an Operation Not Supported. How can I distinguish /usr/home on ad1 > > > from /usr/home on ad0? > > > > > > ----- Original Message ----- > > > From: "Peter Leftwich" > > > To: "P.B. Ruiter" > > > Cc: "FreeBSD Questions" > > > Sent: Tuesday, March 26, 2002 1:30 AM > > > Subject: Re: /usr/home on separate disk? > > > > > > | On Tue, 26 Mar 2002, P.B. Ruiter wrote: > > > | > Hi, I just installed a new freebsd box with two ide drives. As I intend > > > to use this as dedicated file/print/samba server on a mixed small office > > > network, I thought it a good idea to dedicate one drive to /usr/home. I > > > installed 4.5-Release as such with default settings for drive 0 and a single > > > slice /usr/home on drive 1 (and swap on both). > > > | > Filesystem 1K-blocks Used Avail Capacity Mounted on > > > | > /dev/ad0s1a 128990 31748 86924 27% / > > > | > /dev/ad0s1f 257998 4 237356 0% /tmp > > > | > /dev/ad0s1g 9044900 786382 7534926 9% /usr > > > | > /dev/ad1s1e 19099614 20 17571626 0% /usr/home > > > | > /dev/ad0s1e 257998 738 236622 0% /var > > > | > I realize there is already a /usr/home under /usr. How do I get rid of > > > this and point it to my /usr/home on ad1s1e? I tried rmdir /home within > > > /usr - this only gave me a busy reply. Please help... > > > | > Pieter > > > | > > > | Assuming both drives are mounted okay, and I don't know much about Samba - > > > | especially if it "honors" or "comprehends" symbolic links, but you could > > > | always do something like `ln -sf /dev/ad1s1e /dev/....` etc. > > > | > > > | man ln > > > | > > > | Hope this helps in no small way ;-) > > > | > > When you mount /usr/home on the other drive (e) it makes the previous > /home on /usr inaccessible, as far as I know, but does not destroy it. > You can experiment by putting a unique file in your /usr/home on > ad1s1e. > Without ad1s1e mounted, you should be able to get to the /usr/home on > ad0s1g. You could try mv'ing the home to a new name to see if you still > see it after /usr/home is mounted (thus enable you to move some stuff if > you like). Once you start playing with fstab, though, it is good to have > a strategy for getting back in and fixing things in case you get into an > unbootable situation, e.g., home directory does not exist. The symbolic > link for home (to /usr/home) should work for either situation and need > not be changed, it seems to me. > > I have a couple systems where I use /usr/local (including /usr/local/home) > as a separate file system, so the various ports as well as my home > directory get installed there and the base systems stays relatively > in its original state (and can thus be upgraded from scratch without > disturbing home directories or installed software. It depends on what > you want to do. > > Annelise > > -- > Annelise Anderson > Author of: FreeBSD: An Open-Source Operating System for Your PC > Available from: BSDmall.com and amazon.com > Book Website: http://www.bittreepress.com/FreeBSD/introbook/ The answer is simpler than anything I've read so far. According to the original poster's df output: Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad0s1a 128990 31748 86924 27% / /dev/ad0s1f 257998 4 237356 0% /tmp /dev/ad0s1g 9044900 786382 7534926 9% /usr /dev/ad1s1e 19099614 20 17571626 0% /usr/home /dev/ad0s1e 257998 738 236622 0% /var the filesystem on ad1s1e is mounted on /usr/home and no further action is necessary. This is exaclty what you want. The directory /usr/home on ad0s1g is the _mount_ _point_ for the file system on ad1s1e. If this file system was created during installation, then that should be good as is. However, if file hierachies were created on disk 0 under /usr/home prior to the second disk being newfsed and mounted, there may be inaccessible files under /usr/home which reside on disk 0. If this is the case and you want access to all the files (from both disk 0 and disk 1) you can use the union option for mount. Read the man page for mount for details. Alternately, you can "mkdir /usr/home2 ; mount /dev/ad2s1e /usr/home2". But this may complicate things. Best wishes.. Jim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message