-1

I have a RHEL 7 ext4 type filesystem and because of the lack of funding and no backups available I am trying to see if I can import ext4 filesystem from RHEL 7 into RHEL 8.

I have a RHEL 7 with 2 disks /dev/nvme0n1 and /dev/nvme1n1. The first disk is for OS filesystems and the second one has ext4 type filesystem. RHEL 8 update was done only on /dev/nvme0n1 and /dev/nvme1n1 was never touched. After the OS upgrade using only /dev/nvme0n1 when, I try to list the partitions on /dev/nvme1n1 (with ext4 type filesystem) I get the following msg: the old ext4 signature will be removed by a write command.

Is there a way that I can import the ext4 filesystem into RHEL 8? fdisk /dev/nvme1n1 does not see the partition however, blkid /dev/nvme1n1 lists the partition UUID and type as ext4.

3
  • Please edit your question to show the output of lsblk. Commented Jul 3 at 12:52
  • 1
    There's no such thing as "ext4 specific to RHEL 7" as ext4 is a universal filesystem and must be perfectly supported by RHEL 8. There's nothing to "import", you just use the partitions/volumes. If you cannot mount them, please show error messages, e.g. dmesg output. Commented Jul 3 at 13:15
  • Thanks Stephen for the reply. lsblk shows the entire disk /dev/nvme1n1 as ext4 (not /dev/nvme1n1p1). I was able to mount /dev/nvme1n1 but again this is entire disk and no /dev/nvme1n1p1. This is a test I am doing and trying to mimic the production situation before I move onto production. Commented Jul 3 at 13:47

3 Answers 3

2

when I try to list the partitions on /dev/nvme1n1 (with ext4 type filesystem) I get the following msg: the old ext4 signature will be removed by a write command.

fdisk /dev/nvme1n1 does not see the partition however, blkid /dev/nvme1n1 lists the partition UUID and type as ext4.

This indicates the entire nvme1n1 SSD has been initialized as a single ext4 filesystem, with no partitioning.

Partitions on disks are not something Linux inherently requires; the system firmware may require a specific form of partition table (BIOS MBR) or a specific partition (UEFI ESP) to exist for boot purposes, but it is certainly possible to just mkfs an entire disk for data/application software use, and then just mount it.

Try mounting it, with e.g. mount /dev/nvme1n1 /mnt for testing, or create a more permanent mount point for it wherever appropriate, create a /etc/fstab entry for it, and then mount it.

Creating filesystems on whole-disk devices can make things simpler on virtual machines (less steps in extending a virtual disk), however on physical hardware systems it is arguably a bit of a "bad habit" as a disk without a partition table is not as easily detectable as containing valid data by other operating systems.

2
  • Yes, I did try the mount and it worked. tested creating files/directory was also successful. Now what if I have CentOs 7 instead of RH-7? Are they that much different? Commented Jul 3 at 14:16
  • CentOS 7 and RHEL 7 are essentially identical regarding filesystem support.
    – telcoM
    Commented Jul 3 at 20:53
1

Formatting raw devices as partitions is extremely ill-advised. The GPT partitioning scheme data structure occupies less than 1MB, which is nothing in this day and age.

  • If you still pursue this, you will confuse the Linux kernel which will try to parse the first sector as a partition table regardless. There's no way to tell the kernel not to do it.
  • The OP almost destroyed his data by trying to use fdisk (and obviously forgetting what they did previously and how they used the device).
  • Normally when you update a Linux distro, you don't need to touch your boot loader configuration or /etc/fstab. The Linux kernel rarely if ever deprecates support for filesystems, so nothing needs to be done. The only exception that I'm aware of is ReiserFS which is scheduled for removal in 2025.
3
  • 1
    "There's no way to tell the kernel not to do it." – Oh, there are ways. Commented Jul 3 at 17:37
  • 1
    Patching the kernel is not something I'd consider "a way". Most people run a vendor supplied kernel, so, let's not delve into it. Commented Jul 3 at 18:03
  • It is incorrect to claim that "there is no way", however. One can at most say "there is no way without recompiling the kernel or adding a module". Commented Jul 4 at 3:45
0

another test was that on my test machine I made sure rh-7 ext4 is created with partition /dev/nvme1n1p1 and mounted with some test files in it. After I do the upgrade to rh-8 I was able to mount ext4 filesystem from rh-7 without any issues.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .