Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
raid not starting up not consistant in boots [solved]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31342
Location: 56N 3W

PostPosted: Tue Apr 30, 2013 7:03 pm    Post subject: Reply with quote

DaggyStyle,

Busybox should have dropped you to a shell.
Can you use mdadm -a to start your raid sets?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4883

PostPosted: Wed May 01, 2013 6:14 am    Post subject: Reply with quote

NeddySeagoon wrote:
DaggyStyle,

Busybox should have dropped you to a shell.
Can you use mdadm -a to start your raid sets?


it dropped to shell.

in order to get the raids up, I'm copying mdadm.conf to the initramfs and run mdadm --assamble --scan.
the raids are up after than but I don't see the partitions in my raid5 (usr is one of them), if I skip the usr mount the system boots ok.

I'd still want to future proof the /usr mount.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31342
Location: 56N 3W

PostPosted: Wed May 01, 2013 8:58 pm    Post subject: Reply with quote

DaggyStyle,

You mean /dev/mdXpY, as in the md device is partitioned?
I've never done that. Its a fairly new feature, so I have always used LVM on raid to achieve the same thing.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4883

PostPosted: Thu May 02, 2013 6:00 am    Post subject: Reply with quote

NeddySeagoon wrote:
DaggyStyle,

You mean /dev/mdXpY, as in the md device is partitioned?
I've never done that. Its a fairly new feature, so I have always used LVM on raid to achieve the same thing.


yup, thats one, anyway, I don't have even labels for the lvm volumes or the non partitioned raids.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
Goverp
Guru
Guru


Joined: 07 Mar 2007
Posts: 325

PostPosted: Thu May 02, 2013 9:18 am    Post subject: Reply with quote

DaggyStyle wrote:
...
the raids are up after than but I don't see the partitions in my raid5 (usr is one of them), if I skip the usr mount the system boots ok.
....

I've used partitions in my RAID 5 array for a couple of years and hit the same situation when I set up my initramfs. Follow the mdadm --assemble--scan with mdadm --detail --scan and the components appear.

My guess is a partitioned RAID array is much cheaper to run than separate arrays for each partition. In my case, I left some space in the array unallocated for future expansion. By putting some partitions at the low end of the array and some at the high end, it's then possible to enlarge two partitions without affecting the others.
_________________
Greybeard
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4883

PostPosted: Thu May 02, 2013 10:21 am    Post subject: Reply with quote

Goverp wrote:
DaggyStyle wrote:
...
the raids are up after than but I don't see the partitions in my raid5 (usr is one of them), if I skip the usr mount the system boots ok.
....

I've used partitions in my RAID 5 array for a couple of years and hit the same situation when I set up my initramfs. Follow the mdadm --assemble--scan with mdadm --detail --scan and the components appear.

My guess is a partitioned RAID array is much cheaper to run than separate arrays for each partition. In my case, I left some space in the array unallocated for future expansion. By putting some partitions at the low end of the array and some at the high end, it's then possible to enlarge two partitions without affecting the others.


will do, hope it helps, still I'd like to have the ability to use labels rather than direct nods
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4883

PostPosted: Thu May 02, 2013 7:52 pm    Post subject: Reply with quote

mdadm --detail --scan did the trick and found the partitions within the raid, labels are still mia.

any ideas?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
Goverp
Guru
Guru


Joined: 07 Mar 2007
Posts: 325

PostPosted: Fri May 03, 2013 7:50 am    Post subject: Reply with quote

DaggyStyle wrote:
mdadm --detail --scan did the trick and found the partitions within the raid, labels are still mia.

any ideas?

Sorry, I'm being thick, but where are you expecting labels to show up?

FWIW, my initramfs init script uses findfs to convert labels into device names, using the same code as the various initramfs items in the wiki. But I guess that's not what you're after.
_________________
Greybeard
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4883

PostPosted: Mon May 06, 2013 5:46 am    Post subject: Reply with quote

ok, adding the following script to init solved the issue.
Code:

#!/bin/bash

mkdir -p /dev/disk/by-label
while read partition; do
   DEV="$(echo ${partition} | awk '{print $4}')"
   DEV_PATH="/dev/${DEV}"
   if [ -z "${DEV}" -o ! -e "${DEV_PATH}" ]; then
      continue
   fi
   LABEL=$(blkid ${DEV_PATH} | tr ' ' '\n' | grep "LABEL=" | cut -d= -f2 | sed 's/"//g')
   if [ ! -z "${LABEL}" ]; then
      ln -s ${DEV_PATH} /dev/disk/by-label/${LABEL}
   fi
done < "/proc/partitions"

and right before dev unmounts I run
Code:

rm -rf /dev/disk/by-label

_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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