PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Neue Partition ohne Reboot einbinden



OliverH
09.01.09, 09:22
Hallo,

ich habe soeben auf einem Rechner, den ich nicht mal eben rebooten kann, am Ende der Festplatte eine neue Partition angelegt und möchte diese nun formatieren. Leider ist das Device-File nicht da. Hat jemand eine Ahnung, wie ich das devicefile da hin bekomme, ohne den Rechner neu zu starten?

Gruß,

Oli

marce
09.01.09, 09:29
wir die Partition mit fdisk -l gefunden?

OliverH
09.01.09, 09:36
Ja, da steht die Partition drin.

marce
09.01.09, 09:38
dann solltest Du auch ein mkfs darauf absetzen können...

OliverH
09.01.09, 09:44
Hier mal die Ausgabe von fdisk -l


Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 32 257039+ fd Linux raid autodetect
/dev/sda2 33 849 6562552+ fd Linux raid autodetect
/dev/sda3 850 915 530145 fd Linux raid autodetect
/dev/sda4 916 19457 148938615 85 Linux extended
/dev/sda5 916 4832 31463302 fd Linux raid autodetect
/dev/sda6 4833 4898 530144+ fd Linux raid autodetect
/dev/sda7 4899 7509 20972857 fd Linux raid autodetect
/dev/sda8 7510 7575 530144+ fd Linux raid autodetect
/dev/sda9 7576 8881 10490444+ fd Linux raid autodetect
/dev/sda10 8882 8947 530144+ fd Linux raid autodetect
/dev/sda11 8948 14169 41945714+ fd Linux raid autodetect
/dev/sda12 14170 14235 530144+ fd Linux raid autodetect
/dev/sda13 14236 16059 14651248+ fd Linux raid autodetect
/dev/sda14 16060 16181 979933+ fd Linux raid autodetect

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 32 257039+ fd Linux raid autodetect
/dev/sdb2 33 849 6562552+ fd Linux raid autodetect
/dev/sdb3 850 915 530145 fd Linux raid autodetect
/dev/sdb4 916 19457 148938615 85 Linux extended
/dev/sdb5 916 4832 31463302 fd Linux raid autodetect
/dev/sdb6 4833 4898 530144+ fd Linux raid autodetect
/dev/sdb7 4899 7509 20972857 fd Linux raid autodetect
/dev/sdb8 7510 7575 530144+ fd Linux raid autodetect
/dev/sdb9 7576 8881 10490444+ fd Linux raid autodetect
/dev/sdb10 8882 8947 530144+ fd Linux raid autodetect
/dev/sdb11 8948 14169 41945714+ fd Linux raid autodetect
/dev/sdb12 14170 14235 530144+ fd Linux raid autodetect
/dev/sdb13 14236 16059 14651248+ fd Linux raid autodetect
/dev/sdb14 16060 16181 979933+ fd Linux raid autodetect

Disk /dev/md0: 263 MB, 263127040 bytes
2 heads, 4 sectors/track, 64240 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Device Boot Start End Blocks Id System

Disk /dev/md1: 6719 MB, 6719930368 bytes
2 heads, 4 sectors/track, 1640608 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md2: 542 MB, 542769152 bytes
2 heads, 4 sectors/track, 132512 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md3: 32.2 GB, 32218349568 bytes
2 heads, 4 sectors/track, 7865808 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md3 doesn't contain a valid partition table

Disk /dev/md4: 542 MB, 542769152 bytes
2 heads, 4 sectors/track, 132512 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md4 doesn't contain a valid partition table

Disk /dev/md5: 21.4 GB, 21476081664 bytes
2 heads, 4 sectors/track, 5243184 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md5 doesn't contain a valid partition table

Disk /dev/md6: 542 MB, 542769152 bytes
2 heads, 4 sectors/track, 132512 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md6 doesn't contain a valid partition table

Disk /dev/md7: 10.7 GB, 10742136832 bytes
2 heads, 4 sectors/track, 2622592 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md7 doesn't contain a valid partition table

Disk /dev/md8: 542 MB, 542769152 bytes
2 heads, 4 sectors/track, 132512 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md8 doesn't contain a valid partition table

Disk /dev/md9: 42.9 GB, 42952294400 bytes
2 heads, 4 sectors/track, 10486400 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md9 doesn't contain a valid partition table

Disk /dev/md10: 542 MB, 542769152 bytes
2 heads, 4 sectors/track, 132512 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md10 doesn't contain a valid partition table


Es geht um die Partitionen sda13 + 14 und sdb13 + 14. (Sollen nachher ein Raid bilden...)

Hier die ausgabe von ls -l /dev


vhost:/etc/xen# ls /dev
agpgart kmem loop6 md2 null ptyp4 ptype ram2 sda sda7 sdb4 stdout tty16 tty25 tty34 tty43 tty52 tty61 ttyp4 ttype usbdev4.1_ep00 vcs5 vcsa5
bus kmsg loop7 md3 port ptyp5 ptypf ram3 sda1 sda8 sdb5 tty tty17 tty26 tty35 tty44 tty53 tty62 ttyp5 ttypf usbdev4.1_ep81 vcs6 vcsa6
console log MAKEDEV md4 ppp ptyp6 ram0 ram4 sda10 sda9 sdb6 tty0 tty18 tty27 tty36 tty45 tty54 tty63 ttyp6 ttyS0 usbdev5.1_ep00 vcs7 vcsa7
core loop mapper md5 psaux ptyp7 ram1 ram5 sda11 sdb sdb7 tty1 tty19 tty28 tty37 tty46 tty55 tty7 ttyp7 urandom usbdev5.1_ep81 vcs8 vcsa8
disk loop0 md md6 ptmx ptyp8 ram10 ram6 sda12 sdb1 sdb8 tty10 tty2 tty29 tty38 tty47 tty56 tty8 ttyp8 usbdev1.1_ep00 vcs vcsa xconsole
fd loop1 md0 md7 pts ptyp9 ram11 ram7 sda2 sdb10 sdb9 tty11 tty20 tty3 tty39 tty48 tty57 tty9 ttyp9 usbdev1.1_ep81 vcs1 vcsa1 xen
full loop2 md1 md8 ptyp0 ptypa ram12 ram8 sda3 sdb11 shm tty12 tty21 tty30 tty4 tty49 tty58 ttyp0 ttypa usbdev2.1_ep00 vcs12 vcsa12 zero
hpet loop3 md10 md9 ptyp1 ptypb ram13 ram9 sda4 sdb12 sndstat tty13 tty22 tty31 tty40 tty5 tty59 ttyp1 ttypb usbdev2.1_ep81 vcs2 vcsa2
initctl loop4 md11 mem ptyp2 ptypc ram14 random sda5 sdb2 stderr tty14 tty23 tty32 tty41 tty50 tty6 ttyp2 ttypc usbdev3.1_ep00 vcs3 vcsa3
input loop5 md12 net ptyp3 ptypd ram15 rtc sda6 sdb3 stdin tty15 tty24 tty33 tty42 tty51 tty60 ttyp3 ttypd usbdev3.1_ep81 vcs4 vcsa4


Hier ein mkfs


vhost:/etc/xen# mkfs.ext3 /dev/sda13
mke2fs 1.40-WIP (14-Nov-2006)
Could not stat /dev/sda13 --- No such file or directory

The device apparently does not exist; did you specify it correctly?


Hier ein mdadm --create...


vhost:/etc/xen# mdadm --create /dev/md11 --level=1 --raid-devices=2 /dev/sda13 /dev/sdb13
mdadm: Cannot open /dev/sda13: No such file or directory
mdadm: Cannot open /dev/sdb13: No such file or directory
mdadm: create aborted


Gruß,

Oli

HirschHeisseIch
09.01.09, 09:48
Versuch mal, die Device-Nodes mit 'mknod' anzulegen.



mknod /dev/sda13 b 8 13
mknod /dev/sda14 b 8 14


Allerdings sollte das eigentlich udev für Dich erledigen...

OliverH
09.01.09, 09:59
Naja udev macht das anscheinend bei Festplatten nur bei einem Reboot.

Nachdem ich die device-nodes erstellt habe sind diese laut ls auch da:


vhost:/etc/xen# ls /dev
agpgart kmem loop6 md2 null ptyp4 ptype ram2 sda sda5 sdb2 stderr tty14 tty23 tty32 tty41 tty50 tty6 ttyp2 ttypc usbdev3.1_ep00 vcs3 vcsa3
bus kmsg loop7 md3 port ptyp5 ptypf ram3 sda1 sda6 sdb3 stdin tty15 tty24 tty33 tty42 tty51 tty60 ttyp3 ttypd usbdev3.1_ep81 vcs4 vcsa4
console log MAKEDEV md4 ppp ptyp6 ram0 ram4 sda10 sda7 sdb4 stdout tty16 tty25 tty34 tty43 tty52 tty61 ttyp4 ttype usbdev4.1_ep00 vcs5 vcsa5
core loop mapper md5 psaux ptyp7 ram1 ram5 sda11 sda8 sdb5 tty tty17 tty26 tty35 tty44 tty53 tty62 ttyp5 ttypf usbdev4.1_ep81 vcs6 vcsa6
disk loop0 md md6 ptmx ptyp8 ram10 ram6 sda12 sda9 sdb6 tty0 tty18 tty27 tty36 tty45 tty54 tty63 ttyp6 ttyS0 usbdev5.1_ep00 vcs7 vcsa7
fd loop1 md0 md7 pts ptyp9 ram11 ram7 sda13 sdb sdb7 tty1 tty19 tty28 tty37 tty46 tty55 tty7 ttyp7 urandom usbdev5.1_ep81 vcs8 vcsa8
full loop2 md1 md8 ptyp0 ptypa ram12 ram8 sda14 sdb1 sdb8 tty10 tty2 tty29 tty38 tty47 tty56 tty8 ttyp8 usbdev1.1_ep00 vcs vcsa xconsole
hpet loop3 md10 md9 ptyp1 ptypb ram13 ram9 sda2 sdb10 sdb9 tty11 tty20 tty3 tty39 tty48 tty57 tty9 ttyp9 usbdev1.1_ep81 vcs1 vcsa1 xen
initctl loop4 md11 mem ptyp2 ptypc ram14 random sda3 sdb11 shm tty12 tty21 tty30 tty4 tty49 tty58 ttyp0 ttypa usbdev2.1_ep00 vcs12 vcsa12 zero
input loop5 md12 net ptyp3 ptypd ram15 rtc sda4 sdb12 sndstat tty13 tty22 tty31 tty40 tty5 tty59 ttyp1 ttypb usbdev2.1_ep81 vcs2 vcsa2


Das Problem besteht aber weiterhin:


vhost:/etc/xen# mdadm --create /dev/md11 --level=1 --raid-devices=2 /dev/sda13 /dev/sdb13
mdadm: Cannot open /dev/sda13: No such device or address
mdadm: Cannot open /dev/sdb13: No such file or directory
mdadm: create aborted


Sieht so aus, als würde ich um den Reboot nicht herum kommen :(

Gruß,

Oli

OliverH
09.01.09, 10:03
Nachdem ich die anderen device files auch erstellt habe:


vhost:/etc/xen# mdadm --create /dev/md11 --level=1 --raid-devices=2 /dev/sda13 /dev/sdb13
mdadm: Cannot open /dev/sda13: No such device or address
mdadm: Cannot open /dev/sdb13: No such device or address
mdadm: create aborted


Hat noch wer eine Idee?

Gruß,

Oli

OliverH
09.01.09, 10:18
Mitlerweile habe ich die Maschine rebootet.
Danke an alle die versucht haben mir zu helfen.
Wenn jemand eine Lösung kennt, die ohne reboot auskommt, immer her damit :)

Gruß,

Oli

reni
09.01.09, 10:31
Wenn jemand eine Lösung kennt, die ohne reboot auskommt, immer her damit :)

Ganz ehrlich ... mir ist das noch nie passiert (oder wenigstens schon lange nicht mehr), dass ich nach dem Erstellen einer Partition erst den Rechner/Server rebooten muss, damit der Device-Knoten erstellt wird und ich auf die Partition zugreifen kann :rolleyes:

OliverH
09.01.09, 17:03
Ganz ehrlich ... mir ist das noch nie passiert (oder wenigstens schon lange nicht mehr), dass ich nach dem Erstellen einer Partition erst den Rechner/Server rebooten muss, damit der Device-Knoten erstellt wird und ich auf die Partition zugreifen kann :rolleyes:

Was willst du mir damit sagen?
Da es nach dem Reboot funktionierte, werde ich die Partitionen wohl korrekt angelegt haben :ugly:

towo2099
09.01.09, 17:15
blockdev --rereadpt /dev/sd{a,b}
hätte es auch getan.

OliverH
11.01.09, 00:14
blockdev --rereadpt /dev/sd{a,b}
hätte es auch getan.

Das wurde mir leider mit "device busy" quittiert. :ugly:
Die anderen Partitionen auf den Platten waren nämlich Teil von RAIDs.
Die konnte ich nicht einfach auflösen... :ugly: