You are looking far too deep ....

just rsync -avP to /newusr
reboot to livecd
rsync again with --delete to update ... takes a only few seconds this
time - minimal downtime :)
mv /usr /oldusr
mv /newusr /usr
reboot

The --numeric-ids is a good idea but I've made my systems consistent
with the standard gentoo id's so that's no longer a problem.

Ive done this many times over the years, and to the system I am writing
this on many times (moving to lvm2, restoring from backups after disk
failures, restoring from backups after user failure - rm -rf /usr !)

If you need to practice, run up a vm and test/destroy :)

You have got the disk space, so if you have a backup its reversible so
don't be a wimp :)

BillK




On 03/12/13 05:36, Mick wrote:
> On Monday 02 Dec 2013 20:40:28 Tanstaafl wrote:
>> On 2013-12-02 2:41 PM, Thanasis <thana...@asyr.hopto.org> wrote:
> 
>>> That is why I recommend using the option --numeric-ids.
>>> And using it would not hurt anyway.
>>
>> Right... poison pointed this out...
>>
>> This is why I asked for help about the arguments.
>>
>> I honestly don't care about superflous/unnecessary arguments, I just
>> want to make sure I use at least the ones needed for this to work.
>>
>> Thanks...
> 
> The comment about --numeric-ids that Thanasis made is valid.  I messed up 
> some 
> fs of mine last time I used rsync, when I wasn't paying much attention!  I 
> made a mental note to always use it in the future.  On the other hand, if 
> you're not that comfortable with it, a quick trial run with a test filesystem 
> will offer some assurance that your chosen command and options will work as 
> you intended.  BTW, you do not *have* to use rsync:
> 
>   cp -a
> 
> will do the same.
> 
>   su -
>   cd /old_usr
>   tar --one-file-system -cf . | (cd /new_usr ; tar -xvpf - )
> 
> will also do the same.
> 
> Finally, star -copy is my favourite faster alternative to copying 
> directories, 
> inc. respecting any acl's and the like if you specify it in the options:
> 
>   su -
>   star -copy <options> -C /old_usr . /new_usr
> 
> Then you can also add -diff to see if any file was not copied correctly (use 
> star diffopts=!<option> to exclude things like ctime, or you'll drown in the 
> noise of the output).
> 
> 
> Speaking from experience I suggest that you do not blast your old /usr away 
> until you have booted with /usr mounted in the new location and have verified 
> that ownership and access rights are as you expected.
> 


Reply via email to