View previous topic :: View next topic |
Author |
Message |
Frautoincnam Guru
Joined: 19 May 2017 Posts: 330
|
Posted: Wed Dec 18, 2024 9:38 pm Post subject: can't stop raid with liveusb [solved] |
|
|
Edit:
Problem solved with a much older USB key which does not create a ghost assembly and takes into account my partitions. But I remain very curious about the solutions you could have proposed. (The 2 USB keys are gentoo livecds)
Hello,
On a computer running Gentoo and working perfectly, I have a raid 1 that associates the partitions of my 2 disks one by one, and no lvm.
Its mdadm.conf is:
Code: | DEVICE /dev/sd[ab][123567]
ARRAY /dev/md123 metadata=0.90 UUID=f3a1266a:b8a3d1c0:58f2f8e7:254eabdb
ARRAY /dev/md122 metadata=0.90 UUID=b98a2770:1b208d6e:58f2f8e7:254eabdb
ARRAY /dev/md125 metadata=0.90 UUID=526e6df9:9f1fd15b:58f2f8e7:254eabdb
ARRAY /dev/md124 metadata=0.90 UUID=0627d9a2:9b8f1319:58f2f8e7:254eabdb
ARRAY /dev/md126 metadata=0.90 UUID=60e93244:ca06e195:58f2f8e7:254eabdb
ARRAY /dev/md127 metadata=0.90 UUID=87af9f2a:1ad04950:58f2f8e7:254eabdb |
Code: | And fstab:
/dev/md123 /boot ext2 noauto,noatime 1 2
/dev/md122 / ext4 noatime,acl,user_xattr 0 1
/dev/md125 none swap sw 0 0
/dev/md124 /tmp ext4 nodev,noexec 1 2
/dev/md126 /home ext4 noatime,acl,usrquota 1 2
/dev/md127 /var ext4 noatime,acl,user_xattr 1 2 |
Now I would like to move all the contents of all partitions to one (/dev/md122 can hold everything) and then expand it to all the available space.
So I booted on a liveusb and here is what I get at boot:
Code: | livecd ~ # cat /proc/mdstat
Personalities : [raid1]
md122 : inactive md127p3[0](S)
1970112 blocks
md123 : inactive md127p2[1](S)
20025280 blocks
md124 : inactive md127p1[1](S)
102336 blocks
md125 : inactive md127p6[0](S)
29974464 blocks
md126 : inactive md127p5[1](S)
3018688 blocks
md127 : active (auto-read-only) raid1 sdb[1] nda[0]
62125440 blocks [2/2] [UU]
unused devices: <none> |
Code: | livecd ~ # lsmod | grep raid
raid1 53248 1
livecd ~ # mdadm --examine --scan
ARRAY /dev/md127 UUID=87af9f2a:1ad04950:58f2f8e7:254eabdb
ARRAY /dev/md123 UUID=f3a1266a:b8a3d1c0:58f2f8e7:254eabdb
ARRAY /dev/md122 UUID=b98a2770:1b208d6e:58f2f8e7:254eabdb
ARRAY /dev/md125 UUID=526e6df9:9f1fd15b:58f2f8e7:254eabdb
ARRAY /dev/md124 UUID=0627d9a2:9b8f1319:58f2f8e7:254eabdb
ARRAY /dev/md126 UUID=60e93244:ca06e195:58f2f8e7:254eabdb
livecd ~ # mdadm --examine --scan >> /etc/mdadm.conf
livecd ~ # rc-service mdadm start
* Starting mdadm monitor ... [ ok ] |
I have the impression that /dev/md127 has assembled the whole 2 disks, right?
So, I can't assemble each of my partitions and do what I want to do.
The problem is that I am unable to stop it, even if I first kill all processes that have access to it:
Code: | livecd ~ # kill $(ps awfu | grep "^gentoo" | awk '{print $2}')
livecd ~ # lsof /dev/md127
lsof: WARNING: can't stat() fuse.portal file system /run/user/1000/doc
Output information may be incomplete.
livecd ~ # umount /dev/md127
umount: /dev/md127: not mounted.
livecd ~ # mdadm --stop /dev/md127
mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, mounted filesystem or active volume group? |
I don't know what to do.
Obviously, I don't want to destroy my raid or lose the contents of the disks. |
|
Back to top |
|
|
romariogland n00b
Joined: 22 Sep 2023 Posts: 4
|
Posted: Fri Dec 27, 2024 12:11 pm Post subject: |
|
|
Hola!
Same problem
Basically, if you install it all at once, everything goes well. If something goes wrong then when loading livecd with the arrays, this problem will arise, requiring a lot of extra body movements
I got out of this situation like this:
First, stop the first nodes wich members with *pX[Y] end:
Code: | mdadm --stop /dev/md125
mdadm --stop /dev/md126 |
Then stop the node made up of the previous nodes:
Code: | mdadm --stop /dev/md127 |
Then, as usual, create arrays from the necessary partitions Code: | mdadm --create /dev/md1 --level=1 --metadata=0.9 --raid-devices=2 /dev/sda1 /dev/sdb1 | and after rebuilding, work as usual
Code: | swapon /dev/md2
mount /dev/md3 /mnt/gentoo |
And indeed when using old image there is no such problem and the arrays run as expected
If anyone needs it, there is an install-amd64-minimal-20211101.iso (Google Drive link). But when loading with them it complains about the recalled UEFI bootloader |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|