Re: Move Home to 2nd drive



NoOp wrote:
Working on upgrading an very old system with a small hard drives. I did
an upgrade from Feisty to Gusty. Prior to the upgrade the 1st (6Gb)
drive had 2.2Gb free space on it. Afterwards it only has 1GB left (and
that includes after removing fonts that I don't use, apt-get autoclean,
apt-get autoremove, etc., etc.), so I added a second hard 7Gb hard
drive.

Second drive is in and working fine (ext3), now I'd like to move the
Home directory to the 2nd hard drive so that I can free up space on the
first drive. Any quick/easy command line suggestions on how to do this?

Mount your second drive to the /mnt directory. Then use the command

sudo cp -a /home/* /mnt

Now you have a copy of everything in your /home directory on the second
drive's root directory. Then edit (as root) /etc/fstab and add a line

somedrivespec /home ext3 defaults 0 2

with somedrivespec replaced with the device name or UUID of the drive. Now
logout and start a text console (Ctrl-Alt-F1). Login and enter these
commands:

sudo umount /mnt
sudo mv /home /home.bak
sudo mount /home

Now you can logout and switch back to the graphical login screen with
Ctrl-F7.

Please note: This is untested - if there is something wrong, you can undo
the changes if you boot into recovery mode. Then delete the fstab line
and replace the home directory with the command

mv /home.bak /home


Nils

--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: [kde] su identification
    ... assumes that you wish to invoke the root account and will demand Root ... A user may ONLY sudo as allowed in the /etc/sudoers ... allowing a command with any parameters ... This config allows my normal user to do whatever he'd normally be able to ...
    (KDE)
  • Re: Attn. Microsoft - BUG REPORT!
    ... if you are upgrading a Win98se system to Windows ... then the Windows XP upgrade ... > application will halt early in the installation process. ... > It's NOT because it was run from the command line (though ...
    (microsoft.public.windowsxp.general)
  • Re: Apple recommending anti-virus software for Macs?
    ... > To be ultra-safe with the 'rm' command, ... Not a bad idea for root, It would drive me nuts in my user account. ... downloads directory and executing it. ... That I type an EOF is a trivial difference versus 'sudo' exiting ...
    (comp.sys.mac.system)
  • RE: Unattended Install Dilemma
    ... I am putting into the command line for winnt. ... the bat file is the same, ... file doesnt give the Product Key error. ... >you only need an upgrade key if you are using upgrade ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: correct way to update AIX 4.3.3.0 to maintenance level 4330-11?(AIX newbie)
    ... >> on EMC storage and EMC recommends that I install 'Maintenance Level ... > My preferred way of doing an upgrade like this is to use their alternate ... > disk installation technique where you clone your current o.s. ... > Also, if you look at the Reference Documentation section, it has command ...
    (comp.unix.aix)