File System
Last updated
Last updated
Usually you don't need to add lines for disks into /etc/fstab
The OS will detect and mount the drives automatically, or let the user mount them
You only need to try adding lines to /etc/fstab if the OS doesn't see the drive at all, but it does show up in "lsblk"
BE CAREFUL - if you add a line to /etc/fstab and then change the disk partitioning or structure in any way, the system will not be able to mount it on startup and Linux could fail to boot.
In my case, I created a hardware RAID after adding the individual HDD's as separate lines to /etc/fstab, causing Ubuntu not to boot (or boot into emergency mode)
You might see a message "booting into emergency mode" when it fails to boot.
The solution is to delete any lines you added from /etc/fstab and it should boot again.
UBUNTU DOES NOT LIKE RAID ARRAYS CREATED BY THE INTEL HARDWARE RAID BOARD
Intel RST (Rapid Storage Technology) - hardware RAID driver
This is strange because I booted from a Lubuntu live USB and it saw the hardware RAID just fine
But for whatever reason, Ubuntu 22.04 didn't see the original hardware RAID that was there, and I can't get it to see a new one that I reformat and set up with the Intel hardware.
Creating the Intel hardware RAID causes corruption in the first HDD's backup GPT table, which throws a warning in "sudo fdisk -l"
When trying to add the hardware RAID into /etc/fstab and mounting it, it throws errors "wrong fs type, bad option, bad superblock, missing codepage or helper program, or other error." Or, "can't read superblock on /dev/…"
Clearly the hardware RAID board is modifying the first HDD's partition table in a way that Ubuntu doesn't like.
Rather than use the hardware RAID, better to use mdadm
to make a Linux software RAID.
sudo apt install mdadm
man mdadm
Mdadm cheat sheet |
Intel RST in Linux Guide |
Contains error in RAID container create command - list of devices must come immediately after "-n 3" option
There are numerous errors in the code snippets in this document
mdadm guide |
RAID comparison table |
Great article |
List of options for fstab entries |
Meaning of "major" and "minor" |
Guide |