Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 1st March 2007, 05:52 PM
jin01 Offline
Registered User
 
Join Date: Feb 2007
Location: Houston
Posts: 56
Fedora Core 6 relocating /usr and /home to larger LVM

Hi,

I need additional space, and I would like to relocate my /usr and /home directories to a larger LVM volume. The larger volume is already in use with a mount point /space_sdb2. I had configured my yum to use this space to download files which works okay. However my first volume is significantly smaller, but suitable for the core system yet too small for any upgrades to existing files. How would I go about relocating the /usr and /home directories to the larger volume at /space_sdb2? Thank you for your help!

Thanks,
jin01
Reply With Quote
  #2  
Old 1st March 2007, 06:53 PM
theninja Offline
Registered User
 
Join Date: Sep 2004
Location: St. Louis
Posts: 63
Try the following on /home first, then repeat for /usr .....

mkdir /space_sdb2/home
cd /home
tar cvf - . | (cd /space_sdb2/home; tar xvf -)

(you could also just mv /home /space_sdb2 if you wanted, but I like to keep the files in place to compare first.)

Verify contents of /space_sdb2/home is what you expect then ....
rm -rf /home
ln -s /space_sdb2/home /home
<--- you will want this link in place, orr you will run into issues.
__________________
theninja

Last edited by theninja; 1st March 2007 at 07:00 PM.
Reply With Quote
  #3  
Old 2nd March 2007, 02:26 PM
jin01 Offline
Registered User
 
Join Date: Feb 2007
Location: Houston
Posts: 56
Thanks,

That worked. For some reason I needed to use the format:
tar czf - /usr | (cd /space_sdb2 ; tar -xvzf -)
All the directories copied okay. I do have some errors as the system boots. They appear to relate to permissions. I looked at some of the files and some of the soft links are shown but with no write priveledges. Example /usr/bin/env (/space_sdb2/usr/bin/env) . The link shows a file link with two denial indicators at the bottom of the icon. One is for write priveledges the other I dont know is it access or ?. How do I remedy the permission issue?

Thanks again!
Reply With Quote
  #4  
Old 2nd March 2007, 04:00 PM
theninja Offline
Registered User
 
Join Date: Sep 2004
Location: St. Louis
Posts: 63
Could you post the errors you are getting at bootup and post the results of the following
ls -ld /usr
ls -l /usr
__________________
theninja
Reply With Quote
  #5  
Old 2nd March 2007, 04:36 PM
jin01 Offline
Registered User
 
Join Date: Feb 2007
Location: Houston
Posts: 56
Hi,

This is some of it:

Mar 1 17:21:53 server01 hcid[1652]: Can't open system message bus connection: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Mar 1 17:21:54 server01 hcid[1652]: Unable to get on D-BUS

Mar 1 17:21:59 server01 kernel: audit(1172791294.457:4): avc: denied { read } for pid=1137 comm="swapon" name="locale-archive" dev=dm-2 ino=6654762 scontext=system_u:system_r:fsadm_t:s0 tcontext=root:object_r:file_t:s0 tclass=file
Mar 1 17:21:59 server01 ntpd[1819]: Listening on interface wildcard, 0.0.0.0#123 Disabled
Mar 1 17:22:00 server01 kernel: audit(1172791294.457:5): avc: denied { read } for pid=1137 comm="swapon" name="locale.alias" dev=dm-2 ino=5378189 scontext=system_u:system_r:fsadm_t:s0 tcontext=root:object_r:file_t:s0 tclass=file
Mar 1 17:22:00 server01 ntpd[1819]: Listening on interface wildcard, ::#123 Disabled
Mar 1 17:22:00 server01 kernel: audit(1172791294.501:6): avc: denied { read } for pid=1137 comm="swapon" name="LC_IDENTIFICATION" dev=dm-2 ino=6653740 scontext=system_u:system_r:fsadm_t:s0 tcontext=root:object_r:file_t:s0 tclass=file
Mar 1 17:22:00 server01 ntpd[1819]: Listening on interface lo, ::1#123 Enabled
Mar 1 17:22:00 server01 kernel: audit(1172791294.533:7): avc: denied { read } for pid=1137 comm="swapon" name="LC_IDENTIFICATION" dev=dm-2 ino=6655446 scontext=system_u:system_r:fsadm_t:s0 tcontext=root:object_r:file_t:s0 tclass=file

