Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

4 votes
2 answers
6641 views
linux stress, impose work on specific disks
Have a server running centos 7.6, and it has 4 ssd's as Raid-0 mounted as `/scratch/` I have the linux program `stress-1.0.4-16` and I just learned `stress-ng` existed. Is there a way with `stress` to tell it to do I/O operations to stress a specific set of disks such as my 4 disk Raid-0? Or does it...
Have a server running centos 7.6, and it has 4 ssd's as Raid-0 mounted as /scratch/ I have the linux program stress-1.0.4-16 and I just learned stress-ng existed. Is there a way with stress to tell it to do I/O operations to stress a specific set of disks such as my 4 disk Raid-0? Or does it only work on whatever the root file system is such as /tmp? And if that's the case I've done systemctl enable tmp.mount which means the /tmp folder is no longer on disk negating the disk i/o function of stress ?
ron (8647 rep)
Jan 22, 2020, 04:36 PM • Last activity: Aug 6, 2025, 11:09 AM
0 votes
2 answers
99 views
Is this possible to create raid1 from 8TB and 4TB+4TB disks, eg. stripe 4+4 + mirror 8?
I have one 8TB and two 4TB disks. I am curious if I am able to create 8TB raid from 8+4+4 disks? I tried this `sudo mkfs.btrfs -f -m raid1 -d raid1 /dev/sdc1 /dev/sdd1 /dev/cdb1` but this creates only 4TB raid. From my point of view it should be technically possible to crate 8TB stripe from two 4TB...
I have one 8TB and two 4TB disks. I am curious if I am able to create 8TB raid from 8+4+4 disks? I tried this sudo mkfs.btrfs -f -m raid1 -d raid1 /dev/sdc1 /dev/sdd1 /dev/cdb1 but this creates only 4TB raid. From my point of view it should be technically possible to crate 8TB stripe from two 4TB disks and then create 8TB mirror. Is this possible to achieve with btrfs tools?
Eugen Konkov (437 rep)
Feb 17, 2025, 05:24 PM • Last activity: Feb 18, 2025, 12:56 PM
0 votes
0 answers
66 views
How to Remove encrypted(LUKS) soft RAID forcely in Linux?
I built a soft RAID0 with two SSDs(Samsung-980Pro), and encrypted it with LUKS, since I had only one PC a few years ago. Now I bought a server, and directly disassemble one SSD from the old PC(without removing it from the soft RAID array), and attach it onto the server. But the SSD on the new server...
I built a soft RAID0 with two SSDs(Samsung-980Pro), and encrypted it with LUKS, since I had only one PC a few years ago. Now I bought a server, and directly disassemble one SSD from the old PC(without removing it from the soft RAID array), and attach it onto the server. But the SSD on the new server can **NOT** be re-partitioned, and the other SSD on the old PC also can not be removed from the array, since the array status is inactive. I even can **NOT** remove the whole RAID device from Linux, since it can not be opened with cryptsetup open. It is a boring job to re-disassemble/re-assemble the SSD between computers, as that the SSD must be pluged under many other devices. Is there a way, I can forcely re-initialize these two SSDs respectively on two different computers, regardless whatever they storage? Thanks!
Leon (203 rep)
Oct 13, 2024, 02:52 PM • Last activity: Oct 13, 2024, 05:52 PM
1 votes
2 answers
97 views
Converting sw md device from raid0 to raid1 with only one disk online
Is it possible to convert an existing raid0 md device with only one disk to a raid1 md device with one disk in order to add a second mirror disk later? It should be possible online.
Is it possible to convert an existing raid0 md device with only one disk to a raid1 md device with one disk in order to add a second mirror disk later? It should be possible online.
WilliWuff (11 rep)
Sep 13, 2024, 08:51 AM • Last activity: Sep 22, 2024, 12:45 PM
4 votes
1 answers
568 views
Raid 0+1 Failure Cases VS. Raid 1+0
I have heard that RAID 1+0 is more fault-reliant than RAID 0+1, because a secondary drive failure is more likely to cause data loss in RAID 0+1 than RAID 1+0. ![RAID 0+1 Example](https://static.thegeekstuff.com/wp-content/uploads/2011/10/raid01-6disks.png) In the above image, if "Disk 1" fails, whic...
I have heard that RAID 1+0 is more fault-reliant than RAID 0+1, because a secondary drive failure is more likely to cause data loss in RAID 0+1 than RAID 1+0. ![RAID 0+1 Example](https://static.thegeekstuff.com/wp-content/uploads/2011/10/raid01-6disks.png) In the above image, if "Disk 1" fails, which other disk failures will cause data loss? What I have read seems to indicate that the loss of _any_ drive in "Group 2" will cause data loss, but the reasoning behind this is unclear to me. If we lose "Disk 5", why would this cause data loss? It seems to me that there is sufficient information to recover the full state of data -- combining "Disk 4" + "Disk 2" + "Disk 3", for instance, should have all of the necessary information to continue functioning properly without data loss. In this case, why would the loss of "Disk 1" and "Disk 5" cause data loss? Thanks in advance!
quixotrykd (359 rep)
Jul 4, 2024, 05:40 AM • Last activity: Jul 4, 2024, 09:59 PM
2 votes
0 answers
59 views
Can't mount extended logical partitions in RAID 0 Fake Array created by dmaid and device mapper
First of all, I would like to let you know I come here cause I'm looking for a solution or a way to be able to mount the HOME partition and to read the inside data. I've been running Funtoo GNU/Linux on a **RAID 0 Fake Array** since I bought this computer in 2010, aprox. Yesterday booted into **Syst...
First of all, I would like to let you know I come here cause I'm looking for a solution or a way to be able to mount the HOME partition and to read the inside data. I've been running Funtoo GNU/Linux on a **RAID 0 Fake Array** since I bought this computer in 2010, aprox. Yesterday booted into **SystemRescue** and tried to format every partition **except HOME** part. and I think something went wrong while formatting cause suddenly I started suffering the following issue. dmraid -ay RAID set "isw_bggjiidefd_240GB_BX100v2_5" was activated device "isw_bggjiidefd_240GB_BX100v2_5" is now registered with dmeventd for monitoring RAID set "isw_cfccfdiidi_640GB_RAID0" was activated device "isw_cfccfdiidi_640GB_RAID0" is now registered with dmeventd for monitoring **ERROR: dos: partition address past end of RAID device** RAID set "isw_bggjiidefd_240GB_BX100v2_5p1" was activated RAID set "isw_bggjiidefd_240GB_BX100v2_5p2" was activated RAID set "isw_bggjiidefd_240GB_BX100v2_5p3" was activated ls /dev/mapper/ control isw_bggjiidefd_240GB_BX100v2_5p1 isw_bggjiidefd_240GB_BX100v2_5p3 isw_bggjiidefd_240GB_BX100v2_5 isw_bggjiidefd_240GB_BX100v2_5p2 isw_cfccfdiidi_640GB_RAID0 In the previous scheme and directory, **logical partitions inside the extended partition are missing**. Disk /dev/mapper/isw_bggjiidefd_240GB_BX100v2_5p1: 300 MiB, 314572800 bytes, 614400 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 16384 bytes / 32768 bytes Disk /dev/mapper/isw_bggjiidefd_240GB_BX100v2_5p2: 99.56 GiB, 106902323200 bytes, 208793600 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 16384 bytes / 32768 bytes Disklabel type: dos Disk identifier: 0x73736572 Device Boot Start End Sectors Size Id Type /dev/mapper/isw_bggjiidefd_240GB_BX100v2_5p2-part1 1920221984 3736432267 1816210284 866G 72 unknown /dev/mapper/isw_bggjiidefd_240GB_BX100v2_5p2-part2 1936028192 3889681299 1953653108 931.6G 6c unknown /dev/mapper/isw_bggjiidefd_240GB_BX100v2_5p2-part3 0 0 0 0B 0 Empty /dev/mapper/isw_bggjiidefd_240GB_BX100v2_5p2-part4 27722122 27722568 447 223.5K 0 Empty Partition 4 does not start on physical sector boundary. Partition table entries are not in disk order. Disk /dev/mapper/isw_bggjiidefd_240GB_BX100v2_5p3: 450 MiB, 471859200 bytes, 921600 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 16384 bytes / 32768 bytes Disklabel type: dos Disk identifier: 0x6c727443 Device Boot Start End Sectors Size Id Type /dev/mapper/isw_bggjiidefd_240GB_BX100v2_5p3-part1 1634886000 3403142031 1768256032 843.2G 75 PC/IX /dev/mapper/isw_bggjiidefd_240GB_BX100v2_5p3-part2 1936028160 3889681267 1953653108 931.6G 61 SpeedStor /dev/mapper/isw_bggjiidefd_240GB_BX100v2_5p3-part3 0 0 0 0B 0 Empty /dev/mapper/isw_bggjiidefd_240GB_BX100v2_5p3-part4 26935690 26936121 432 216K 0 Empty Partition 1 does not start on physical sector boundary. Partition 4 does not start on physical sector boundary. Partition table entries are not in disk order. Gparted startup Drive scheme in Gparted Gparted Partition information Now, **using mdadm** instead of dmraid Fake RAID Tool. Assembling the array through *mdadm* I can see every block device, but I can't mount HOME partition */dev/md/240GB_BX100v2.5_0p9*. I can mount the other partitions under the extended partition because I formatted them when assembled by mdadm. mdadm --examine --scan ARRAY metadata=imsm UUID=4f6eb512:955e67f6:5a22279e:f181f40d ARRAY /dev/md/640GB_RAID0 container=4f6eb512:955e67f6:5a22279e:f181f40d member=0 UUID=1f9b13e6:b6dc2975:9c367bbb:88fa3d2b ARRAY metadata=imsm UUID=c842ced3:6e254355:fed743f8:a4e8b8b8 ARRAY /dev/md/240GB_BX100v2.5 container=c842ced3:6e254355:fed743f8:a4e8b8b8 member=0 UUID=a2e2268c:17e0d658:17b6f16d:b090f250 ls /dev/md/ 240GB_BX100v2.5_0 240GB_BX100v2.5_0p3 240GB_BX100v2.5_0p6 240GB_BX100v2.5_0p9 640GB_RAID0_0p2 240GB_BX100v2.5_0p1 240GB_BX100v2.5_0p4 240GB_BX100v2.5_0p7 640GB_RAID0_0 imsm0 240GB_BX100v2.5_0p2 240GB_BX100v2.5_0p5 240GB_BX100v2.5_0p8 640GB_RAID0_0p1 imsm1 mount /dev/md/240GB_BX100v2.5_0p9 /mnt/ mount: /mnt: wrong fs type, bad option, bad superblock on /dev/md126p9, missing codepage or helper program, or other error. dmesg(1) may have more information after failed mount system call. dmesg [ 179.400010] EXT4-fs (md126p9): bad geometry: block count 92565760 exceeds size of device (92565504 blocks) But I can list every file using debugfs: debugfs -c /dev/md126p9 debugfs 1.47.0 (5-Feb-2023) debugfs: ls 2 (12) . 2 (12) .. 11 (56) lost+found 1712129 (16) joan 3670017 (12) tmp 4653057 (916) sys Home partition with mdadm & Gparted
peris (121 rep)
Mar 23, 2024, 06:45 PM • Last activity: Mar 23, 2024, 08:08 PM
0 votes
0 answers
159 views
Linux cannot recognise my RAID0 array drives
**OS:** 64bit Debian 11 Bullseye with KDE Plasma Desktop environment **PC Specs:** AMD FX-4300 Quad Core Processor, nVidia Geforce GTX 970 Graphics card, ASUS M5A97 LE R2.0 Motherboard, 16GB unknown brand DDR2 RAM **Problem:** My RAID0 array was created in bios; and Windows can recognise it but Linu...
**OS:** 64bit Debian 11 Bullseye with KDE Plasma Desktop environment **PC Specs:** AMD FX-4300 Quad Core Processor, nVidia Geforce GTX 970 Graphics card, ASUS M5A97 LE R2.0 Motherboard, 16GB unknown brand DDR2 RAM **Problem:** My RAID0 array was created in bios; and Windows can recognise it but Linux can't. How do I get Linux to recognise it?
Pepe Wightmore (1 rep)
Jun 3, 2022, 12:10 PM
1 votes
0 answers
21 views
mdadm: after a re-install, two raid1 partitions were relabeled raid0 but the data are raid1
Maybe the simplest thing is to just mount one partition by itself read only and pull the little bit of data not fully backed up and rebuild from scratch. Otherwise, since there has been no I/O activity on the partitions since I shut down the old system, I was hoping I could just tell Linux, "no, tho...
Maybe the simplest thing is to just mount one partition by itself read only and pull the little bit of data not fully backed up and rebuild from scratch. Otherwise, since there has been no I/O activity on the partitions since I shut down the old system, I was hoping I could just tell Linux, "no, those are RAID1 partitions" and mount the mirrored data. I haven't found a way to do either. :( I'm considering researching the format of the superblock and binary editing in the RAID level.
Bruce (131 rep)
Mar 31, 2022, 06:40 AM
17 votes
3 answers
3655 views
How does RAID0 work underneath, when the devices have different sizes?
To my surprise the CentOS 7 installer allowed me to create a RAID0 device consisting of roughly a 17 GB disk and a 26 GB disk. I would've expected that even if it allows that, that the logical size would be `2 * min(17 GB, 26 GB) ~= 34 GB`. Yet I can really see a usable size of 44 GB on the filesyst...
To my surprise the CentOS 7 installer allowed me to create a RAID0 device consisting of roughly a 17 GB disk and a 26 GB disk. I would've expected that even if it allows that, that the logical size would be 2 * min(17 GB, 26 GB) ~= 34 GB. Yet I can really see a usable size of 44 GB on the filesystem level:
$ cat /sys/block/md127/md/dev*/size
16955392
26195968
$ df -h |grep md
/dev/md127   44G 1.9G 40G 5% /
How will the md subsystem behave performance wise, compared to a situation where the disks are equal? As it's impossible to do a straightforward balanced stripe across 2 disks.
hbogert (759 rep)
Jan 25, 2022, 11:53 AM • Last activity: Jan 26, 2022, 07:55 AM
0 votes
0 answers
248 views
Need help figuring out why this LUKS setup isn't working
Problem: I'm trying to set up an encrypted raid0 device with btrfs. I'm able to get beyond the first password prompt to enter the LUKS device but after that I get an error from fsck saying something like device UUID=187a468c-cab5-4a29-861e-8c5b2c7cca98 not found. I've been messing with it for about...
Problem: I'm trying to set up an encrypted raid0 device with btrfs. I'm able to get beyond the first password prompt to enter the LUKS device but after that I get an error from fsck saying something like device UUID=187a468c-cab5-4a29-861e-8c5b2c7cca98 not found. I've been messing with it for about 12 hours now and I cant figure it out. I made sure to run grub-mkconfig before I reboot. Let me know if you need anymore info ``` $ blkid -o full /dev/mapper/zion: LABEL="root" UUID="187a468c-cab5-4a29-861e-8c5b2c7cca98" UUID_SUB="6cd2134e-5817-455a-a216-c41ce0495e63" BLOCK_SIZE="4096" TYPE="btrfs" /dev/sdc2: UUID="30786a7f-df33-4f36-8c80-4a4f7b4e145d" TYPE="crypto_LUKS" PARTUUID="07f3b77e-02" # /etc/crypttab zion UUID="30786a7f-df33-4f36-8c80-4a4f7b4e145d" none luks # /etc/fstab UUID=187a468c-cab5-4a29-861e-8c5b2c7cca98 / btrfs rw,relatime,space_cache,subvolid=5,subvol=/ 0 0 # /etc/mkinitcpio.conf HOOKS=(base udev keyboard autodetect modconf block mdadm_udev encrypt fsck btrfs filesystems fsck) # /etc/default/grub GRUB_DEFAULT=0 GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="Arch" GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet" GRUB_CMDLINE_LINUX="" GRUB_PRELOAD_MODULES="part_gpt part_msdos usb usb_keyboard ohci uhci ehci" GRUB_ENABLE_CRYPTODISK=y GRUB_DISABLE_OS_PROBER=y # other default values omitted # /etc/mdadm.conf ARRAY /dev/md/imsm0 metadata=imsm UUID=2c9194b5:2dc765c7:deb29150:22b74163 ARRAY /dev/md/zion_0 container=/dev/md/imsm0 member=0 UUID=533a48be:25fa4cb7:4111a783:7d68bb14 $ grub-mkconfig -o /boot/grub/grub.cfg Generating grub configuration file ... Found linux image: /boot/vmlinuz-linux-zen Found initrd image: /boot/initramfs-linux-zen.img Found fallback initrd image(s) in /boot: initramfs-linux-zen-fallback.img Found linux image: /boot/vmlinuz-linux Found initrd image: /boot/initramfs-linux.img Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img Detecting snapshots ... # /boot/grub/grub.cfg # # DO NOT EDIT THIS FILE # # It is automatically generated by grub-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # ### BEGIN /etc/grub.d/00_header ### insmod part_gpt insmod part_msdos insmod usb insmod usb_keyboard insmod ohci insmod uhci insmod ehci if [ -s $prefix/grubenv ]; then load_env fi if [ "${next_entry}" ] ; then set default="${next_entry}" set next_entry= save_env next_entry set boot_once=true else set default="0" fi if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi export menuentry_id_option if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function load_video { if [ x$feature_all_video_module = xy ]; then insmod all_video else insmod efi_gop insmod efi_uga insmod ieee1275_fb insmod vbe insmod vga insmod video_bochs insmod video_cirrus fi } if [ x$feature_default_font_path = xy ] ; then font=unicode else insmod part_msdos insmod cryptodisk insmod luks insmod gcry_rijndael insmod gcry_rijndael insmod gcry_sha256 insmod btrfs cryptomount -u 30786a7fdf334f368c804a4f7b4e145d set root='cryptouuid/30786a7fdf334f368c804a4f7b4e145d' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='cryptouuid/30786a7fdf334f368c804a4f7b4e145d' 187a468c-cab5-4a29-861e-8c5b2c7cca98 else search --no-floppy --fs-uuid --set=root 187a468c-cab5-4a29-861e-8c5b2c7cca98 fi font="/usr/share/grub/unicode.pf2" fi if loadfont $font ; then set gfxmode=auto load_video insmod gfxterm set locale_dir=$prefix/locale set lang=en_US insmod gettext fi terminal_input console usb_keyboard terminal_output gfxterm if [ x$feature_timeout_style = xy ] ; then set timeout_style=menu set timeout=5 # Fallback normal timeout code in case the timeout_style feature is # unavailable. else set timeout=5 fi ### END /etc/grub.d/00_header ### ### BEGIN /etc/grub.d/10_linux ### menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-187a468c-cab5-4a29-861e-8c5b2c7cca98' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod cryptodisk insmod luks insmod gcry_rijndael insmod gcry_rijndael insmod gcry_sha256 insmod btrfs cryptomount -u 30786a7fdf334f368c804a4f7b4e145d set root='cryptouuid/30786a7fdf334f368c804a4f7b4e145d' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='cryptouuid/30786a7fdf334f368c804a4f7b4e145d' 187a468c-cab5-4a29-861e-8c5b2c7cca98 else search --no-floppy --fs-uuid --set=root 187a468c-cab5-4a29-861e-8c5b2c7cca98 fi echo 'Loading Linux linux-zen ...' linux /boot/vmlinuz-linux-zen root=UUID=187a468c-cab5-4a29-861e-8c5b2c7cca98 rw loglevel=3 quiet echo 'Loading initial ramdisk ...' initrd /boot/initramfs-linux-zen.img } submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-187a468c-cab5-4a29-861e-8c5b2c7cca98' { menuentry 'Arch Linux, with Linux linux-zen' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-advanced-187a468c-cab5-4a29-861e-8c5b2c7cca98' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod cryptodisk insmod luks insmod gcry_rijndael insmod gcry_rijndael insmod gcry_sha256 insmod btrfs cryptomount -u 30786a7fdf334f368c804a4f7b4e145d set root='cryptouuid/30786a7fdf334f368c804a4f7b4e145d' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='cryptouuid/30786a7fdf334f368c804a4f7b4e145d' 187a468c-cab5-4a29-861e-8c5b2c7cca98 else search --no-floppy --fs-uuid --set=root 187a468c-cab5-4a29-861e-8c5b2c7cca98 fi echo 'Loading Linux linux-zen ...' linux /boot/vmlinuz-linux-zen root=UUID=187a468c-cab5-4a29-861e-8c5b2c7cca98 rw loglevel=3 quiet echo 'Loading initial ramdisk ...' initrd /boot/initramfs-linux-zen.img } menuentry 'Arch Linux, with Linux linux-zen (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-zen-fallback-187a468c-cab5-4a29-861e-8c5b2c7cca98' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod cryptodisk insmod luks insmod gcry_rijndael insmod gcry_rijndael insmod gcry_sha256 insmod btrfs cryptomount -u 30786a7fdf334f368c804a4f7b4e145d set root='cryptouuid/30786a7fdf334f368c804a4f7b4e145d' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='cryptouuid/30786a7fdf334f368c804a4f7b4e145d' 187a468c-cab5-4a29-861e-8c5b2c7cca98 else search --no-floppy --fs-uuid --set=root 187a468c-cab5-4a29-861e-8c5b2c7cca98 fi echo 'Loading Linux linux-zen ...' linux /boot/vmlinuz-linux-zen root=UUID=187a468c-cab5-4a29-861e-8c5b2c7cca98 rw loglevel=3 quiet echo 'Loading initial ramdisk ...' initrd /boot/initramfs-linux-zen-fallback.img } menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-187a468c-cab5-4a29-861e-8c5b2c7cca98' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod cryptodisk insmod luks insmod gcry_rijndael insmod gcry_rijndael insmod gcry_sha256 insmod btrfs cryptomount -u 30786a7fdf334f368c804a4f7b4e145d set root='cryptouuid/30786a7fdf334f368c804a4f7b4e145d' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='cryptouuid/30786a7fdf334f368c804a4f7b4e145d' 187a468c-cab5-4a29-861e-8c5b2c7cca98 else search --no-floppy --fs-uuid --set=root 187a468c-cab5-4a29-861e-8c5b2c7cca98 fi echo 'Loading Linux linux ...' linux /boot/vmlinuz-linux root=UUID=187a468c-cab5-4a29-861e-8c5b2c7cca98 rw loglevel=3 quiet echo 'Loading initial ramdisk ...' initrd /boot/initramfs-linux.img } menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-187a468c-cab5-4a29-861e-8c5b2c7cca98' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod cryptodisk insmod luks insmod gcry_rijndael insmod gcry_rijndael insmod gcry_sha256 insmod btrfs cryptomount -u 30786a7fdf334f368c804a4f7b4e145d set root='cryptouuid/30786a7fdf334f368c804a4f7b4e145d' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='cryptouuid/30786a7fdf334f368c804a4f7b4e145d' 187a468c-cab5-4a29-861e-8c5b2c7cca98 else search --no-floppy --fs-uuid --set=root 187a468c-cab5-4a29-861e-8c5b2c7cca98 fi echo 'Loading Linux linux ...' linux /boot/vmlinuz-linux root=UUID=187a468c-cab5-4a29-861e-8c5b2c7cca98 rw loglevel=3 quiet echo 'Loading initial ramdisk ...' initrd /boot/initramfs-linux-fallback.img } } ### END /etc/grub.d/10_linux ### ### BEGIN /etc/grub.d/20_linux_xen ### ### END /etc/grub.d/20_linux_xen ### ### BEGIN /etc/grub.d/30_os-prober ### ### END /etc/grub.d/30_os-prober ### ### BEGIN /etc/grub.d/30_uefi-firmware ### ### END /etc/grub.d/30_uefi-firmware ### ### BEGIN /etc/grub.d/40_custom ### # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. ### END /etc/grub.d/40_custom ### ### BEGIN /etc/grub.d/41_custom ### if [ -f ${config_directory}/custom.cfg ]; then source ${config_directory}/custom.cfg elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then source $prefix/custom.cfg fi ### END /etc/grub.d/41_custom ### ### BEGIN /etc/grub.d/41_snapshots-btrfs ### ### END /etc/grub.d/41_snapshots-btrfs ###
Dominic (329 rep)
Dec 12, 2021, 01:07 AM • Last activity: Dec 13, 2021, 10:18 AM
2 votes
2 answers
259 views
Is it possible to keep data in procedure Raid1 growing to Raid5?
I have Raid 1 `/dev/sda` `/dev/sdb` as `md0` then now I want to expand for Raid5 So, my idea is sudo mdadm --add /dev/md0 /dev/sdd sudo mdadm --grow /dev/md0 --level=raid5 --raid-devices=3 In these processes. The contents in the HDD will be deleted or not??
I have Raid 1 /dev/sda /dev/sdb as md0 then now I want to expand for Raid5 So, my idea is sudo mdadm --add /dev/md0 /dev/sdd sudo mdadm --grow /dev/md0 --level=raid5 --raid-devices=3 In these processes. The contents in the HDD will be deleted or not??
whitebear (245 rep)
Sep 18, 2020, 05:07 PM • Last activity: Sep 18, 2020, 05:49 PM
1 votes
1 answers
1433 views
btrfs RAID0 - should I stripe or duplicate metadata?
I want to use btrfs with raid0 on three nvme drives. These should contain the operating system and most application files, whereas valuable user files will be on a network drive or seperate disk. What is there any point in duplicating metadata with mkfs.btrfs -m if I am going to stripe the actual da...
I want to use btrfs with raid0 on three nvme drives. These should contain the operating system and most application files, whereas valuable user files will be on a network drive or seperate disk. What is there any point in duplicating metadata with mkfs.btrfs -m if I am going to stripe the actual data? If one of the drives fails, everything will be lost anyway right? on the other hand, should I expect a performance impact either way? I am aiming for maximum throughput for my non-essential data I am actively working on.
Andreas Hartmann (181 rep)
Feb 19, 2020, 05:54 PM • Last activity: Apr 6, 2020, 05:11 AM
1 votes
1 answers
862 views
MDADM creates additional block devices
I noticed a strange issue when creating RAID array with *mdadm*. As far as I see, it creates additional devices of `md` type. According to the [kernel.org][1] documentation, the `md` device type is Metadisk (RAID) devices. > The metadisk driver is used to span a filesystem across multiple > physical...
I noticed a strange issue when creating RAID array with *mdadm*. As far as I see, it creates additional devices of md type. According to the kernel.org documentation, the md device type is Metadisk (RAID) devices. > The metadisk driver is used to span a filesystem across multiple > physical disks. However, this started to happens today on the same host. (I am using a configuration management tool to create a RAID array, but the same happens when I issue the *mdadm* commands manually. *lsblk* output looks like below: user@host:~$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1 259:0 0 1.7T 0 disk └─md0 9:0 0 3.5T 0 raid0 └─md0p2 259:2 0 1.8T 0 md xvda 202:0 0 20G 0 disk └─xvda1 202:1 0 20G 0 part / xvdf 202:80 0 20G 0 disk nvme1n1 259:1 0 1.7T 0 disk └─md0 9:0 0 3.5T 0 raid0 └─md0p2 259:2 0 1.8T 0 md Can someone shed some light? Is this expected? I am seeing this for the first time. Host is *Ubuntu 16.04.6 LTS* **Clarification** Why are these created: └─md0p2 259:2 0 1.8T 0 md
Alan Kis (283 rep)
Aug 13, 2019, 11:48 AM • Last activity: Aug 13, 2019, 02:55 PM
1 votes
0 answers
230 views
How to convert RedHat 7 Raid 0 system from UUID to device (sda/sdb)
I'm trying to create an image of an RHEL 7.6 Raid0 device. I've eliminated the UUIDs from grub.conf, but the target device is still failing on boot because it's looking for the UUIDs from the source device. I think the raid configuration is the culprit, because /etc/mdadm.conf contains references to...
I'm trying to create an image of an RHEL 7.6 Raid0 device. I've eliminated the UUIDs from grub.conf, but the target device is still failing on boot because it's looking for the UUIDs from the source device. I think the raid configuration is the culprit, because /etc/mdadm.conf contains references to the UUIDs - it looks like this: # mdadm.conf written out by anaconda MAILADDR root AUTO +imsm +1.x -all ARRAY /dev/md/Volume1_0 UUID=074e9851:5ee0a282:677d450c:fdbe6a69 ARRAY /dev/md/imsm0 UUID=82a99e7a:3e1729ac:3aae2e09:d4c32c2b This url: https://www.thegeekdiary.com/redhat-centos-managing-software-raid-with-mdadm/ contains some directions on how to reconfigure the using mdadm, but I haven't been able to figure it out yet. For example, mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sda /dev/sdb gives the message super1.x cannot open /dev/sda: Device or resource busy /dev/sda appears to be part of a raid array: level=container devices=0 partition table exists on /dev/sda but will be lost or meaningless after creating array /dev/sdb appears to be part of a raid array continue? Obviously, I can't continue with this type of message. The raid array is currently configured in the BIOS. Maybe it would be better to not do it that way, and create it using mdadm? Edit: More complete info: I think it's a real hardware card - it's a custom vendor and they don't come cheap. I checked the previous Centos 6.10 version, which was RAID 0, and it had no mdadm.conf. So apparently, RHEL 7.6 creates an mdadm.conf even if it's a hardware setup. The reason I think RAID is the issue is that the clone works when I set the system up as non-read. Also, when drops into emergency mode, the console show several warnings such as: Warning: /dev/disk/by-id/md-uuid-xxxx... does not exist Warning: /dev/disk/by-id/md-uuid-yyyy... does not exist Warning: /dev/mapper/rhel-root does not exist Warning: /dev/rhel/root does not exist Warning: /dev/rhel/swap does not exist And the UUIDs there are the same as those on the source system.
Jack BeNimble (165 rep)
Apr 17, 2019, 11:32 AM • Last activity: May 8, 2019, 08:43 PM
2 votes
1 answers
2116 views
Unable to boot after installing grub for new Arch Linux Install on Acer S7
I have followed the instructions on the [Arch Linux beginner's guide][1] to do a dual boot on an Acer S7-392. I only did not do the `initramfs` part and I did not create the partitions at the install since I used another tool to create the partitions before the install. Also I did not do any part to...
I have followed the instructions on the Arch Linux beginner's guide to do a dual boot on an Acer S7-392. I only did not do the initramfs part and I did not create the partitions at the install since I used another tool to create the partitions before the install. Also I did not do any part to install a RAID0 as the USB stick found the RAID0 after booting without me having to do anything. Also I made the following choices: - /dev/mp126p5 is my / - /dev/mp126p6 is my /boot - /dev/mp126p7 is my swap However after installing Grub, I am unable to boot Linux. I managed to add an entry for Windows and boot it successfully. blkid returns the following: /dev/sda: TYPE="isw_raid_member" /dev/sdb: TYPE="isw_raid_member" /dev/sdc1: LABEL="ARCH_201503" UUID="1E0A-194C" TYPE="vfat" PARTUUID="c3072e18-01" /dev/loop0: TYPE="squashfs" /dev/loop1: UUID="5aecb61b-2567-403a-a752-050e4d164111" TYPE="ext4" /dev/loop2: UUID="5aecb61b-2567-403a-a752-050e4d164111" TYPE="ext4" /dev/mapper/arch_airootfs: UUID="5aecb61b-2567-403a-a752-050e4d164111" TYPE="ext4" /dev/md126p1: LABEL="Recovery" UUID="70583CED583CB3A6" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="498d4ed4-3188-4daa-8059-824c94fd919a" /dev/md126p2: LABEL="ESP" UUID="443E-CEA7" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="5590eefc-4879-4ad8-bdbb-83addea5df0c" /dev/md126p4: LABEL="Windows" UUID="8C48153E4815290A" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="ad25c7d6-ab88-4e42-be00-48fb3695771c" /dev/md126p5: LABEL="ARCH" UUID="a5e3b60e-8359-8c5e-24d5-b31dcdb7c56c" TYPE="ext4" PARTLABEL="Basic data partition" PARTUUID="1dc85605-e2b2-4887-9f91-3b8e08a9b23d" /dev/md126p6: UUID="C65D-DD84" TYPE="vfat" PARTLABEL="Basic data partition" PARTUUID="1b97aac7-91ea-490f-c87b-de63a37540a1" /dev/md126p7: UUID="402ac0b6-7a85-40ff-8757-6e5aa62a7d46" TYPE="swap" PARTLABEL="Basic data partition" PARTUUID="591680a4-bda3-452b-75cc-54084b005b34" /dev/md126p8: LABEL="Push Button Reset" UUID="E45E43485E43132A" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="03da0cd7-674e-494a-9b11-94bea46585ea" /dev/md126: PTUUID="db649bd9-6051-46ac-8a57-6506552ae288" PTTYPE="gpt" /dev/md126p3: PARTLABEL="Microsoft reserved partition" PARTUUID="18c44381-ef76-4f4b-8b26-f92980cfe007" My /boot/grub/grub.cfg file can be found at this pastebin link . I have added one entry to boot Windows and this works: I can boot Windows successfully. I used the following script to install grub: ##!/bin/bash grub-mkconfig > /boot/grub/grub.cfg grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub_uefi --boot-directory=/boot --recheck --debug On startup, after selecting the Arch partition in grub, I see the following on the screen: [ xxxxxxxxxx] Ignoring BGRT: Invalid status 0 (expected 1) starting version 218 ERROR: device 'UUID=a5e3b60e-8359-8c5e-24d5-b31dcdb7c56c' not found. Skipping fsck. ERROR: Unable to find root device 'UUID=a5e3b60e-8359-8c5e-24d5-b31dcdb7c56c' . You are being dropped to a recovery shell Type 'exit' to try and continue booting sh: can't access tty: job control turned off [rootfs /]# This is strange because, when I booted on the usb stick, I installed / in /dev/md126p5 and the UUID looks correct (if it is not it is because I typed by hand the error message after booting): The contents of /etc/fstab are: # # /etc/fstab: static file system information # # # /dev/md126p5 LABEL=ARCH # /dev/md126p5 LABEL=ARCH UUID=a5e3b60e-8359-8c5e-24d5-b31dcdb7c56c / ext4 rw,relatime,data=ordered 0 1 # /dev/md126p6 UUID=C65D-DD84 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2 # /dev/md126p4 LABEL=Windows UUID=8C48153E4815290A /win8 ntfs rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0 # /dev/md126p2 LABEL=ESP UUID=443E-CEA7 /winboot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2 # /dev/md126p7 UUID=402ac0b6-7a85-40ff-8757-6e5aa62a7d46 none swap defaults 0 0 I am a bit struggling on this one, is it because the Acer S7 comes with a RAID 0 by default ? I have never installed Linux on a RAID 0, I assumed that because the USB stick can find the RAID 0 I would not have to do anything special to make it work.
BlueTrin (141 rep)
Mar 11, 2015, 09:19 AM • Last activity: Apr 18, 2019, 12:07 PM
1 votes
1 answers
699 views
mkswap complains that partition is misaligned (LVM on RAID-0)
I have a RAID-0 setup on two identical hard disks (same brand and model). The partition table is identical on both (I have cloned it). However, `/dev/md0` occupies only part of the disks, because I had to do some juggling with data I had on a previous installation, so I could not just wipe out every...
I have a RAID-0 setup on two identical hard disks (same brand and model). The partition table is identical on both (I have cloned it). However, /dev/md0 occupies only part of the disks, because I had to do some juggling with data I had on a previous installation, so I could not just wipe out everything. Anyway, I set up LVM on md0, and created some logical volumes, including one for swap. But when I use mkswap, it complains about the partition being misaligned: sudo mkswap /dev/vg000/swap mkswap: warning: /dev/vg000/swap is misaligned Setting up swapspace version 1, size = 8 GiB (8589930496 bytes) Am I supposed to worry about this? If it only means some Mb of swap won't be usable, that's fine. But if it means I may have memory corruption because swapping won't work properly, then, obviously, I'd like to know how to fix it!
Jay (171 rep)
May 19, 2016, 11:53 AM • Last activity: Jan 16, 2019, 10:05 AM
3 votes
1 answers
5897 views
Extending RAID0 with `mdadm --create --assume-clean`?
I had a 1-disk RAID0 array that I created with a view of adding more disks to it eventually, that was working normally. I created it with (approximately): $ mdadm --create /dev/md0 --raid-devices=1 --level=0 /dev/sdb -f Then I added another disk to it with: $ mdadm --grow /dev/md0 --add /dev/sdc --r...
I had a 1-disk RAID0 array that I created with a view of adding more disks to it eventually, that was working normally. I created it with (approximately): $ mdadm --create /dev/md0 --raid-devices=1 --level=0 /dev/sdb -f Then I added another disk to it with: $ mdadm --grow /dev/md0 --add /dev/sdc --raid-devices=2 and, as per manual, mdadm converted the array to RAID4 and started re-syncing. The manual says that the array will be converted back to RAID0 later. However, /etc/mdstat says it will take 2-3 days for a full re-sync, and I'm wondering whether it is possible instead to stop the array, kill the superblock on /dev/sdc, and do something like: $ mdadm --create --assume-clean --verbose /dev/md0 --chunk=512 \ --level=0 --raid-devices=2 /dev/sdb /dev/sdc instead of waiting for the useless RAID4 re-sync? Right now, the array state is: $ mdadm --detail /dev/md0 /dev/md0: Version : 1.2 Creation Time : XXXXXXXXXXXXXXXX Raid Level : raid4 Array Size : 11718754304 (11175.88 GiB 12000.00 GB) Used Dev Size : 11718754304 (11175.88 GiB 12000.00 GB) Raid Devices : 3 Total Devices : 2 Update Time : XXXXXXXXXXXXXXXX State : clean, FAILED, reshaping Active Devices : 1 Working Devices : 2 Failed Devices : 0 Spare Devices : 1 Chunk Size : 512K sistency Policy : resync Reshape Status : 2% complete Delta Devices : 1, (2->3) ... [root@centos7 ~]# mdadm --stop /dev/md0 [root@centos7 ~]# mdadm -E /dev/sdb /dev/sdb: Magic : a92b4efc Version : 1.2 Feature Map : 0x44 Array UUID : 5978222a:8f2c320c:c7059108:c3d6dc41 Name : centos7:0 (local to host centos7) Creation Time : Sat Apr 28 05:15:00 2018 Raid Level : raid4 Raid Devices : 3 Avail Dev Size : 23437508608 (11175.88 GiB 12000.00 GB) Array Size : 23437508608 (22351.75 GiB 24000.01 GB) Data Offset : 262144 sectors New Offset : 260096 sectors Super Offset : 8 sectors State : clean Device UUID : 9a75cd7e:bb469dab:2e0db890:69a68f54 Reshape pos'n : 620094464 (591.37 GiB 634.98 GB) Delta Devices : 1 (2->3) Update Time : Wed Aug 1 06:12:00 2018 Bad Block Log : 512 entries available at offset 8 sectors Checksum : d239a780 - correct Events : 608 Chunk Size : 512K Device Role : Active device 0 Array State : AA. ('A' == active, '.' == missing, 'R' == replacing) [root@centos7 ~]# mdadm -E /dev/sdc /dev/sdc: Magic : a92b4efc Version : 1.2 Feature Map : 0x46 Array UUID : 5978222a:8f2c320c:c7059108:c3d6dc41 Name : centos7:0 (local to host centos7) Creation Time : Sat Apr 28 05:15:00 2018 Raid Level : raid4 Raid Devices : 3 Avail Dev Size : 23437508608 (11175.88 GiB 12000.00 GB) Array Size : 23437508608 (22351.75 GiB 24000.01 GB) Data Offset : 262144 sectors New Offset : 260096 sectors Super Offset : 8 sectors Recovery Offset : 620094464 sectors State : clean Device UUID : ce6e93f9:729557dc:a1afc6a4:39b954f9 Reshape pos'n : 620094464 (591.37 GiB 634.98 GB) Delta Devices : 1 (2->3) Update Time : Wed Aug 1 06:12:00 2018 Bad Block Log : 512 entries available at offset 264 sectors Checksum : 5b8389b4 - correct Events : 608 Chunk Size : 512K Device Role : Active device 1 Array State : AA. ('A' == active, '.' == missing, 'R' == replacing)
Anton Tykhyy (133 rep)
Aug 1, 2018, 11:09 AM • Last activity: Aug 1, 2018, 11:57 AM
3 votes
1 answers
229 views
BTRFS has become unmanageable
I'm struggling with a btrfs RAID0 filesystem. It's expanded on 4 disks but i need to remove one of those disks. This is the current status of the filesystem: [root@osgiliath detlev]# btrfs fi show /mnt/Data/ Label: 'Data' uuid: 4c15fe81-ca58-4ac5-adf7-bdde245496f0 Total devices 4 FS bytes used 1.26T...
I'm struggling with a btrfs RAID0 filesystem. It's expanded on 4 disks but i need to remove one of those disks. This is the current status of the filesystem: [root@osgiliath detlev]# btrfs fi show /mnt/Data/ Label: 'Data' uuid: 4c15fe81-ca58-4ac5-adf7-bdde245496f0 Total devices 4 FS bytes used 1.26TiB devid 1 size 2.68TiB used 612.55GiB path /dev/sdc2 devid 2 size 74.53GiB used 74.52GiB path /dev/sda1 devid 3 size 931.51GiB used 606.55GiB path /dev/sdc1 devid 4 size 232.89GiB used 7.52GiB path /dev/sdb and df: [root@osgiliath detlev]# btrfs fi df /mnt/Data/ Data, RAID0: total=1.26TiB, used=1.26TiB System, RAID1: total=32.00MiB, used=112.00KiB Metadata, RAID1: total=3.00GiB, used=1.66GiB GlobalReserve, single: total=512.00MiB, used=143.50MiB I tried deleting /dev/sdc1 but it failed with No space left on device. I tried rebalancing (only metadata first then data also). It balanced some data but now, if I try to delete /dev/sdc1, it moves some (4G) data out of sdc1 to sdb then stops with "No space left on device". If I rebalance, it moves data back from sdb to sdc1. I tried removing sdb too but it just says No space left on device. I am not sure how I can remove that /dev/sdc1 (I know, there are 2 partitions on the same disk, this is due to a broken disk connector, i had to move it temporarily, this is why I want it removed) Any idea ?
Detlev Casanova (31 rep)
Jan 9, 2016, 10:06 AM • Last activity: May 6, 2018, 09:51 AM
-1 votes
1 answers
555 views
linux + tool that can identify RAID configuration
I am searching for a long time tool that can runs as CLI on linux machine and identify which RAID configuration is defined on the disk or disks ( according to the list from lsblk ) the reason for that we cant showdown ( Production machines ) the linux machine and look on the RAID controler when OS i...
I am searching for a long time tool that can runs as CLI on linux machine and identify which RAID configuration is defined on the disk or disks ( according to the list from lsblk ) the reason for that we cant showdown ( Production machines ) the linux machine and look on the RAID controler when OS id down I am just cant understand why it is so difficult to capture the RAID conf when OS is up , must be somewhere tool that identify the RAID configuration
yael (13936 rep)
Dec 9, 2017, 05:34 PM • Last activity: Dec 9, 2017, 05:55 PM
2 votes
1 answers
981 views
Is it possible to clone Linux software RAID 0 array with LVM on top to a single HDD?
I have 2 500GB HDD in 3 software RAID 0 arrays with LVM on top. Both disks are partitioned: -MBR partition table -256 MB Physical volume for RAID -4 GB Physical volume for RAID -remaining 496 GB Physical volume for RAID Is it possible to clone the array to a single 1TB HDD? I am aware of migration a...
I have 2 500GB HDD in 3 software RAID 0 arrays with LVM on top.

Both disks are partitioned:
-MBR partition table
-256 MB Physical volume for RAID
-4 GB Physical volume for RAID
-remaining 496 GB Physical volume for RAID

Is it possible to clone the array to a single 1TB HDD?

I am aware of migration and backup software like rsync, BackInTime, deja-dup, Aptik and similar. I am only interested in cloning.

If you need more information, please ask.
steeef (21 rep)
Nov 2, 2017, 06:38 AM • Last activity: Nov 2, 2017, 09:59 PM
Showing page 1 of 20 total questions