I would like to install Rocky 8 on my machine as everything on a single NMVe and /home on a separate drive (actually, a RAID1 pair). Is this possible and, if not, is there a good workaround. I was able to do a test install with everything on one drive and then symlink /home to a separate drive otherdrive:/realhome/home (even though this made SElinux bark which I think I can create an “allow/ignore this” rule).
Suggestions (including "here is a better way organize things)
It does depend on the type of RAID, how you see it in the installer.
I would not use symlink. Symlink has to point to mounted filesystem (or else it is dangling).
Therefore, you have to mount the filesystem that contains home anyway.
If you can’t mount that directly to /home, then there are still two options:
Create/modify accounts to use the different path. For example:
$ grep some /etc/fstab
UUID=bc..50 /somewhere xfs defaults 1 2
$ getent passwd pan
pan:*:1000:1000:Pan:/somewhere/realhome/home/pan:/bin/bash
If the RAID presents itself as a normal disk, it should be possible to do this in the installer, without having to change fstab or selinux. When in the manual install part, you need to get rid of the default /home, and create it on the second disk (RAID) instead. You may need to create a volume group ‘vgh’ for it.
Once it looks right in the installer, it should create fstab and set the selinux as part of the install, then when you boot for the first time, /home will be mounted.
The tricky part is getting it right in the installer, when you select two disks it tries to span everything over both disks which is not what you want.
Once this is working, it should be possible to re-install the o/s (e.g. in a disaster) without affecting any of the data in /home.
Thank you for your replies. Over the next weekend, I will experiment with what you suggest and spend this week trying to make sure I understand.
To jlehtone’s point, I don’t want to use a symlink – it was just the only way I could get “something” close to what I wanted. Plus I do need to make sure your use of “RHEL 8 installation” matches what Rocky 8 is doing. I suspect you are correct that it is the same, but need to make sure.
To gerry666uk’s point, when I was testing to see what I could do, the Rocky 8 installer would not let me create /home on a separate drive. And if I tried to run install with no /home, it insisted on creating one by acting like “it had to have a user to finish”.
Allow me to state that I am not a knowledgeable sysAdmin type. I usually RAID1 my install (which means opSys and /home are on same RAID1) but friends are telling me that I really ought to have /home on separate drive. They are on Ubuntu and they are advising base on that opSys. They disapprove of my liking RAID1 and aren’t jumping into the whole “try to do a /home on a separate RAID1 drive(s) under Rocky/Centos/RHEL/Fedora”. So am I am a bit of a “newbie on my own” on trying to figure this out (that might be an understatement). I figured this is a necessary “full disclosure” as journalists say.
Is that “RAID1” Linux software RAID, genuine hardware RAID, or fakeRAID?
Rocky (like CentOS Linux previously) uses RHEL sources, so the installer should differ only in logos and the repositories that it attempts to connect to.
When I install system, I almost always leave part of disk(s) unallocated. That way there is room for installing the next/another distro (like Rocky 9).
Separate /home is very good. What is in root filesystem, “/” – well, on filesystems that contain OS files – are wiped on (re)install. It is very convenient to have user files, “/home”, in separate filesystem. Then you just install OS and make it mount the /home. Note though that account data is in /etc (for example the /etc/passwd).
Since I have space, I can install another distro, mount /home and old distros “/”, recover account data to new distro and keep rocking.
I have hardly ever local accounts though – accounts are on server and so are homes. The install without creating regular account should be possible. Even if you have to create one, just log in via console as root (so account’s files are not in use), move from /home to the other disk and then mount the other disk to /home.
“Just” – I know, not helpful if one does not yet have a feel for how to do most operations.
If you have normal disks, you can definitely remove the /home mount from the first disk, and create it on the second disk instead. Maybe you could try using the disks as normal disks to start with (without RAID). I’m assuming all your disks are blank right now.
When you’re in the manual storage part of the Rocky 8.5 GUI installer, there are some features worth knowing about; e.g. you can “populate automatically” to start with, you can also “revert” all changes and start again without having to re-run the installer, and at the end you should look carefully at the summary where it will list of the actions it’s about to take.
It should be Linux software RAID1. I’ve only done RAID1 on an install and never using whatever Linux instructions / packages are used to create on, but I would expect that to be Linux software RAID.
Haven’t gotten to the point of “next install” … getting /home on separate drive is enough for this round (smile).
Your “keep rocking” is in the vein of making sure that I change distro and not have to touch /home.
Your “just log in via console as root (so account’s files are not in use), move from /home to the other disk and then mount the other disk to /home” sounds like what I need. WIll be trying over weekend
Your “you can definitely remove the /home mount from the first disk, and create it on the second disk instead” sounds right. So between your suggestion and jlehtone’s, I think I have two similar paths to try.
I was planning on not bothering with RAID1 until I’ve done it without RAID1.
The distro that was available when I downloaded was 8.4. I will grab latest when I am ready to do the real thing … maybe it will be 8.6 by then.
The installer enumerates all devices, load drivers for them, and sniffs all metadata (partitions, RAIDs, LVM, filesystems) if it can. Assembles existing LVM volumes and RAID arrays. If it can. If the manual partitioning page in the installer does not show what you know to exists, then that has failed. I recall, perhaps it was CentOS 5, where I had such issue. Installer has virtual (text) console and I think I ran by hand “avengers assemble” there before entering the partitioning stage in GUI side. It was not trivial back then.
The installer does have a “Rescue mode” too. When running it the content of disks is not “used” by OS, so that is the safest way to do operations (copy files, update /etc/fstab) “offline”.
My rationale is that if I now allocate all the disk(s) to current install, then what will I do when “other distro”, say Rocky 9, is available?
In-place upgrade has never been supported by CentOS and Rocky. RHEL has some script and AlmaLinux created ELevate script, but those do not support all systems. Besides, EL major releases tend to differ lot as the are far apart; I’m not fond of duct-tape on duct-tape on duct-tape.
Remove current install (/ and /boot, not /home) and install fresh. Alas, config (like /etc/passwd) is in there. Then I need a copy of config to reapply from. (Then again, one always needs a backup.)
That is, I can’t have free space when I do the next install unless I “set it up” during current install. They say impolite things about hindsight …
Here’s one that I set up in a kernel virtual machine.
lsblk -o NAME,MAJ:MIN,TYPE,SIZE,LABEL,FSTYPE,MOUNTPOINT
NAME MAJ:MIN TYPE SIZE LABEL FSTYPE MOUNTPOINT
sr0 11:0 rom 1024M
vda 252:0 disk 10G
├─vda1 252:1 part 600M vfat /boot/efi
├─vda2 252:2 part 1G xfs /boot
└─vda3 252:3 part 7G LVM2_member
├─rl-root 253:0 lvm 5G xfs /
└─rl-swap 253:1 lvm 2G swap [SWAP]
vdb 252:16 disk 10G
└─vdb1 252:17 part 10G LVM2_member
├─vgb-home 253:2 lvm 5G xfs /home
└─vgb-data 253:3 lvm 4.5G xfs /data
The two disks are called ‘vda’ and ‘vdb’.
The o/s in on disk ‘vda’ using three partitions and one volume group called ‘rl’ on ‘vda3’.
The second disk ‘vdb’ has one partition called ‘vdb1’ and one volume group called ‘vgb’ which has two logical volumes formatted using ‘xfs’ called ‘home’ and ‘data’, which are mounted as /home and /data.
I had to create the volume group on the second disk before I could set up home and data.
Regarding spanning, I did mention earlier in the thread that it will try to span everyting, which is annoying, but it’s been like that since my testing in RHEL 8.0
I have not tried the setup above without LVM, but I like that it doesn’t have a hard barrier.
Okay, I tried this afternoon and it didn’t go well. As I mentioned, I can find no way in Rocky 8.4 install to either put /home on another drive or create an install without /home and the user that it insists be created as part of the installation.
I understand the jlehtone suggestion of having a different path and agree that is better than a symlink. But after seeing gerry66uk test on a virtual machine with /home on another drive, I really wanted to try to get that to work.
Trying to put the suggestions here together into something to try. First, no RAID1 until I can just do it on a single drive. Next, I created a Rocky 84 install (using automatic as I have add to start from scratch a couple time). I then parted/mkfs to have a destination for the new /home. I copy /home/paul onto a thumb drive so I can put it back in the new /home.
Based on the comment “If you have normal disks, you can definitely remove the /home mount from the first disk, and create it on the second disk instead.”, I try to remove /home. And I can’t. All I can do is get rid of the users under /home. But /home ain’t leaving. I can only presume there is some trick/command that I do not know
I searched online but there is nothing as the search engine sees “/home” and thinks “user’s home directory”. After multiple stabs, I restored the Rocky 8.4 install and converted my computer back from a test main to my real machine (which I am typing on right now).
I am prepared to just leave it at “different path to the real home” but it just seems that there could be a way to have the install use the real /home on a different drive.
So am I missing something here? Even if you have the home directory on another drive don’t you still have to mount it to “/home” within the “/” filesystem structure. How is it to be found otherwise?
Here is a link to the Redhat EL8 installation instructions which describes in fuller detail the installer options: RH EL8 Install Guide
It was linked earlier in this thread and is the best source for all the options you will be presented during the installation process. Chapter 10.6 is the most relevant to the custom partitioning you are attempting. I would ignore setting up raid or encryption for now.
I would pre-partition the second drive to create a 50Gb or more partition ( unformatted ) that you can select during the install process as “/home”.
This assumes that you are blowing away the current install on the nvme drive. It is difficult to move the home directory after installation because you can’t be logged into a regular user during the process of moving “/home/paul” to the other disk partition and remounting that to “/home”. Unless someone here on the forum has access to a Howto to move home on an active system it will take anyone here a good hour or more to write one.
You might need to try several times till you get the hang of the installer and disk selection.
But this part sounds muddled. “Rocky 84”, “parted”, where did all that come from? How did something called ‘paul’ end up in a /home before it’s been created?
By Rocky 84, I typoed as it should be a Rocky 8.4 install as that is the version I have on the memory stick (when I do final, I will get latest and greatest)
By parted/mkfs, I mean that I started from scratch on the drive I want /home on so there are no relics from the last attempt.
By paul, that’s me and infers that I created /home/paul when I created the default user as part of the install as I have not found a way to do an install without creating a initial user
Let me take a look at this link and see if it gives me any insight (along with your comments). For testing, I am using two scratch/test harddrives and not involving the NVMe or RAID1 until I can do what I want on a simple test set-up
I think I figured out your problem with the installer. After you select the destination media, your two disks, and then click DONE, on the next screen it presents you with the two disks with summary on left and actions on the right. So when you select the second disk, you need to click on REFORMAT in the right hand panel before you can create each additional partition on that disk whether it is /home or /data etc…
Otherwise it just errors out and you can’t do anything as you described.
Hope this helps when you get back to it.