1 |
2013/12/3 Canek Peláez Valdés <caneko@×××××.com>: |
2 |
> On Tue, Dec 3, 2013 at 12:06 AM, Canek Peláez Valdés <caneko@×××××.com> wrote: |
3 |
>> On Mon, Dec 2, 2013 at 10:34 PM, Jc García <jyo.garcia@×××××.com> wrote: |
4 |
>>> 2013/12/2 William Kenworthy <billk@×××××××××.au> |
5 |
>>>> |
6 |
>>>> You are looking far too deep .... |
7 |
>>>> |
8 |
>>>> |
9 |
>>>> just rsync -avP to /newusr |
10 |
>>> |
11 |
>>> +1 |
12 |
>>> I have done this more or less the same way |
13 |
>>>> |
14 |
>>>> reboot to livecd |
15 |
>>>> |
16 |
>>>> rsync again with --delete to update ... takes a only few seconds this |
17 |
>>>> time - minimal downtime :) |
18 |
>>>> mv /usr /oldusr |
19 |
>>>> mv /newusr /usr |
20 |
>>>> reboot |
21 |
>>> |
22 |
>>> |
23 |
>>> Let's make this thread more interesting, would it be possible to do |
24 |
>>> this without a reboot? ie: going single user mode, kill anything that |
25 |
>>> might still be running from usr, umount /usr, mount it to /mnt, rsync |
26 |
>>> -avP to usr, going again into runlevel 3 or 5. |
27 |
>>> Obviously not possible if running systemd. |
28 |
>> |
29 |
>> I'm not so sure it's not possible. Perhaps it's even easier. |
30 |
> |
31 |
> So, yeah, I think it's easier with systemd. You just: |
32 |
> |
33 |
> 1. systemctl isolate emergency.target |
34 |
> 2. log in again (all the normal gettys are killed with the above command) |
35 |
> 3. rsync -PvasHA /usr/ /newusr/ |
36 |
> 4. mv /usr /oldusr # mv is on /bin, so no problems here |
37 |
> 5. mv /newusr /usr |
38 |
> 6. rm -rf /oldusr (to make sure nothing uses it anymore) |
39 |
> 7. systemctl isolate multi-user.target |
40 |
> 8. You have your system again. |
41 |
> |
42 |
Nice, I thought systemd residing within /usr would be the limitation, |
43 |
i haven't used systemd very much , so i don't really know it's options, |
44 |
but later after thinking about it, i thought that using the initramfs |
45 |
would be a way to go, |
46 |
but as i understand here systemd already has an option to make use of it. |
47 |
|
48 |
> I did this on a minimal QEMU virtual machine. However I think it |
49 |
> should work with even the most complex setups, as long as your |
50 |
> initramfs has the necessary tools, which is really easy with dracut. |
51 |
> |
52 |
> Regards. |
53 |
> -- |
54 |
> Canek Peláez Valdés |
55 |
> Posgrado en Ciencia e Ingeniería de la Computación |
56 |
> Universidad Nacional Autónoma de México |
57 |
> |