Re: Best way to copy /usr to different partition?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel B. Thurman wrote:
Tony Nelson wrote:
Sent: Friday, December 07, 2007 8:43 AM
To: fedora-list@xxxxxxxxxx
Subject: Re: Best way to copy /usr to different partition?


At 10:43 PM -0500 12/6/07, Kevin J. Cummings wrote:
Daniel B. Thurman wrote:
I was getting dangerously close to running out of disk space
since /usr was filling up fast.

I thought it was simple to tar-copy /usr to a different
drive/partiton
using tar copy such as:

(cd /usr; tar cpf - .) | (cd /newpartition; tar xpf -)
using tar doesn't copy the extended attributes used by SELinux. ...
...

`man tar` shows the --xattrs and --no-xattrs options (though `man tar` and `info tar` don't say what the default is), so tar should work for EAs if
used with --xattrs.
--
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson@xxxxxxxxxxxxxxxxx>
     '                              <http://www.georgeanelson.com/>

--

I have discovered that using:

(cd /usr-b; tar -cp -xattrs -f - .) | (cd /usr; tar -xp --xattrs -f -)
OR
(cd /usr; cp -pR /usr-b/. .)

did not preserve the selinux attributes.

I have checked the attributes in /usr-b/lib/libsysfs* and
it has lib_t assigned to these files against the copied files
/usr/lib/libsysfs* and it shows default_t instead of lib_t.

This may mean that my entire /usr filesystem has improper
selinux attributes.

Can someone tell me how to copy the files from my original
/usr-b filesystem to /usr filesystem with the selinux attributes
intact?

No virus found in this outgoing message.
Checked by AVG Free Edition. Version: 7.5.503 / Virus Database: 269.16.17/1176 - Release Date: 12/6/2007 11:15 PM
I think the best thing from the selinux point of view is to turn off selinux while doing the copy and then when done and checked out turn it back on and wait while selinux re-inserts it's stuff.



--

	Karl F. Larsen, AKA K5DI
	Linux User
	#450462   http://counter.li.org.

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux