Im laufenden System XEN DomU neue Platte einbinden

Christian Euler chris at deepvoid.de
Tue Jun 3 20:17:18 CEST 2008


Hmm. Sehr seltsam das ganze.

Also einen scsihost brauchst Du dafür eigentlich nicht, das macht Xen über 
seinen eigenen Blocktreiber.

Ich hab das bei mir grad nochmal ausprobiert, klappt einwandfrei.

Dom0:

xenserv ~ # xm create vm/gentoo-rescue
Using config file "/etc/xen/vm/gentoo-rescue".
Started domain gentoo-rescue

xenserv ~ # dd if=/dev/zero of=/tmp/testdisk bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 0.221154 s, 474 MB/s
xenserv ~ # xm block-attach gentoo-rescue file:/tmp/testdisk sda w

DomU:

gentoo-rescue ~ # dmesg
[...]

[21463.897536] blkfront: sda: barriers enabled
[21463.897723]  sda: unknown partition table

Da ist die Platte.. Danach kann ich dann ganz normal Partitionen anlegen usw.

Wie gesagt, bei Gentoo und SuSE funktioniert das out-of-the-box. Kann sein, 
daß das bei Debian mal wieder anders ist ;-)

Gruß,
Chris


Am Dienstag, 3. Juni 2008 14:34:43 schrieb Pierre Bernhardt:
> Christian Euler schrieb:
> > Ich glaub, jetzt weiß ich was los ist ;)
> >
> > Du versuchst da, die Platte als sda3 (also als zusätzliche Partition zu
> > einem bestehenden Blockdevice) in die DomU einzubinden.. Das funktioniert
> > AFAIK so nicht.
>
> Das verstehe ich schon. S.u.
>
> > Versuch mal, die Platte als eigenständiges Laufwerk (z.B. sdb)
> > einzuhängen.
>
> Hatte ich versucht, der Kernel der DomU merkt es dennoch nicht.
>
> Interressanter weise findet er in meiner Test DomU nicht mal einen
> scsihost:
>
> root at testhost:~# df -k
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/sda1              1032088    446476    533184  46% /
> tmpfs                    32840         0     32840   0% /lib/init/rw
> udev                     10240        44     10196   1% /dev
> /dev/sda3             10321208   1866320   7930600  20% /home
> /dev/sdb               4588298   4588298         0 100%
> /data/mediastore/etch_4.0_1 /dev/sdc               4571754   4571754       
>  0 100% /data/mediastore/etch_4.0_2 /dev/sdd               4463888  
> 4463888         0 100% /data/mediastore/etch_4.0_3 /dev/sde                
>  9814      9814         0 100%
> /data/mediastore/my-repository
> root at testhost:~# scsiadd -s
> scsiadd:scsiadd(): could not open /proc/scsi/scsi (w): No such file or
> directory ** snip 14 weitere Zeilen wie die obere
> root at testhost:~# scsidev -v
> scsidev 2.36 2005-08-16
> Building device list using /proc/scsi/scsi
> 0 real SCSI devices found, 0 high level devs attached
> /etc/scsi.alias: No such file or directory
>
> Das es trotzdem funktioniert sieht man ja daran, das ich es einfach
> benutzen kann.
>
> In der dmesg ist auch nicht wirklich hilfreich etwas entsprechendes
> vorhanden:
>
> root at testhost:~# dmesg|grep -i scsi
> root at testhost:~# dmesg|grep -i sd
> Kernel command line:  root=/dev/sda1 ro
>   sdb: unknown partition table
>   sdc: unknown partition table
>   sdd: unknown partition table
>   sde: unknown partition table
> Adding 1048568k swap on /dev/sda2.  Priority:-1 extents:1 across:1048568k
> EXT3 FS on sda1, internal journal
> EXT3 FS on sda3, internal journal
>
> Und zu guter letzt noch mal einen log der geladenen Module:
> root at testhost:~# lsmod
> Module                  Size  Used by
> sg                     32060  0
> ch                     15368  0
> st                     35324  0
> osst                   48128  0
> sr_mod                 16644  0
> cdrom                  33312  1 sr_mod
> sd_mod                 19808  0
> scsi_mod              125160  6 sg,ch,st,osst,sr_mod,sd_mod
> ipv6                  229088  12
> nls_iso8859_1           5024  4
> isofs                  33308  4
> udf                    73924  0
> 8250                   28164  0
> serial_core            20288  1 8250
> ext3                  120072  2
> jbd                    53224  1 ext3
> mbcache                 9124  1 ext3
> dm_mirror              20048  0
> dm_snapshot            16320  0
> dm_mod                 51000  2 dm_mirror,dm_snapshot
> raid1                  21984  0
> md_mod                 71316  1 raid1
> processor              29608  0
>
> MfG...
> Pierre Bernhardt


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lug-owl.de/pipermail/linux/attachments/20080603/4ae9994e/attachment.sig>


More information about the Linux mailing list