-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 09/30/2013 06:22 AM, Neil Bothwick wrote:
> On Mon, 30 Sep 2013 12:01:27 +0200, Hinnerk van Bruinehsen wrote:
> 
>>> mount /usr -o remount,ro mkdir /newusr rsync -a /usr/ /new/usr/ Comment out 
>>> /usr line in
>>> /etc/fstab mv /usr /oldusr mv /newusr /usr reboot rmdir /oldusr
>>> 
>>> What you do with the old partition is up to you. In this case the 
>>> discussion was about /usr
>>> on LVM, so you just delete it and allocate the space elsewhere when needed.
> 
>> You can even leave out the step of creating a new directory and moving it 
>> later if you
>> bind-mount you rootfs somewhere, e.g. /mnt/gentoo.
> 
> Good point.
> 
>> You may want to add some parameters to the call to rsync, though (e.g. those 
>> that preserve
>> permissions, xattrs (especially for SELinux or XT-PaX) and owner/group 
>> (should be -pogX),
> 
> -a covers most if not all of those.
> 
>> possibly -x aswell (if you have other filesystems under /usr (e.g. a 
>> discrete FS for the
>> portage tree).
> 
> Another good point, one of those things you think of immediately after 
> hitting Send :(
> 
> 

Specifically, I would use -axAHX (-rlptgoD are implied by -a, but -HAX are not).

- From rsync(1):

- -a    archive mode; equals -rlptgoD (no -H,-A,-X)
- -r    recurse into directories
- -l    copy symlinks as symlinks
- -p    preserve permissions
- -t    preserve modification times
- -g    preserve group
- -o    preserve owner
- -D    preserve device files and special files
- -H    preserve hard links
- -A    preserve ACLs (implies -p)
- -X    preserve extended attributes
- -x    don't cross filesystem boundaries

- -- 
Jonathan Callen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCgAGBQJSTKwvAAoJELHSF2kinlg4w5kP+wXTGhMSgTFReacg44Ryn8bu
bSvq3qZURGbGu5s8Q/Ejg42sZ/0fXdfDD57ZhSpVRWMZ/KZIETZAD2oCkktjr6Vj
OELOhz5Pm+UswC201nl6K39PYMijdI+4Mho6QQVoMixa1NI5ZBF7pLBRi+RtJzOx
ilEBPmMqE9jt1hdiHnvucq6YEOSANsLRz5rhqnae9BJurrgAMCBOtxvATZiP5YwD
6P8OyNy0UeKdYYrvzjmAjY9cmZ78r6rIekF1eDchGklIJfuj/mlwG8r0JlusSc34
q7OK4YHdDeNBbMESpuJjeZAYfUycUk90Ag5g+8vx9UqxxJj6FxeeVt3oaPi7sLgj
j4HXS2d5FcH9ItO5SToWIccZHp+C0/3w1S7DOT0pNe1SaOMOwSBDpZTtLhseW1C8
VVr+G4wGrhQmmBXSePa8ICWJ7Xr8NM16km/h8JrHjtvUisV4AtOuQ0mzv0FGmjVG
cgcDqtAjBD00YjVQPQ5VSxb8ZGBjFecMBPhZk2Q1Ea2uUTpb8RdeH0ZvVMXg8N0u
g+otGVC56PecjLReYCWnHuM18+f5tKdTvUo+u0GG6epoe2icNi5BPjC9oQjLI6nd
hdhfrAKzje5T0vAUZNMO6uYcuSL4zmB/T53Dkl1aIem5kV2I9SVt0ku3WsSCywD+
bNu/HzR0SlB4FyFvEEJl
=ef8P
-----END PGP SIGNATURE-----

Reply via email to