Trying to move /usr
Jerry McAllister
jerrymc at msu.edu
Mon Aug 20 12:45:30 PDT 2007
On Mon, Aug 20, 2007 at 12:08:06PM -0400, Michael S wrote:
> Jerry,
>
> *** When I untarred the file I had everything under
> /user/usr. I was under /user/usr and then I did mv *
> ..
>
> I then edited fstab and changed
> /dev/da2s1d to be /usr, instead of /user
>
> And of course the old /usr I switched to /user
Well, that sounds like the right way.
except that I would have done
cd /
mv /usr/usr /usr
That has worked for me in the past similar situations.
Since you say you have switched back - I presume by editing /etc/fstab -
have you checked the contents of /user which should be the new copy
of /usr to make sure it looks right - matches the old one pretty well?
////jerry
>
> Thanks in advance
> --- Jerry McAllister <jerrymc at msu.edu> wrote:
>
> > On Mon, Aug 20, 2007 at 11:10:12AM -0400, Michael S
> > wrote:
> >
> > > Good morning everyone,
> > >
> > > I am trying to migrate my /usr to a newly
> > installed
> > > SCSI drive. Up until yesterday I had /, /var, /usr
> > on
> > > a 5 Gig drive and my /home was on another 60 Gig
> > > drive, which was fine because it had no GUI and
> > > functioned mostly as a server.
> > >
> > > Last night I added a third drive, with a capacity
> > > around 18G; since my other two drives are
> > hard-wired
> > > in /boot/device.hints, there were no problems with
> > > device numbering. I wrote down the device name
> > > (/dev/da2) and proceeded to sysinstall to first
> > create
> > > a FreeBSD partition and then the only slice within
> > > that partition. I named it /user.
> >
> > You have that backwards. You created one slice on
> > the disk
> > and one partition within that slice. Minor thing,
> > but can
> > confuse communication.
> >
> > > I then tarred up /usr
> > > Tar cf /user/usr.tar /usr
> > >
> > > Extracted the tar file and moved everything one
> > > directory up, because otherwise everything were
> > under
> > > /user/usr.
> > >
> > > I made the necessary adjustnments in /etc/fstab,
> > that
> > > is I switched /usr and /user around.
> >
>
>
> > I am not completely sure just what you mean by
> > 'moved one directory up'
> > and 'switched /usr and /user around'.
> > It sounds an awful lot like you are saying you
> > modified /etc/fstab to mount
> > this new partition (probably /dev/da2s1a, though
> > the 'a' might be
> > something else) as /user instead of /user/usr.
> >
> > But, the new partition needs to be mounted as /usr
> >
> >
> > > After reboot, I wasnt getting the prompt, since
> > the
> > > binaries for displaying the prompt are located
> > under
> > > /usr/bin (or /usr/sbin?) and my guess was that
> > /usr
> > > wasnt mounting properly. I restarted the machine,
> > > this time going into single user mode. Trying to
> > mount
> > > a gave me an error message: Error mounting
> > /usr/home.
> > > I then created home directory under the new /usr,
> > I
> > > tried mount a, this time it worked, but when I
> > > rebooted, I wasnt getting my home directory. When
> > I
> > > login as an unprivileged user michael, the
> > message
> > > is something like: User has no home directory.
> > >
> > > For now I reverted to using the old /usr.
> > >
> > > Anyone attempted to migrate /usr and fell for
> > similar
> > > kind of problems? Any suggestions will be
> > appreciated.
> > >
> > > P.S. I am not next to that machine right now, so I
> > > cant provide the exact fstab or dmesg output.
> >
> > I guess we need the actual /etc/fstab to be sure
> > just what
> > has been done. Maybe also some dmesg output that
> > shows the
> > disk devices could be useful too.
> >
> > ////jerry
> >
> > >
> > > Thanks in advance,
> > > Michael
> > > _______________________________________________
> > > freebsd-questions at freebsd.org mailing list
> > >
> >
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > > To unsubscribe, send any mail to
> > "freebsd-questions-unsubscribe at freebsd.org"
> > >
> >
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
>
More information about the freebsd-questions
mailing list