2013/12/3 Canek Peláez Valdés <[email protected]>: > On Tue, Dec 3, 2013 at 12:06 AM, Canek Peláez Valdés <[email protected]> wrote: >> On Mon, Dec 2, 2013 at 10:34 PM, Jc García <[email protected]> wrote: >>> 2013/12/2 William Kenworthy <[email protected]> >>>> >>>> You are looking far too deep .... >>>> >>>> >>>> just rsync -avP to /newusr >>> >>> +1 >>> I have done this more or less the same way >>>> >>>> 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 >>> >>> >>> Let's make this thread more interesting, would it be possible to do >>> this without a reboot? ie: going single user mode, kill anything that >>> might still be running from usr, umount /usr, mount it to /mnt, rsync >>> -avP to usr, going again into runlevel 3 or 5. >>> Obviously not possible if running systemd. >> >> I'm not so sure it's not possible. Perhaps it's even easier. > > So, yeah, I think it's easier with systemd. You just: > > 1. systemctl isolate emergency.target > 2. log in again (all the normal gettys are killed with the above command) > 3. rsync -PvasHA /usr/ /newusr/ > 4. mv /usr /oldusr # mv is on /bin, so no problems here > 5. mv /newusr /usr > 6. rm -rf /oldusr (to make sure nothing uses it anymore) > 7. systemctl isolate multi-user.target > 8. You have your system again. > Nice, I thought systemd residing within /usr would be the limitation, i haven't used systemd very much , so i don't really know it's options, but later after thinking about it, i thought that using the initramfs would be a way to go, but as i understand here systemd already has an option to make use of it.
> I did this on a minimal QEMU virtual machine. However I think it > should work with even the most complex setups, as long as your > initramfs has the necessary tools, which is really easy with dracut. > > Regards. > -- > Canek Peláez Valdés > Posgrado en Ciencia e Ingeniería de la Computación > Universidad Nacional Autónoma de México >

