Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 29

Thread: var directory full, new Ubuntu 22.04 installation, no further apps permitted

  1. #11
    Join Date
    Feb 2021
    Beans
    21

    Re: var directory full, new Ubuntu 22.04 installation, no further apps permitted

    depulicate post, will update it.
    Last edited by julius-nepos; August 4th, 2023 at 01:38 AM.

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

    Re: var directory full, new Ubuntu 22.04 installation, no further apps permitted

    If this is solved, please use the "thread tools" button to do that. It will help the community save time.

  3. #13
    Join Date
    Feb 2021
    Beans
    21

    Re: var directory full, new Ubuntu 22.04 installation, no further apps permitted

    I'm not sure why /usr was created. Can I merge it with either /home or with / ? Of course /home is on the slower HDD so merging it with that would span two physical drives.
    Yes both drives are internal.

    I'll definitely feel when SWAP is being used, even on the flash drive. The computer is to be used for engineering calculations (CFD).

    I may have to get an external drive for backup storage, I used to use DVD's but they're getting very small these days.

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

    Re: var directory full, new Ubuntu 22.04 installation, no further apps permitted

    Quote Originally Posted by julius-nepos View Post
    I'm not sure why /usr was created. Can I merge it with either /home or with / ?
    You had to have done something. No need to merge. Just boot off alternate media, mount both file systems, then move the entire /usr/ into / , and remove the /usr mount from the /etc/fstab. Comment it out, until you are positive you did what you wanted. Your / is huge - 3x large even with /usr directory moved into it. BTW, use sudo/root to perform the move. This will retain the owner/group/permissions. It is just 1 command. Probably something like:
    Code:
    sudo mv /mnt/old-usr/*  /mnt/new-slash/
    That command assumes you mounted the /usr in the Try Ubuntu environment to /mnt/old-usr and the new / to /mnt/new-slash/.
    If you want to be really careful, use
    Code:
    sudo rsync -av --progress  /mnt/old-usr/  /mnt/new-slash/
    Same caveats about the mount locations hold.

    Quote Originally Posted by julius-nepos View Post
    Of course /home is on the slower HDD so merging it with that would span two physical drives.
    Yes both drives are internal.
    You don't need to move **everything** in /home to the SSD. Just everything that isn't huge. Keep huge files on the HDD. Create symbolic links from the SSD $HOME/something to /media/HDD/something to make accessing it seamless. This is a very common practice. For example, let's say you have /home/john/Music with 5TB of files. Again, from the Try Ubuntu flash drive boot environment, mount the old home somewhere ... say /mnt/old-home. Then move the directories with all the huge files up above the /home/{username}/ directory. Now the /home/{username}/ just contains settings, caches, and smaller files. Be careful to set the permissions on the new, huge, file directories to be as restrictive as you need. You'll have something like this.
    Code:
    /mnt/old-home/home/john
    /mnt/old-home/home/Music
    /mnt/old-home/home/Videos
    Now mount the SSD / directory, create /home ... so probably something like /mnt/new-slash/home/. Then you can move /mnt/old-home/home/john ---> /mnt/new-slash/home/.
    Fix the /etc/fstab so that /home mounts to /media/HDD and reboot.

    After the reboot, you should have these on the SSD:
    /
    /home/
    /usr/

    And on the HDD, you'll have
    /media/HDD for the 6TB file system with /media/HDD/Music and /media/HDD/Videos. The location changed because we moved the mount point.
    Lastly, create symbolic links from inside your $HOME to /media/HDD/Music and /media/HDD/Videos.

    Be certain you setup your backups to work for the different file systems. File systems are a natural place to split backups.

    Quote Originally Posted by julius-nepos View Post
    I'll definitely feel when SWAP is being used, even on the flash drive. The computer is to be used for engineering calculations (CFD).
    I studied CFD in grade school. Never used it in the real world, though I know my current desktop is about the same performance as the Cray Y-MP my University had at the time. It was one of the fastest computers in the world back then. At one point it was in the top 10. RAM is cheap, but fine CFD grids can bring any computer to its knees. I did with both a Cyber/CDC and with the Cray. Got into trouble for eating all the "fake" money for the rest of the semester in the CFD class. My grids were a little too fine. Something that ran all weekend and never finished on the CDC, ran for 20 minutes on the Cray and provided expected outputs. Back then, we were doing tiny models compared to what they do today.

    My advice about swap is - don't use a swap file. Use a swap partition/LV. You'll probably need to test to figure the needed size. Watch memory use with free -hm and be ready to kill the CFD model when it gets close to filling all swap plus RAM minus 1GB. Then I'd probably double the swap. You'll want to leave room on the HDD for 127GB of swap. Plan accordingly with your partitioning. This is were LVM really shines. Going larger is trivial, provided you didn't already allocate all the VG storage. But going smaller is a pain. My disk layout above shows how I allocate just what is needed AT-THE-TIME and no more. Adding more space to an ext4 LV is 5 seconds, zero downtime. Start small. Add only when needed.

    Quote Originally Posted by julius-nepos View Post
    I may have to get an external drive for backup storage, I used to use DVD's but they're getting very small these days.
    I switched from DVD storage to cheap HDDs for backups around 2008 when the hassle of using optical storage was becoming too great. Considering that a cheap DC 4TB HDD can be picked up for $45, there's not much need. These come with a 5 yr warranty, since they are made for data center use. Usually, they will come with 4-5 yrs of DC use already - they are just broken in by that point. I stopped buying HDDs with less than 5 yr warranties a few years ago. I did the math vs hassle. I'd had a number of 3yr warranty drives fail between 3-5 yrs, but I've never, ever, had a 5yr warranty disk fail. I have some with 13 yrs of 24/7 spinning now. The SMART data is just starting to show stats for concern. I'm moving all the data off them onto a new 8TB 5 yr warranty HDD. I don't need to change my backup storage, since everything was already being backed up. Daily, automatic, versioned, backups. "Pulled" are better than pushed. It will change your life and you'll sleep better.

    Had a major problem with an old system a few weeks ago after a lightning strike. Pushed a UPS to failure and 3 of 4 drives in the external array seem to have issues. Could be with the array circuits or the drive or the disk controller - I don't know. The lightning strike killed the GPU - which was very old and already dying. I swapped in a spare 1030 GT, which seemed to fix that issue. Anyway, there were some other drives connected to the system and all the data from them has been moved to the new HDD already. I just need to get 2TB from the external array moved.

    Just remember this about Linux storage. If the directories and files "appear" to be where they are expected with the owner, group, permissions, ACLs, and xattrs that are expected, that is sufficient. We can't move /var anywhere, but we can move all the files elsewhere and mount a new file system with those files to /var. The OS doesn't care.

    When it comes to data files, we can put them anywhere we like, subject to permissions needs. In general, I try to keep my HOME less than 15GB and put large files on a different file system, mounted somewhere else. For example:
    Code:
    Filesystem                                       Type  Size  Used Avail Use% Mounted on
    rpool/ROOT/ubuntu_d0wbmk                         zfs    24G  7.0G   17G  30% /
    bpool/BOOT/ubuntu_d0wbmk                         zfs   1.8G  401M  1.4G  23% /boot
    /dev/vda2                                        vfat  512M   17M  496M   4% /boot/efi
    rpool/USERDATA/tf_5njgy6                         zfs    27G  9.6G   17G  37% /home/tf
    rpool/USERDATA/root_5njgy6                       zfs    17G  384K   17G   1% /root
    rpool/ROOT/ubuntu_d0wbmk/srv                     zfs    17G  128K   17G   1% /srv
    rpool/ROOT/ubuntu_d0wbmk/var/lib                 zfs    17G   27M   17G   1% /var/lib
    istar:/d/D1                                      nfs4  3.5T  3.5T   41G  99% /d/D1
    istar:/d/D2                                      nfs4  3.6T  3.5T  141G  97% /d/D2
    istar:/d/D3                                      nfs4  3.6T  3.6T   15G 100% /d/D3
    istar:/d/D6                                      nfs4  3.6T  2.0T  1.5T  57% /d/D6
    istar:/d/D7                                      nfs4  3.6T  451G  3.0T  13% /d/D7
    Most storage for that system is on the network, not local. Sorry for showing ZFS. That's a different type of file system and I'm just playing with it on the OS. Most of my systems use ext4 managed via LVM2. LVM is an enterprise volume manager to allow tremendous flexibility. LVM has been used on Linux inside enterprises for over 23 yrs. It is rock solid. ZFS is solid for data, but seems to have some remaining issues for use as the OS file system/volume manager. ZFS is pretty cool, but needs more time to be the single file system we need for everything. Of course, you'll find some people who are willing to risk their data and systems suggesting using ZFS for everything. I'll not use it except for data storage on systems I need to always work. On a test system - ZFS - go for it. There's no risk, since nothing important is on it.

  5. #15
    Join Date
    Feb 2021
    Beans
    21

    Re: var directory full, new Ubuntu 22.04 installation, no further apps permitted

    Sorry for the long delay. Okay I'm going to try the move for /usr into /.

  6. #16
    Join Date
    Feb 2021
    Beans
    21

    Exclamation Re: var directory full, new Ubuntu 22.04 installation, no further apps permitted

    Quote Originally Posted by TheFu View Post
    Just boot off alternate media, mount both file systems, .
    I've been able to boot off of an Ubuntu 20.04 install DVD. How do I even see the directories on the HardDrives? How do I mount them?

  7. #17
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: var directory full, new Ubuntu 22.04 installation, no further apps permitted

    Quote Originally Posted by julius-nepos View Post
    I've been able to boot off of an Ubuntu 20.04 install DVD. How do I even see the directories on the HardDrives? How do I mount them?
    Find any tutorial you like and follow it. You'll need to mount the storage to temporary locations to do the migration of files/directories. Basically, you will use CLI commands with 'mount' to do the temporary mounts. But the /etc/fstab inside the install will be used for mounts that happen at boot time, once the migration is done.

  8. #18
    Join Date
    Feb 2021
    Beans
    21

    Re: var directory full, new Ubuntu 22.04 installation, no further apps permitted

    Okay, found some useful articles.
    Have been able to mount the partitions on the flash drive to /mnt/flash1, flash2, and flash4. Didn't see a need to mount swap.
    Last edited by julius-nepos; August 24th, 2023 at 04:12 PM. Reason: update

  9. #19
    Join Date
    Feb 2021
    Beans
    21

    Re: var directory full, new Ubuntu 22.04 installation, no further apps permitted

    I've mounted the SSD, the HDD and also stuck in a 16Gb thumb drive. I've mounted them using the mount command:

    sudo mount /dev/nvme0n1p1 /mnt/flash1 and so on for 0n1p2 and 0n1p4. I've mounted the HDD to /mnt/hdd1 and the thumb drive to /mnt/sdb1

    Unfortunately, everything seems to be mounted READ-ONLY, thus I can get a directory listing but I can't copy it to any file. Is there any way to mount something so that I can at least write to the thumb drive?

    Also, there is no /usr partition found. There is under /dev/nvme0n1p2 ext4 100Gb 7.6Gb used, a bunch of directories including boot, dev, etc, home, sys, usr, var, and others.
    On the 5.46 Tb HDD, there is my user directory john with directories Desktop, Documents, Music, etc. inside.

    Sorry, I can get a listing but I can't write to any mounted files. I booted using the live Ubuntu 20.04 CD {DVD}.

  10. #20
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: var directory full, new Ubuntu 22.04 installation, no further apps permitted

    Linux will mount file systems read-only to protect them if they weren't correctly closed previously. When that happens, fsck needs to be run. Also, those mount commands are the bare minimum and leave the mount command to make guesses about the file system. For non-Linux file systems, without additional options, the user and group will be root:root, which is almost never what is desired.

    When running inside a Live-Boot environment (Try Ubuntu is the same), the username, ubuntu, it used with a userid of 999, not 1000, which is what the first userid gets in a standard install. Because these are different, you cannot use a normal account to move files. Anytime you are dealing with system files, it is necessary to be cognizant about users, groups, who own each file, each directory and ensure those are retained. In most #14 above, I showed commands with specific assumptions. You'd need to follow those assumptions OR change the commands to match the changes you decided to make.

    Linux is always a multi-user OS, regardless of what we may believe. We need to treat it like there are 5000 different users on the system.

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

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
  •