Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: How to change the "HOME" dir to another disk

  1. #11
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How to change the "HOME" dir to another disk

    So, it seems we have a failure to communicate, perhaps. A HOME directory is a specific thing for each username/login. It is not system-wide.
    echo $HOME
    will show the HOME for the current userid. That is where individual settings and data are stored.

    Where software gets installed depends on the type of packaging, but it is NOT in any HOME directory. Debian/APT packages almost always are installed under /usr/, with system-wide configuration files placed into /etc/. Before snap packages were recently forced onto Ubuntu users, this was always the way it worked. I think snap packages are stored in /var/ somewhere, but really don't know.

    In general, / (the root directory) would hold the OS and application files. 25G was the recommended size for most desktop users. It you are cautious, you can fit a desktop in 10G or 15G, but that takes work, mostly by not installing lots of GUI programs. 14GB is small for many users. I've been moving the same desktop forward since the beginning of Ubuntu and it fits into 17GB - that's everything except the swap.

    There isn't any way to tell new install programs to be installed outside /usr/. When that partition gets full, add a new partition+file system with the necessary space for all the old files AND all the new files and copy/move all the files over. This is best performed using a Try Ubuntu boot flash drive. In reality, as long as the files "appear" to be in the correct directory, with the correct owner, group, permissions and ACLs, where they are actually stored doesn't matter.

    I think /home/ should be about 50G per userid, assuming they are full desktop users. Media files should be stored elsewhere, IMHO, but snap packages don't like when files to be accessed are outside the HOME.

    I cannot provide guidance about snap packages. I'm not prepared to deal with those at all, so that entire subsystem is purged from my machines.

    I suppose the next step you might take is to figure out which directories are using most of the 14G of space on /.
    Or
    if your install is using a swapfile - probably in /, then you can disable that, create a swap partition almost anywhere else, and free up the storage the /swapfile was using. That would be my first hope for solving something like this. I'm not a fan of swapfiles.

  2. #12
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How to change the "HOME" dir to another disk

    BTW, the first post says you want to use sda4, but there isn't any sda4. What's up with that?

  3. #13
    Join Date
    Mar 2007
    Beans
    543

    Re: How to change the "HOME" dir to another disk

    I thin the OP was referring to /home/ not /home/user, but I can't figure our why the OP needs to move /home at all . According to the information posted it is only 1 % is used.

    Code:
    S.ficheros     Tipo    Tamaño Usados  Disp Uso% Montado en
    /dev/sdb2      ext4       14G    12G  1,9G  86% /
    /dev/sda2      vfat      296M    55M  242M  19% /boot/efi
    /dev/sda1      ext4      441G   1,8G  417G   1% /home
    /dev/sdc1      fuseblk   932G   520G  413G  56% /media/klays/DISCO
    There are partitions not mounted;
    Code:
    sda    465,8G disk          
    ├─sda1 448,8G part ext4     /home
    ├─sda2   300M part vfat     /boot/efi
    ├─sda3   128M part          
    └─sda5    16G part ntfs     
    sdb     14,6G disk          
    ├─sdb1   512M part vfat     
    └─sdb2  14,1G part ext4     /
    sdc    931,5G disk          
    └─sdc1 931,5G part ntfs     /media/klays/DISCO
    Something I've done to expand a users home directory is to mount a partition as /home/user then allow other users to use /home for their home directories.
    The OP seems to need to reorganize his storage but I'm not sure of the point of this exercise.

    If it were me I'd simply get a new bigger hard drive and move everything there, a new 2TB drive should cost less than $40.00.

  4. #14
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How to change the "HOME" dir to another disk

    I think the "HOME" move already happened, but old packages and a swapfile are eating into the / partition. /boot/ is nearly full, so older kernels need to be removed too:
    Code:
    sudo apt autoremove
    sudo apt autoclean
    will clear out old packages and leave 2 old kernels. I haven't a clue how to remove old snaps which seem to hang around. /boot/ under 500MB is scary to me. I prefer almost 1G for /boot/, but I've gotten into an ugly no-room-can't-install-new-kernel problem before.

    And doing something about the swapfile in / would help too, if there is a swapfile there.

  5. #15
    Join Date
    Mar 2007
    Beans
    543

    Re: How to change the "HOME" dir to another disk

    Quote Originally Posted by TheFu View Post
    I think the "HOME" move already happened, but old packages and a swapfile are eating into the / partition. /boot/ is nearly full, so older kernels need to be removed too:
    Code:
    sudo apt autoremove
    sudo apt autoclean
    will clear out old packages and leave 2 old kernels. I haven't a clue how to remove old snaps which seem to hang around. /boot/ under 500MB is scary to me. I prefer almost 1G for /boot/, but I've gotten into an ugly no-room-can't-install-new-kernel problem before.

    And doing something about the swapfile in / would help too, if there is a swapfile there.
    I've had trouble with autoclean not removing old kernels, when they were from old upgrades. It's worth looking to see if there are old kernels hanging around. Removing the kernel packages sometimes leaves files in /boot. but once the underlying packages are gone deleting the files from /boot the updating grub should fix that.

  6. #16
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How to change the "HOME" dir to another disk

    Quote Originally Posted by rsteinmetz70112 View Post
    I've had trouble with autoclean not removing old kernels, when they were from old upgrades. It's worth looking to see if there are old kernels hanging around. Removing the kernel packages sometimes leaves files in /boot. but once the underlying packages are gone deleting the files from /boot the updating grub should fix that.
    NEVER delete files that are part of packages without using the package manager remove or purge function.
    Old kernels from a prior release left over by upgrades can be manually removed using the package manager later. I like to wait 3-5 weeks (patch cycles) before doing that. I patch weekly.

  7. #17
    Join Date
    Mar 2007
    Beans
    543

    Re: How to change the "HOME" dir to another disk

    Quote Originally Posted by TheFu View Post
    NEVER delete files that are part of packages without using the package manager remove or purge function.
    Old kernels from a prior release left over by upgrades can be manually removed using the package manager later. I like to wait 3-5 weeks (patch cycles) before doing that. I patch weekly.
    I've at times been unable to remove files in /boot which were left behind when old kernels were removed. Neither 'purge" nor "remove" would remove them. I'm mostly talking about "initrd" and "config" files. I've waited months and tried all sorts of stuff and still sometimes the files, are still left. In recent versions autoremove seems to be doing a better job.
    Last edited by rsteinmetz70112; December 16th, 2019 at 05:55 PM.

  8. #18
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How to change the "HOME" dir to another disk

    Quote Originally Posted by rsteinmetz70112 View Post
    I've at times been unable to remove files in /boot which were left behind when old kernels were removed. Neither 'purge" nor "remove" would remove them. I'm mostly talking about "initrd" and "config" files. I've waited months and tried all sorts of stuff and still sometimes the files, are still left. In recent versions autoremove seems to be doing a better job.
    Yep, I've been there too.

    sudo apt autoremove is much better.

    In the old days (14.04), I had a kernel-cleanup-script https://blog.jdpfu.com/2013/02/23/cl...rnels-from-apt probably not very interesting anymore. It all started with a simple problem and finished with a simple script because I’m lazy. Then I decided to make the script like I would for a client, not some hacked stuff.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •