Fusion issue - Raid or LVM?

Joined
Oct 16, 2023
Messages
36
Reaction score
5
Credits
492
Hello. Thanks for looking further into my general larger question(s). I have received better support here than the distro forum.
Okay, I know I am running on older HW so please spare me the comments of such.

I've been running MX Libretto KDE 23.5 I think for 6-7 months but it is bloated and mainly not using the full potential, whats left of it maybe, of my desktop.
Mid 2011 iMac 1TB hdd & 254GB internal ssd.
I have determaned that the drives have "unfused" and the only way to "refuse" without using the mac OS which I have zero use for, is to create a Raid array. I still question LVM but ultimataly I just want to get the best performance I can. I am currently on a live usb of MX Fluxbox that I would like to install but it seems to be a conflict of the MX gui installer, gparted and the command line that I have used to begin the Raid set up. I know the gui is supposed to be easier I think doing it has to be directly in the CL. To save reading a long story I will just add the code I have been trying and please assist me, I feel really close to making this happen. Thanks much smarter than I!

[demo@mx1:~
$ sudo fdisk -1
[sudo] password for demo:
fdisk: invalid option -- '1'
Try 'fdisk --help' for more information.
demo@mx1:~
$ sudo fdisk -l
Disk /dev/sdb: 233.76 GiB, 251000193024 bytes, 490234752 sectors
Disk model: APPLE SSD TS256C
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x712a1ccf

Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 1230847 1228800 600M ef EFI (FAT-12/16/32)
/dev/sdb2 * 1230848 206030847 204800000 97.7G 83 Linux
/dev/sdb3 206030848 477945855 271915008 129.7G 83 Linux
/dev/sdb4 477945856 490233855 12288000 5.9G 83 Linux


Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST31000528AS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 5378551D-1738-4991-94BA-EFBAD372C553

Device Start End Sectors Size Type
/dev/sda1 2048 526335 524288 256M EFI System
/dev/sda2 526336 555534335 555008000 264.6G Linux filesystem
/dev/sda3 638199808 1953523711 1315323904 627.2G Linux home
/dev/sda4 555534336 638199807 82665472 39.4G Linux swap

Partition table entries are not in disk order.


Disk /dev/sdc: 28.67 GiB, 30784094208 bytes, 60125184 sectors
Disk model: Cruzer Glide
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3aa27cc8

Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 60020735 60018688 28.6G 83 Linux
/dev/sdc2 60020736 60121087 100352 49M ef EFI (FAT-12/16/32)


Disk /dev/loop0: 1.64 GiB, 1763725312 bytes, 3444776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
demo@mx1:~
$ sudo apt-get update
Get:1 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:3 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:4 http://security.debian.org/debian-security bookworm-security/main i386 Packages [244 kB]
Get:5 https://mxrepo.com/mx/repo bookworm InRelease [25.3 kB]
Get:6 http://deb.debian.org/debian bookworm-updates/main i386 Packages [512 B]
Get:7 http://security.debian.org/debian-security bookworm-security/main amd64 Packages [251 kB]
Get:8 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [512 B]
Get:9 http://deb.debian.org/debian bookworm-updates/main Translation-en [360 B]
Get:10 http://security.debian.org/debian-security bookworm-security/main Translation-en [151 kB]
Get:11 http://deb.debian.org/debian bookworm/main i386 Packages [8,685 kB]
Get:12 http://security.debian.org/debian-security bookworm-security/contrib amd64 Packages [896 B]
Get:13 http://security.debian.org/debian-security bookworm-security/contrib i386 Packages [508 B]
Get:14 http://security.debian.org/debian-security bookworm-security/contrib Translation-en [652 B]
Get:15 http://security.debian.org/debian-security bookworm-security/non-free-firmware amd64 Packages [688 B]
Get:16 http://security.debian.org/debian-security bookworm-security/non-free-firmware i386 Packages [692 B]
Get:17 http://security.debian.org/debian-security bookworm-security/non-free-firmware Translation-en [472 B]
Get:18 https://mxrepo.com/mx/repo bookworm/main amd64 Packages [239 kB]
Get:19 https://mxrepo.com/mx/repo bookworm/main i386 Packages [229 kB]
Get:20 https://mxrepo.com/mx/repo bookworm/non-free i386 Packages [36.3 kB]
Get:21 https://mxrepo.com/mx/repo bookworm/non-free amd64 Packages [44.9 kB]
Get:22 http://deb.debian.org/debian bookworm/main amd64 Packages [8,792 kB]
Get:23 http://deb.debian.org/debian bookworm/main Translation-en [6,109 kB]
Get:24 http://deb.debian.org/debian bookworm/contrib amd64 Packages [54.1 kB]
Get:25 http://deb.debian.org/debian bookworm/contrib i386 Packages [46.6 kB]
Get:26 http://deb.debian.org/debian bookworm/contrib Translation-en [48.8 kB]
Get:27 http://deb.debian.org/debian bookworm/non-free i386 Packages [73.4 kB]
Get:28 http://deb.debian.org/debian bookworm/non-free amd64 Packages [97.3 kB]
Get:29 http://deb.debian.org/debian bookworm/non-free Translation-en [67.0 kB]
Get:30 http://deb.debian.org/debian bookworm/non-free-firmware amd64 Packages [6,240 B]
Get:31 http://deb.debian.org/debian bookworm/non-free-firmware i386 Packages [5,908 B]
Get:32 http://deb.debian.org/debian bookworm/non-free-firmware Translation-en [20.9 kB]
Fetched 25.5 MB in 6s (4,614 kB/s)
Reading package lists... Done
demo@mx1:~
$ sudo apt-get install mdadm
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
mdadm is already the newest version (4.2-5).
0 upgraded, 0 newly installed, 0 to remove and 102 not upgraded.
demo@mx1:~
$ sudo mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sda /dev/sdb
mdadm: chunk size defaults to 512K
mdadm: partition table exists on /dev/sda
mdadm: partition table exists on /dev/sda but will be lost or
meaningless after creating array
mdadm: partition table exists on /dev/sdb
mdadm: partition table exists on /dev/sdb but will be lost or
meaningless after creating array
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started.
demo@mx1:~
$ sudo mkfs.ext4 /dev/md0
mke2fs 1.47.0 (5-Feb-2023)
Discarding device blocks: done
Creating filesystem with 305403776 4k blocks and 76357632 inodes
Filesystem UUID: 0f5aaea6-ff54-4a74-8a2c-33b5a85095f3
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done

demo@mx1:~
$ sudo mkdir /mnt/raid0
demo@mx1:~
$ sudo mount /dev/md0 /mnt/raid0
demo@mx1:~
$ cd /
demo@mx1:/
$ mdadm --assemble --scan
mdadm: must be super-user to perform this action
demo@mx1:/
$ sudo mdadm --assemble --scan
[sudo] password for demo:
mdadm: No arrays found in config file or automatically
demo@mx1:/
$ sudo mount /dev/md0 /mnt/raid0
mount: /mnt/raid0: unknown filesystem type 'LVM2_member'.
dmesg(1) may have more information after failed mount system call.
demo@mx1:/
$ sudo mkfs.ext4 /dev/md0
mke2fs 1.47.0 (5-Feb-2023)
/dev/md0 contains a LVM2_member file system
Proceed anyway? (y,N) N

demo@mx1:/
$ sudo mdadm --assemble --scan
mdadm: No arrays found in config file or automatically
demo@mx1:/
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 1.6G 1 loop /live/linux
sda 8:0 0 931.5G 0 disk
└─md0 9:0 0 1.1T 0 raid0
sdb 8:16 0 233.8G 0 disk
└─md0 9:0 0 1.1T 0 raid0
sdc 8:32 1 28.7G 0 disk
├─sdc1 8:33 1 28.6G 0 part /home/demo/Live-usb-storage
│ /root/Live-usb-storage
│ /live/boot-dev
└─sdc2 8:34 1 49M 0 part
sdd 8:48 1 0B 0 disk
sr0 11:0 1 1024M 0 rom
demo@mx1:/
$ sudo fdisk /dev/sda
[sudo] password for demo:

Welcome to fdisk (util-linux 2.38.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

The primary GPT table is corrupt, but the backup appears OK, so that will be used.
This disk is currently in use - repartitioning is probably a bad idea.
It's recommended to umount all file systems, and swapoff all swap
partitions on this disk.

The device contains 'linux_raid_member' signature and it will be removed by a write command. See fdisk(8) man page and --wipe option for more details.
A hybrid GPT was detected. You have to sync the hybrid MBR manually (expert command 'M').
You're editing nested 'dos' partition table, primary partition table is 'gpt'.

Command (m for help): m

Help:

DOS (MBR)
a toggle a bootable flag
b edit nested BSD disklabel
c toggle the dos compatibility flag

Generic
d delete a partition
F list free unpartitioned space
l list known partition types
n add a new partition
p print the partition table
t change a partition type
v verify the partition table
i print information about a partition

Misc
m print this menu
u change display/entry units
x extra functionality (experts only)

Script
I load disk layout from sfdisk script file
O dump disk layout to sfdisk script file

Save & Exit
w write table to disk and exit
q quit without saving changes
r return from protective/hybrid MBR to GPT

You're editing nested 'dos' partition table, primary partition table is 'gpt'.

Command (m for help): b
There is no *BSD partition on /dev/sda.

The device (null) does not contain BSD disklabel.

Do you want to create a BSD disklabel? [Y]es/[N]o: N

Command (m for help): c

DOS Compatibility flag is set (DEPRECATED!)

Command (m for help): c
DOS Compatibility flag is not set

Command (m for help): m

Help:

DOS (MBR)
a toggle a bootable flag
b edit nested BSD disklabel
c toggle the dos compatibility flag

Generic
d delete a partition
F list free unpartitioned space
l list known partition types
n add a new partition
p print the partition table
t change a partition type
v verify the partition table
i print information about a partition

Misc
m print this menu
u change display/entry units
x extra functionality (experts only)

Script
I load disk layout from sfdisk script file
O dump disk layout to sfdisk script file

Save & Exit
w write table to disk and exit
q quit without saving changes
r return from protective/hybrid MBR to GPT

You're editing nested 'dos' partition table, primary partition table is 'gpt'.

Command (m for help): x

Expert command (m for help): m

Help (expert commands):

DOS (MBR)
b move beginning of data in a partition
F fix partitions C/H/S values
i change the disk identifier

Geometry (for the current label)
c change number of cylinders
h change number of heads
s change number of sectors/track

Generic
p print the partition table
v verify the partition table
d print the raw data of the first sector from the device
D print the raw data of the disklabel from the device
f fix partitions order
m print this menu

Save & Exit
q quit without saving changes
r return to main menu

You're editing nested 'dos' partition table, primary partition table is 'gpt'.

Expert command (m for help): q

demo@mx1:/]
 


You will want to use LVM if the disks are different sized. RAID works best if the disks are the same size.
If you "RAID" a 233GB disk and 1TB disk, you will only get the size of the smaller disk, so you will have two 233GB disks.
(almost 750GB will be unusable on the larger disk)

Since the disks have nothing useful on them, I'm inclined to say, just create a new partition table on them (gpt).
One of the partition tables is corrupt anyway. I'm not that familiar with MX, but most installers will let you do this during the install.

Once the OS has already been installed you can't change it. But it looks like you are booted from a USB drive, so you should be OK.

The other option... which is what I tend to do... is simply mount the second disk permanently. Then you don't need RAID or LVM.

You could have a mount point something like this..
Code:
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme1n1p4   50G   14G   37G  27% /
devtmpfs        4.0M     0  4.0M   0% /dev
efivarfs        128K   59K   65K  48% /sys/firmware/efi/efivars
/dev/nvme1n1p2  3.0G  364M  2.6G  13% /boot
/dev/nvme1n1p7  898G  318G  581G  36% /space
/dev/nvme1n1p3  860G   91G  770G  11% /home
/dev/sda1       220G  2.1M  208G   1% /sda1
/dev/nvme0n1p1  1.9T  2.1M  1.8T   1% /nvme0
/dev/nvme1n1p1  320M  7.6M  313M   3% /boot/efi
/dev/sdb1       234G   20G  203G   9% /sdb1

I just have /dev/sda and /dev/sdb at mount points /sda1 and /sdb1
I just use them like any other directory.
 
I'm sorry. I don't know how to display as "code" I tried [ ]

It's in the menu above where you entered the text.

Selection_036.png


You can also wrap text with the ` character on both ends, but that's for shorter inputs I think. I'm not sure how well it will deal with that many characters between it.
 


Follow Linux.org

Members online

No members online now.

Top