Re: moving /home to new drive

2007-07-18 Thread RW
On Wed, 18 Jul 2007 11:03:04 -0400
Jerry McAllister <[EMAIL PROTECTED]> wrote:

> Since the old one is not a file system
> unto itself, you will not be about to use dump (well you could
> in a certain way, but) so, probably you will want to use tar with a
> -P.

One problem with tar and cp is that they can't properly copy sparse
file like dump|restore can, so in certain cases data can blow-up in
size. 

cpio claims to be be able to recreate sparse files, but I found that
when I tried this on mlnet data, some of the download
percentage-complete figures dropped, suggesting it hadn't got it right.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: moving /home to new drive

2007-07-18 Thread Jerry McAllister
On Wed, Jul 18, 2007 at 11:03:04AM -0400, Jerry McAllister wrote:

> 
> > 
> > Hello,
> > 
> > I have just installed an additional drive to my FreeBSD 6.2-RELEASE-p6
> > machine. I'd like to use this drive exclusively for /home.
> > 
> > Currently /home is a link to /usr/home. Can I just mount (haven't done it
> > yet) the new drive with the mount point /home then delete the symlink (?)
> > and move the files from /usr/home to /home? Or do I need to delete the
> > symlink first and only then try to mount the new drive as /home?
> 
> You should remove the symlink first, otherwise the mount will go
> over it and then you won't be able to rm it and later it will
> still exist if the mount is not made and you will see again the
> old stuff.

Sorry, I just got off a 12 hour flight.   
The part that says you should remove the symlink first is correct.
The explanation applies to directories that become mount points
but not quite the same to symlinks.

Then, after you remove the symlink, you have to create a mountpoint
by doing a mkdir /home

jerry

> 
> > Can it break something? Is the procudure safe? Thank you in advance!
> > 

It is safe.  It won't break anything.   But, as mentioned, don't
forget to move your files and directories from /usr/home to the
new /home after you get it there.

jerry


> 
> Well, I wonder what you might have in the old /home  (/usr/home)
> that you want to keep.   You will need to move this stuff to
> the new /home some way.  Since the old one is not a file system
> unto itself, you will not be about to use dump (well you could
> in a certain way, but) so, probably you will want to use tar with a -P.
> 
> jerry
> 
> > -- 
> > Zbigniew Szalbot
> > 
> > ___
> > freebsd-questions@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> > To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> > 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: moving /home to new drive

2007-07-18 Thread Jerry McAllister

> 
> Hello,
> 
> I have just installed an additional drive to my FreeBSD 6.2-RELEASE-p6
> machine. I'd like to use this drive exclusively for /home.
> 
> Currently /home is a link to /usr/home. Can I just mount (haven't done it
> yet) the new drive with the mount point /home then delete the symlink (?)
> and move the files from /usr/home to /home? Or do I need to delete the
> symlink first and only then try to mount the new drive as /home?

You should remove the symlink first, otherwise the mount will go
over it and then you won't be able to rm it and later it will
still exist if the mount is not made and you will see again the
old stuff.

> 
> Can it break something? Is the procudure safe? Thank you in advance!
> 

Well, I wonder what you might have in the old /home  (/usr/home)
that you want to keep.   You will need to move this stuff to
the new /home some way.  Since the old one is not a file system
unto itself, you will not be about to use dump (well you could
in a certain way, but) so, probably you will want to use tar with a -P.

jerry

> -- 
> Zbigniew Szalbot
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: moving /home to new drive

2007-07-18 Thread Garrett Cooper

Zbigniew Szalbot wrote:

Hello,

  

don't kill /usr/home  :) symlink back to it, or just mount the new drive
in it - nothing wrong with having a disk mounted in a mount point which


is
  

part of the filesystem of another disk - as long as they are mounted in


the
  

right order during the boot process (eg, i wouldnt put /var/ under
/usr/ , for example... )



OK. So the procedure could be as follows (?):

1. mv -R /usr/home /usr/home-old
2. rm /home (deleting the symlink)
3. mount /dev/ad3s1c /usr/home
4. cp -pR /usr/home-old/ /usr/home/
5. ln -s /home /usr/home

Is the procedure OK?

One last question - what about fstab file? I guess I need to edit it so
that next time while booting the system, it will mount the new drive as
/usr/home?

Thank you very much!

  


   Try this instead:

1. mount /dev/ad3s1c /usr/home-new
2. cp -pR /usr/home/* /usr/home/.* /usr/home-new
3. umount /dev/ad3s1c
4. rm -Rf /usr/home/* /usr/home/.*
5. mount /dev/ad3s1c /usr/home

   Don't forget to add /dev/ad3s1c to fstab later on.
-Garrett
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: moving /home to new drive

2007-07-18 Thread Zbigniew Szalbot

Hello,

> don't kill /usr/home  :) symlink back to it, or just mount the new drive
> in it - nothing wrong with having a disk mounted in a mount point which
is
> part of the filesystem of another disk - as long as they are mounted in
the
> right order during the boot process (eg, i wouldnt put /var/ under
> /usr/ , for example... )

OK. So the procedure could be as follows (?):

1. mv -R /usr/home /usr/home-old
2. rm /home (deleting the symlink)
3. mount /dev/ad3s1c /usr/home
4. cp -pR /usr/home-old/ /usr/home/
5. ln -s /home /usr/home

Is the procedure OK?

One last question - what about fstab file? I guess I need to edit it so
that next time while booting the system, it will mount the new drive as
/usr/home?

Thank you very much!

-- 
Zbigniew Szalbot

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: moving /home to new drive

2007-07-18 Thread Norberto Meijome
On Wed, 18 Jul 2007 08:05:19 +0200
Zbigniew Szalbot <[EMAIL PROTECTED]> wrote:

> And what about samba? I just realized I will need to alter sama
> configuration becasue current /usr/home is available as a network share.
> Thank you once again

don't kill /usr/home  :) symlink back to it, or just mount the new drive in it 
- nothing wrong with having a disk mounted in a mount point which is part of 
the filesystem of another disk - as long as they are mounted in the right order 
during the boot process (eg, i wouldnt put /var/ under /usr/ , for 
example... )

_
{Beto|Norberto|Numard} Meijome

"Imagination is more important than knowledge."
  Albert Einstein, On Science

I speak for myself, not my employer. Contents may be hot. Slippery when wet. 
Reading disclaimers makes you go blind. Writing them is worse. You have been 
Warned.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: moving /home to new drive

2007-07-17 Thread Olivier Nicole
> 4. Drop into single user mode (if production machine), and login as root 
> (just to avoid possible errors in programs :)..).

on production machine I woul deven copy in single user mode, just to
prevent a user to be modifying a file when copying.

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: moving /home to new drive

2007-07-17 Thread Garrett Cooper

Zbigniew Szalbot wrote:

Hello again,

On Wed, 18 Jul 2007 12:46:36 +0700 (ICT), Olivier Nicole <[EMAIL PROTECTED]>
wrote:
  

Or do I need to delete the
symlink first and only then try to mount the new drive as /home?
  

- delete the symlink


OK
  

- create a directory /home


Do I create it on the existing drive and

  

- mount the new drive


then mount the new drive? I just want to make sure I unders

  

- copy the files

You cannot mount a disk on a symlink and you cannot mount a disk until
you have created the mount point.


And what about samba? I just realized I will need to alter sama
configuration becasue current /usr/home is available as a network share.
Thank you once again!
  


1. Mount new disk to temporary location.
2. Copy files over to disk.
3. Update /etc/fstab while files are being copied.
4. Drop into single user mode (if production machine), and login as root 
(just to avoid possible errors in programs :)..).

5. Delete files in /usr/home
6. Mount new drive at /usr/home.

   I know it's a long set of steps, but it's complete list.
   If /usr/home is a symlink you could just symlink to the permanent 
mountpoint after 3., and forgo doing 4. - 6.

-Garrett
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: moving /home to new drive

2007-07-17 Thread Norberto Meijome
On Wed, 18 Jul 2007 12:46:36 +0700 (ICT)
Olivier Nicole <[EMAIL PROTECTED]> wrote:

> From: Olivier Nicole <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: freebsd-questions@freebsd.org
> Subject: Re: moving /home to new drive
> Date: Wed, 18 Jul 2007 12:46:36 +0700 (ICT)
> Sender: [EMAIL PROTECTED]
> 
> > Or do I need to delete the
> > symlink first and only then try to mount the new drive as /home?  
> 
> - delete the symlink
> - create a directory /home
> - mount the new drive
> - copy the files

- verify the copy is successful
- mv /usr/home /usr/home_old

- create a symlink from /usr/home to /home - i DONT know whether this is 
necessary or not, but if you want to keep things as seamless as possible, you'd 
need it (i dont even know what is supposed to be the real path - i thought 
/usr/home was the real thing and /home just a shortcut).

- test /home 
- when happy, delete /usr/home_old (else you wont have made any room in the 
other drive ;) 


BTW, why not just 

- mv /usr/home /usr/home_old
- mkdir /home
- mount [new_drive] /home
- copy -r /usr/home_old/* /usr/home/  ( make sure you use an appropriate 
command for copying the data - cp does not handle special files correctly - 
check the archives for discussions on this subject).

- test and deleted old copy ?

B

_
{Beto|Norberto|Numard} Meijome

Which is worse: ignorance or apathy?
Don't know. Don't care.

I speak for myself, not my employer. Contents may be hot. Slippery when wet. 
Reading disclaimers makes you go blind. Writing them is worse. You have been 
Warned.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: moving /home to new drive

2007-07-17 Thread Beech Rintoul
On Tuesday 17 July 2007, Zbigniew Szalbot said:
> Hello again,
>
> On Wed, 18 Jul 2007 12:46:36 +0700 (ICT), Olivier Nicole
> <[EMAIL PROTECTED]>
>
> wrote:
> >> Or do I need to delete the
> >> symlink first and only then try to mount the new drive as /home?
> >
> > - delete the symlink
>
> OK
>
> > - create a directory /home
>
> Do I create it on the existing drive and
>
> > - mount the new drive
>
> then mount the new drive? I just want to make sure I unders
>
> > - copy the files
> >
> > You cannot mount a disk on a symlink and you cannot mount a disk
> > until you have created the mount point.
>
> And what about samba? I just realized I will need to alter sama
> configuration becasue current /usr/home is available as a network
> share. Thank you once again!

Copy the contents of home to your new drive. Delete everything 
inside /usr/home. Mount the new disk to /usr/home. Keeps your tree 
the same.

Beech

-- 
---
Beech Rintoul - FreeBSD Developer - [EMAIL PROTECTED]
/"\   ASCII Ribbon Campaign  | FreeBSD Since 4.x
\ / - NO HTML/RTF in e-mail   | http://www.freebsd.org
 X  - NO Word docs in e-mail | Latest Release:
/ \  - http://www.FreeBSD.org/releases/6.2R/announce.html
---



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: moving /home to new drive

2007-07-17 Thread Zbigniew Szalbot

Hello again,

On Wed, 18 Jul 2007 12:46:36 +0700 (ICT), Olivier Nicole <[EMAIL PROTECTED]>
wrote:
>> Or do I need to delete the
>> symlink first and only then try to mount the new drive as /home?
> 
> - delete the symlink
OK
> - create a directory /home
Do I create it on the existing drive and

> - mount the new drive
then mount the new drive? I just want to make sure I unders

> - copy the files
> 
> You cannot mount a disk on a symlink and you cannot mount a disk until
> you have created the mount point.
And what about samba? I just realized I will need to alter sama
configuration becasue current /usr/home is available as a network share.
Thank you once again!


-- 
Zbigniew Szalbot

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: moving /home to new drive

2007-07-17 Thread Olivier Nicole
> Or do I need to delete the
> symlink first and only then try to mount the new drive as /home?

- delete the symlink
- create a directory /home
- mount the new drive
- copy the files

You cannot mount a disk on a symlink and you cannot mount a disk until
you have created the mount point.

Best regards,

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


moving /home to new drive

2007-07-17 Thread Zbigniew Szalbot

Hello,

I have just installed an additional drive to my FreeBSD 6.2-RELEASE-p6
machine. I'd like to use this drive exclusively for /home.

Currently /home is a link to /usr/home. Can I just mount (haven't done it
yet) the new drive with the mount point /home then delete the symlink (?)
and move the files from /usr/home to /home? Or do I need to delete the
symlink first and only then try to mount the new drive as /home?

Can it break something? Is the procudure safe? Thank you in advance!

-- 
Zbigniew Szalbot

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"