Mar 1 17:22:00 server01 kernel: ip_conntrack version 2.4 (8192 buckets, 65536 max) - 228 bytes per conntrack
Mar 1 17:22:01 server01 kernel: process `sysctl' is using deprecated sysctl (syscall) net.ipv6.neigh.lo.base_reachable_time; Use net.ipv6.neigh.lo.base_reachable_time_ms instead.
Mar 1 17:22:01 server01 kernel: eth0: link up, 100Mbps, half-duplex
Mar 1 17:22:01 server01 kernel: audit(1172791309.906:8): audit_pid=1543 old=0 by auid=4294967295 subj=system_u:system_r:auditd_t:s0
Mar 1 17:22:01 server01 kernel: audit(1172791309.914:10): audit_pid=0 old=1543 by auid=4294967295 subj=system_u:system_r:auditd_t:s0
Mar 1 17:22:02 server01 kernel: audit(1172791309.914:11): audit_enabled=1 old=0 by auid=4294967295 subj=system_u:system_r:auditd_t:s0
Mar 1 17:22:02 server01 kernel: audit(1172791309.958:12): audit_backlog_limit=256 old=64 by auid=4294967295 subj=system_u:system_r:auditctl_t:s0
Mar 1 17:22:02 server01 kernel: SELinux: initialized (dev rpc_pipefs, type rpc_pipefs), uses genfs_contexts
Mar 1 17:22:02 server01 kernel: audit(1172791313.198:13): avc: denied { search } for pid=1643 comm="dbus-daemon" name="/" dev=dm-2 ino=2 scontext=system_u:system_r:system_dbusd_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=dir
Mar 1 17:22:02 server01 kernel: audit(1172791313.198:13): arch=40000003 syscall=5 success=no exit=-13 a0=98027d8 a1=18800 a2=4ead6120 a3=98027d8 items=0 ppid=1642 pid=1643 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) comm="dbus-daemon" exe="/bin/dbus-daemon" subj=system_u:system_r:system_dbusd_t:s0 key=(null)

Mar 1 17:22:02 server01 kernel: audit(1172791318.067:14): user pid=1788 uid=0 auid=4294967295 subj=system_u:system_r:initrc_t:s0 msg='printer=Printer-LaseJetIIIP uri=lpd://192.168.100.4/PSEC7B91|P1 banners=none,none range=unknown: exe="/space_sdb2/usr/sbin/cupsd" (hostname=server01.noloarchitects.com, addr=192.168.100.2, terminal=? res=success)'

Mar 1 17:22:38 server01 kernel: audit(1172791358.060:15): user pid=2275 uid=0 auid=4294967295 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='PAM: authentication acct=root : exe="/bin/login" (hostname=?, addr=?, terminal=tty1 res=success)'
Mar 1 17:22:38 server01 kernel: audit(1172791358.064:16): user pid=2275 uid=0 auid=4294967295 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='PAM: accounting acct=root : exe="/bin/login" (hostname=?, addr=?, terminal=tty1 res=success)'
Mar 1 17:22:38 server01 kernel: audit(1172791358.084:17): login pid=2275 uid=0 old auid=4294967295 new auid=0
Mar 1 17:22:38 server01 kernel: audit(1172791358.356:18): user pid=2275 uid=0 auid=0 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='PAM: session open acct=root : exe="/bin/login" (hostname=?, addr=?, terminal=tty1 res=success)'
Mar 1 17:22:38 server01 kernel: audit(1172791358.360:19): user pid=2275 uid=0 auid=0 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='PAM: setcred acct=root : exe="/bin/login" (hostname=?, addr=?, terminal=tty1 res=success)'
Mar 1 17:22:38 server01 kernel: audit(1172791358.440:20): user pid=2275 uid=0 auid=0 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='uid=0: exe="/bin/login" (hostname=?, addr=?, terminal=tty1 res=success)'
Mar 1 17:22:58 server01 gconfd (root-2417): starting (version 2.14.0), pid 2417 user 'root'
Mar 1 17:22:58 server01 gconfd (root-2417): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only configuration source at position 0
Mar 1 17:22:58 server01 gconfd (root-2417): Resolved address "xml:readwrite:/root/.gconf" to a writable configuration source at position 1
Mar 1 17:22:58 server01 gconfd (root-2417): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only configuration source at position 2
Mar 1 17:23:02 server01 gnome-power-manager: (root) Critical error: This program cannot start until you start the dbus system service. It is <b>strongly recommended</b> you reboot your computer after starting this service.
Mar 1 17:23:05 server01 gnome-power-manager: (root) Critical error: This program cannot start until you start the dbus system service. It is <b>strongly recommended</b> you reboot your computer after starting this service.
Mar 1 17:23:05 server01 kernel: audit(1172791385.704:21): avc: denied { execheap } for pid=2478 comm="mono" scontext=root:system_r:unconfined_t:s0-s0:c0.c1023 tcontext=root:system_r:unconfined_t:s0-s0:c0.c1023 tclass=process
Mar 1 17:23:05 server01 kernel: audit(1172791385.704:21): arch=40000003 syscall=125 success=no exit=-13 a0=8710000 a1=1000 a2=7 a3=1 items=0 ppid=2470 pid=2478 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) comm="mono" exe="/space_sdb2/usr/bin/mono" subj=root:system_r:unconfined_t:s0-s0:c0.c1023 key=(null)
Mar 1 17:23:05 server01 gconfd (root-2417): Resolved address "xml:readwrite:/root/.gconf" to a writable configuration source at position 0
Mar 1 17:23:07 server01 pcscd: winscard.c:219:SCardConnect() Reader E-Gate 0 0 Not Found
Mar 1 17:23:07 server01 last message repeated 4 times

[root@server01 ~]# ls -ld /usr
lrwxrwxrwx 1 root root 15 Mar 1 16:45 /usr -> /space_sdb2/usr
[root@server01 ~]# ls -l /usr
lrwxrwxrwx 1 root root 15 Mar 1 16:45 /usr -> /space_sdb2/usr
[root@server01 ~]#

There is a little more, but similar to the last section. It all seems to cascade from a single or couple basic problems.

Thanks
Reply With Quote
  #6  
Old 2nd March 2007, 04:44 PM
jin01 Offline
Registered User
 
Join Date: Feb 2007
Location: Houston
Posts: 56
Hi,

Here is a variation of the ls info:

[root@server01 ~]# ls -ld /usr
lrwxrwxrwx 1 root root 15 Mar 1 16:45 /usr -> /space_sdb2/usr
[root@server01 ~]# ls -l /usr
lrwxrwxrwx 1 root root 15 Mar 1 16:45 /usr -> /space_sdb2/usr
[root@server01 ~]# ls -ld /space_sdb2/usr
drwxr-xr-x 14 root root 4096 Feb 13 10:51 /space_sdb2/usr
[root@server01 ~]# ls -l /space_sdb2/usr
total 328
drwxr-xr-x 2 root root 77824 Mar 1 23:12 bin
drwxr-xr-x 2 root root 4096 Oct 10 17:06 etc
drwxr-xr-x 2 root root 4096 Oct 10 17:06 games
drwxr-xr-x 133 root root 20480 Feb 13 12:30 include
drwxr-xr-x 6 root root 4096 Sep 6 15:41 kerberos
drwxr-xr-x 149 root root 114688 Feb 13 18:14 lib
drwxr-xr-x 21 root root 4096 Feb 13 18:20 libexec
drwxr-xr-x 11 root root 4096 Feb 13 10:46 local
drwxr-xr-x 2 root root 20480 Feb 26 11:00 sbin
drwxr-xr-x 298 root root 12288 Feb 13 12:31 share
drwxr-xr-x 3 root root 4096 Feb 13 12:06 src
lrwxrwxrwx 1 root root 10 Mar 1 16:32 tmp -> ../var/tmp
drwxr-xr-x 3 root root 4096 Feb 13 10:50 X11R6
[root@server01 ~]#

Thanks
Reply With Quote
  #7  
Old 2nd March 2007, 05:13 PM
jin01 Offline
Registered User
 
Join Date: Feb 2007
Location: Houston
Posts: 56
Hi again,

I attached a snapshot of the screen to give an idea of the place marker with the permission errors.

Thanks
Attached Thumbnails
Click image for larger version

Name:	Screenshot.png
Views:	50
Size:	201.4 KB
ID:	11654   Click image for larger version

Name:	Screenshot-1.png
Views:	38
Size:	156.5 KB
ID:	11655  
Reply With Quote
  #8  
Old 2nd March 2007, 07:30 PM
theninja Offline
Registered User
 
Join Date: Sep 2004
Location: St. Louis
Posts: 63
You will need to fix that sym link tmp -> ../var/tmp by removing it and pointing it to the correct location.
cd /space_sdb2/usr
rm tmp
ln -s /var/tmp /space_sdb2/usr/tmp

You will need to do the same for any other links under /space_sdb2/usr you may find as well. Especially in /space_sdb2/usr/bin. Get a long listing off each directory under /space_sdb2/usr/ and direct it to a file. Then go through it looking for any mispointed links.
ls -lR /space_sdb2/usr/* |grep lrwx > list
All "bad" links should be highlighted in red.
This is going to be a lot of work, so you might just want to consider keeping usr where it was.
__________________
theninja

Last edited by theninja; 2nd March 2007 at 09:48 PM.
Reply With Quote
  #9  
Old 3rd March 2007, 10:53 PM
jin01 Offline
Registered User
 
Join Date: Feb 2007
Location: Houston
Posts: 56
Thanks Again!
Systems online again. That worked.
Reply With Quote
Reply

Tags
core, fedora, larger, lvm, or home, or usr, relocating

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
relocating GRUB, question willow7 Using Fedora 22 25th September 2007 02:31 PM
How to move a Fedora installation to a larger hard drive wizard Guides & Solutions (No Questions) 9 6th August 2006 05:43 PM
Fedora Core 5 as a Home Desktop OS Hangetsu Using Fedora 14 5th May 2006 10:29 PM
Uninstall Fedora to make Windows partition larger? Shuai Using Fedora 4 6th January 2006 11:05 PM


Current GMT-time: 06:36 (Sunday, 26-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat