home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux.mandriva      Somewhat decent but also getting bloated      29,919 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 28,970 of 29,919   
   Aragorn to All   
   Re: Moving /usr to a new partition   
   06 Feb 13 23:37:38   
   
   From: stryder@telenet.be.invalid   
      
   On Wednesday 06 February 2013 16:59, Grimble conveyed the following to   
   alt.os.linux.mandriva...   
      
   > Unfortunately I have to move /usr to a new partition (I started to do   
   > something with GNU Radio, and urpmi has been very busy!)   
   > Would someone be kind enough to cast a critical eye over the following   
   > to a) make sure I'm doing the right things   
   > b) suggest something I ought to do.   
   > I have created a new partition, sda12, currently with mount point   
   > /newusr   
   >   
   > This is an extract from /etc/fstab:   
   > # Entry for /dev/sda9 :   
   > UUID=ac5349a0-8563-4a4e-b9ad-24a316cb309c / ext4 defaults 1 1   
   > # Entry for /dev/sda12   
   > UUID=3cef6111-eb18-4167-8390-821e6a4c43f9 /newusr ext4 acl,relatime 1   
   > 2   
   >   
   > I propose to do the following   
   > cd /usr   
   > rsync -a */ /newusr   # Keeps symlinks, times, owners, copies contents   
   > of /usr   
   >   
   > edit /etc/fstab:   
   > UUID=3cef6111-eb18-4167-8390-821e6a4c43f9 /usr ext4 defaults 1 2   
   >   Reboot to Live disk   
   > mount /dev/sd9 /mnt/usr   
   >    
   >   
   > Reboot to 2011 with fingers crossed.   
   >   
   > Thanks for your comments.   
      
   I would suggest the following...  First, drop down to single-user   
   maintenance mode, i.e. runlevel 1 [*].  At this point, you are the root   
   user - you may need to supply the root password, depending on the   
   security level settings for your local system.   
      
   A trick I've picked up from "The Definitive Guide To Mandrake Linux 9.2"   
   is to use the following command, provided that the new filesystem is   
   mounted where you say it is. ;-)   
      
       (cd /usr && tar cf - .) | (cd /newusr && tar xpvf -)   
      
   Next, proceed to editing /etc/fstab and delete the contents of the old   
   /usr, as follows:   
      
      cd / && rm -rf /usr/*   
      
   Next, put the new /usr filesystem in place in the tree...   
      
      umount /newusr && mount /dev/sda12 /usr && rmdir /newusr   
      
   Now you can return to your normal runlevel [*], and you didn't even have   
   to reboot, let alone use a live/rescue CD/DVD. ;-)   
      
      
   [*] You will have to use the systemd-specific method for changing   
       runlevels, as Mandriva isn't using the old System V init system   
       anymore.  I believe that...   
      
            man systemctl   
      
       ... could possibly shed some enlightenment on the situation. ;-)   
      
   --   
   = Aragorn =   
   (registered GNU/Linux user #223157)   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca