Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lvm und fsck in falscher Reihenfolge
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2926
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Sun Feb 10, 2013 9:22 pm    Post subject: lvm und fsck in falscher Reihenfolge Reply with quote

Hallo

Ich hab mich über LVM schlau gemacht und verwende nun 3 Partitionen zusammen mittels lvm für /home.

Ich hab es so erstellt:

Code:

pvcreate /dev/mapper/crypt-home-0[1-3]
vgcreate vg_home /dev/mapper/crypt-home-0[1-3]
lvcreate -l 100%FREE -n lvol_home vg_home

/dev/mapper/vg_home-lvol_home formatiert und backup draufgespielt


Das hat super funktioniert. Wenn ich aber boote, bekomme ich den Fehler, dass /dev/mapper/vg_home-lvol_home nicht vorhanden ist und fsck liefert einen Fehler. Kein Wunder, /etc/init.d/lvm startet ja nach /etc/init.d/fsck.

Beide Dienste sind im boot Runlevel.

Ich hab mir den Code angeschaut und dort steht:

Code:

# /etc/init.d/lvm

depend() {
    if [ -f /etc/init.d/sysfs ]; then
        # on baselayout-1 this causes
        # dependency-cycles with checkroot (before *)
        before checkfs fsck
        after modules device-mapper
    fi
    # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that
    # means dmeventd is NOT notified, as it cannot be safely running
    before dmeventd
}


Ich habe eine /etc/init.d/sysfs und sys-apps/baselayout-2.1-r1. Dennoch fsck startet davor (das habe ich bestätigt, indem ich in in start() von /etc/init.d/lvm ein "/bin/bash -l" hinzugefügt habe.

Ich habe es so gelöst, dass ich mir ein dummy rc-script geschrieben habe, welches hat

Code:

depend() {
        before fsck
}
start() {
    ebegin "Starting LVOL_HOME"
    lvchange -a y /dev/vg_home/lvol_home
    true
    eend $?
}


und ins boot Runlevel hinzugefügt. Das hat das Problem beseitigt. Dennoch finde ich die Lösung nicht elegant.

Ich hab ein bisschen rumgegoogelt und scheinbar bin ich nicht der einzige mit diesem Problem. Unter http://www.mentby.com/Group/gentoo-user/localmount-starts-before-lvm.html fand ich besonders dies hier:

Quote:

from Nilesh Govindrajan:

My current rc.conf has this:

rc_localmount_need="lvm"
rc_localmount_after="lvm"
rc_fsck_after="lvm"
rc_fsck_need="lvm"
rc_lvm_before="localmount"


Ist das empfehlenswert?

//edit: btw. was genau macht /etc/init.d/lvm-monitoring? Braucht man das?

//edit: Grammatik Korrektur, Hinweis von Josef.95
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Josef.95
Advocate
Advocate


Joined: 03 Sep 2007
Posts: 4520
Location: Germany

PostPosted: Mon Feb 11, 2013 1:03 pm    Post subject: Reply with quote

Hm, vermutlich wird ein initramfs benötigt welches das Laufwerk vor dem fsck read only mit einhängt. (Das ist aber nur blind geraten. Falls dem so ist, ist ein passendes initramfs vorhanden?)
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2926
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Tue Feb 12, 2013 5:40 pm    Post subject: Reply with quote

Ich habe kein initramfs. Ich kompilier die Treiber nicht als Modul und muss sie nicht vor /sbin/init laden.
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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