Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Raid md1 not mounted on boot to /home
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Rocky007
n00b
n00b


Joined: 22 Dec 2014
Posts: 66

PostPosted: Thu Jan 25, 2018 2:56 pm    Post subject: Raid md1 not mounted on boot to /home Reply with quote

Hello,

my RAID 5 on /dev/md1 ist not being mounted on boot to /home.

Hope you can help me to get it work

Here are my configs:

/etc/mdadm.conf
Code:

ARRAY /dev/md/0  metadata=1.2 UUID=52bbcc5e:c4d26969:d29c8b0e:a4e7dfc0 name=livecd:0
ARRAY /dev/md/1  metadata=1.2 UUID=378d4275:5e0c92ae:ef168c20:f800f43e name=livecd:1


blkid
Code:

/dev/sda1: UUID="52bbcc5e-c4d2-6969-d29c-8b0ea4e7dfc0" UUID_SUB="9ec7e1c2-7caf-b13a-163f-043796671519" LABEL="livecd:0" TYPE="linux_raid_member" PARTUUID="bbec3038-01"
/dev/sdb1: UUID="52bbcc5e-c4d2-6969-d29c-8b0ea4e7dfc0" UUID_SUB="000a6105-cd94-f989-d711-fd9a75e623e6" LABEL="livecd:0" TYPE="linux_raid_member" PARTUUID="d20da20e-01"
/dev/sdc1: UUID="378d4275-5e0c-92ae-ef16-8c20f800f43e" UUID_SUB="140d42f6-3cd6-7a0a-562a-b42392df63eb" LABEL="livecd:1" TYPE="linux_raid_member" PARTUUID="d0b06538-01"
/dev/sdd1: UUID="378d4275-5e0c-92ae-ef16-8c20f800f43e" UUID_SUB="11006513-6f38-9fb7-70b6-280e99f5dca6" LABEL="livecd:1" TYPE="linux_raid_member" PARTUUID="6abe4fcd-01"
/dev/sde1: UUID="378d4275-5e0c-92ae-ef16-8c20f800f43e" UUID_SUB="fd4b51f8-3dab-f099-00fe-bdb22acb5400" LABEL="livecd:1" TYPE="linux_raid_member" PARTUUID="d8d7092d-01"
/dev/sdf1: UUID="378d4275-5e0c-92ae-ef16-8c20f800f43e" UUID_SUB="3dac15f7-2566-9007-45da-6a092ed64825" LABEL="livecd:1" TYPE="linux_raid_member" PARTUUID="e5bda283-01"
/dev/sdg1: UUID="378d4275-5e0c-92ae-ef16-8c20f800f43e" UUID_SUB="db2ed280-7136-e90b-a675-25ec09098920" LABEL="livecd:1" TYPE="linux_raid_member" PARTUUID="7de85fbe-01"
/dev/md0: UUID="7ef6b580-592e-4842-aa74-5a01c570d0c0" TYPE="ext4"
/dev/md1: UUID="3e57e6c8-a720-4a8c-a64c-dc8f1594258d" TYPE="ext4"


cat /proc/mdstat
Code:

Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md1 : active raid5 sdc1[0] sdg1[5] sdf1[3] sde1[2] sdd1[1]
      3906521088 blocks super 1.2 level 5, 512k chunk, algorithm 2 [5/5] [UUUUU]
      bitmap: 0/8 pages [0KB], 65536KB chunk

md0 : active raid1 sda1[0] sdb1[1]
      244066432 blocks super 1.2 [2/2] [UU]
      bitmap: 1/2 pages [4KB], 65536KB chunk

unused devices: <none>


ls /dev/md
Code:

0  1


dmesg | grep md1
Code:

[    4.916273] md: md1 stopped.
[    4.918045] md/raid:md1: device sdc1 operational as raid disk 0
[    4.918045] md/raid:md1: device sdg1 operational as raid disk 4
[    4.918046] md/raid:md1: device sdf1 operational as raid disk 3
[    4.918047] md/raid:md1: device sde1 operational as raid disk 2
[    4.918047] md/raid:md1: device sdd1 operational as raid disk 1
[    4.918259] md/raid:md1: allocated 5418kB
[    4.918276] md/raid:md1: raid level 5 active with 5 out of 5 devices, algorithm 2
[    4.918350] created bitmap (8 pages) for device md1
[    4.918497] md1: bitmap initialized from disk: read 1 pages, set 0 of 14903 bits
[    4.952668] md1: detected capacity change from 0 to 4000277594112


cat /etc/fstab
Code:

# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>
/dev/md0                /               ext4
/dev/md1                /home           ext4
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jan 25, 2018 3:43 pm    Post subject: Reply with quote

Rocky007,

Is the raid set up before localmount runs?

How/when do you run mdadm to start the raid sets?
As you use
Code:
metadata=1.2
it is not kernel raid autoassembly so your choices are in the initrd, if you have one, or mdadm, which is in the ??? runlevel.
Both ways work.

localmount is in the boot runlevel.
_________________
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
Rocky007
n00b
n00b


Joined: 22 Dec 2014
Posts: 66

PostPosted: Thu Jan 25, 2018 6:52 pm    Post subject: Reply with quote

Mdraid is in runlevel boot.

Also md0 which is my raid 1 on the system where /boot etc is is being mounted correctly
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jan 25, 2018 7:50 pm    Post subject: Reply with quote

Rocky007,

Put your entire dmesg onto a pastebin site please.

I'm not exactly sure what I'm looking for because it sounds like it should be all OK but its not.

Where is your root filesystem ?
_________________
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
Rocky007
n00b
n00b


Joined: 22 Dec 2014
Posts: 66

PostPosted: Thu Jan 25, 2018 9:02 pm    Post subject: Reply with quote

My root file system is on a RAID 1 (/dev/sda1 and /dev/sdb1 as /dev/md0).

df -h
Code:

Dateisystem    Größe Benutzt Verf. Verw% Eingehängt auf
udev             10M    8,0K   10M    1% /dev
/dev/md0        229G     20G  197G   10% /
tmpfs           1,6G    1,4M  1,6G    1% /run
shm             7,9G       0  7,9G    0% /dev/shm
cgroup_root      10M       0   10M    0% /sys/fs/cgroup


Find the dmesg here: https://pastebin.com/KJ8hkFrg
(last line in dmesg after manual mount of /dev/md1 to /home; mount /dev/md1 /home)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Thu Jan 25, 2018 9:23 pm    Post subject: Reply with quote

Rocky007,

Both your raid sets are stared before root is mounted, so its done in the initrd.
Code:
[    4.949631] md0: detected capacity change from 0 to 249924026368
[    4.969659] md1: detected capacity change from 0 to 4000277594112
[    5.336048] EXT4-fs (md0): mounted filesystem with ordered data mode. Opts: (null)

Therefore md1 is available in plenty of time for the localmount service

There is no error associated with
Code:
 [  139.057634] EXT4-fs (md1): mounted filesystem with ordered data mode. Opts: (null)
either, so everything looks to be in order.

Code:
# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>
/dev/md0                /               ext4
/dev/md1                /home           ext4
Thats odd, No <opts> or <dump/pass> settinigs.
Code:
man fstab
says that <dump/pass> both default to zero, so that's harmless.

It doesn't give defaults for <opts> you could try defaults,noatime there.
The root filesystem is a bit special its mounted from the kernel command line, not /etc/fstab.

Code:
[    6.848167] EXT4-fs (md0): re-mounted. Opts: (null)
Is root read/write even?
_________________
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
Rocky007
n00b
n00b


Joined: 22 Dec 2014
Posts: 66

PostPosted: Thu Jan 25, 2018 9:28 pm    Post subject: Reply with quote

i've changed the fstab to the following:

Code:

# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>
/dev/md0                /               ext4            defaults,noatime        0 1
/dev/md1                /home           ext4            defaults,noatime        0 2


With the added opts and dump/pass its mounted now

Root is read/write after boot yes
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
Page 1 of 1

 
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