Originally Posted by
julius-nepos
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.
Originally Posted by
julius-nepos
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.
Originally Posted by
julius-nepos
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.
Originally Posted by
julius-nepos
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.
Bookmarks