Finally switched to Linux Mint

Pages: 123
This ongoing discussion is making my (mostly unfounded) fears of setting up a dedicated Linux box less of an issue.

Now the only real stumbling block left is getting the money scraped up to go buy the recycled PC hardware.
Resizing partitions is when the potential for data loss becomes worrysome, and I’d definitely want to do a defrag kind of thing first, just to make sure all the data is packed right at the front end of the partition before shrinking it any, and a full backup just to be sure.

Each filesystem should provide utilities that perform the resize operation, i.e. shuffle the data blocks as required and update the filesystem metadata. Yes, you have to tell the filesystem first to stop using the last sectors in range before you update the partition table about the "last sector" for that partition.

Backups are always a sane thing. IMHO, if you don't maintain backups, then you consider your data worthless.

XFS, the default filesystem in RHEL, has no "shrink" option, only "grow". If one needs smaller volume, then one dumps data to other media, creates smaller volume, and restores data from the dump. (I don't use that default, even though haven't needed a shrink for a while ...)


GParted, a "live distro" (booted from USB) that runs exactly one application, the GUI "parted", calls those filesystem utilities, partition tools, and dd to "resize and move" partitions. The last time I did check, it did not support LVM.


The LVM (Logical Volume Manager) is an abstraction layer. One or more partition can have physical volume (PV), rather than filesystem. Volume group (VG) has one or more PVs. Groups of sectors, extents, are allocated to logical volumes (LV). LV has a filesystem.

It is possible to add or remove extents to LV, like you resize partition. The tool can even call the filesystem's resize utility. The extents do not have to be consecutive, unlike sectors in physical partition. They don't even have to be all within same PV, i.e. an LV can span multiple drives (but like rAID-0 that has its risks). It is also possible to move (copy+delete) extents of LV between PVs, "live" -- on running system. I have replaced drives with that.

The RHEL default is to create 2-3 partitions on the drive:
* /boot/efi, if EFI is in use
* /boot
* a PV
The PV has three LVs by default:
* /
* swap
* /home
Alas, as said, the /, /boot, and /home have XFS and all disk is allocated, so the LVM's additional flexibility is rather unusable.

The /boot/efi cannot be a LV, because UEFI has to load bootloader from it and does not support LVM. The bootloader usually loads kernel from /boot, and again LVM-support could be an issue.
<-- brain goes *poof* -->



The less I have to think about modern UEFI and stuff the happier I am.

My /boot/efi is a separate partition, everything else (root, home, etc) is on the other. If I wanted to be pedantic I would have separated root and system stuff out, but... I see no real point to that for now.

I still have to set up backups for my data, though. I’ve got a 2TB drive in there that isn’t formatted or mounted, so that’ll be my next step. I’ve just got to make it happen.
I would have separated root and system stuff out, but... I see no real point to that for now.

I see three logical sets of files:
* The system files. Applications, etc. Preferably installed with package manager.
* The config. System customizations. Includes list of installed packages and user accounts.
* User data. That includes your [account's] settings, preferences, and whatnot. These files are in /home/Duthomhas and deserve backups.

If one has a logical copy of the config, then one can "trivially" install new system from scratch with it and get same packages, customizations, and accounts (preserving uid/gid). There are configuration management systems, for example Ansible, Chef, and Puppet -- tools that read logical copy and (re)deploy. (The logical copy could be in git repo and have clones of the repo as backups.)

The system files are thus trivial to get back.

That leaves the content of /home (although one could have www and/or sql data, VM images, etc "user data" elsewhere).


If one has to reinstall the system, then one could leave separate /home untouched and simply mount it to the new system. It is slightly more convenient than restore from backup?

Then again, we do program, so we won't make mistakes that require reinstalls ...
I think the last time I actually had to reinstall an OS that I managed to goober was... XP?

Then again, we do program, so we won't make mistakes that require reinstalls ...

Lol, on the contrary, I do things to my system that normal people don’t, and often wonder if I have managed to muck it up in a way that makes things work for me that’d never work for anyone I give software to.

Just moving from Windows to Linux I realize I had forgotten a few configuration options for, say, Notepad++, that I had to track down and fix (again). Like telling it I’m okay doing a backwards search with regexp.

Though, I suppose I could have just copied my configuration over...
Last edited on
Registered users can post here. Sign in or register to post.
Pages: 123