Does anyone know of a way to successfully run an "hdparm -i" on a SATA device under a DomU? I''ve exposed the device using the block-device phy mapping but hdparm/sdparm/smartctl can seem to access the disk at a low enough level to poll the drive. Basically need to pull the S/N off the drive, but haven''t yet been able to achieve this under a DomU. Works fine on the Dom0 of course. Any help is greatly appreciated. 2 things I should mention... 1) The dom0 is installed on a Linux MD RAID1 array consisting of /dev/sda and /dev/sdb 2) When booting the DomU I get the following... * Letting udev process events ...scsi_id[2010]: scsi_id: unable to access parent device of ''/block/sdb'' scsi_id[2012]: scsi_id: unable to access parent device of ''/block/sda'' scsi_id[2043]: scsi_id: unable to access parent device of ''/block/sdb'' scsi_id[2044]: scsi_id: unable to access parent device of ''/block/sda'' _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Takeshi HASEGAWA
2009-Apr-17 19:11 UTC
Re: [Xen-users] hdparm/sdparm/smartctl from the DomU
If you are mounting sda, sdb from domain-0, you know, it''s impossible to unbind. In this method, you need to prepare dedicated disk controller(s) for domain-U to try that. -- Takeshi HASEGAWA <hasegaw@gmail.com> 2009/4/18 Ryan Kennedy <rkennedy@availmedia.com>:> Yes, that is exactly how I have them configured. > I was afraid that the virtual block device driver wouldn''t allow me to > hdparm the device. > I did a PCI passthrough of the SATA controller''s PCI address. Is that > what you mean by "assign disk controllers to the DomU directly"? > It didn''t make any difference, although I did not unbind it from the > Dom0. Seeing as how Dom0''s sda/sdb drivers are using that controller I > don''t think I can unbind it without crashing the system. :-) > Is there some other method for presenting the disk controllers to the domU? > > Thanks. > > Takeshi HASEGAWA wrote: >> Configured like this? >> >> disk=[ "phy:/dev/sda,sda,w", "phy:/dev/sdb,sdb,w", ] >> >> If so, the /dev/sd[ab] in Domain-U are not SCSI devices, >> even though they''re named like "sdX." >> I guess your sd[abc] devices in domain-U should be shown below: >> >> [root@vm182 sdc]# ls -l /sys/block/sdc/ >> total 0 >> -r--r--r-- 1 root root 4096 Apr 18 03:22 dev >> lrwxrwxrwx 1 root root 0 Apr 18 03:22 device -> ../../devices/xen/vbd-2080 >> drwxr-xr-x 2 root root 0 Apr 18 03:22 holders >> drwxr-xr-x 3 root root 0 Apr 18 03:22 queue >> >> They''re actually xen''s virtual block devices, so It''s impossible to hdparm them. >> Maybe you need to do that from domain-0, or assign disk controllers >> to domain-U directly. >> >> >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I was afraid of that. I''m not directly mounting sda/sdb in the dom0, but they are members of a MD RAID1 that the dom0''s root fs is on so... yeah, I''m hosed. Is there any way to run a command on the dom0 from the domU? Other than say ssh''ing over the network. Really what would be ideal is if there is a way to just pass a command through to the dom0 from the domU. Is that even possible? Thanks again. --Ryan Takeshi HASEGAWA wrote:> If you are mounting sda, sdb from domain-0, you know, > it''s impossible to unbind. > > In this method, you need to prepare dedicated disk controller(s) > for domain-U to try that. > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Takeshi HASEGAWA
2009-Apr-17 19:44 UTC
Re: [Xen-users] hdparm/sdparm/smartctl from the DomU
I don''t know pratical way to do that, but Inter-domain communication using XenStore may be a nice idea. Perhaps you need to write scripts (or something) to realize. http://wiki.xensource.com/xenwiki/XenStore -- Takeshi HASEGAWA <hasegaw@gmail.com> 2009/4/18 Ryan Kennedy <rkennedy@availmedia.com>:> I was afraid of that. > I''m not directly mounting sda/sdb in the dom0, but they are members of a > MD RAID1 that the dom0''s root fs is on so... yeah, I''m hosed. > Is there any way to run a command on the dom0 from the domU? Other than > say ssh''ing over the network. Really what would be ideal is if there is > a way to just pass a command through to the dom0 from the domU. Is that > even possible? > Thanks again. > > --Ryan > > Takeshi HASEGAWA wrote: >> If you are mounting sda, sdb from domain-0, you know, >> it''s impossible to unbind. >> >> In this method, you need to prepare dedicated disk controller(s) >> for domain-U to try that. >> >> > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Apr 17, 2009 at 2:31 PM, Ryan Kennedy <rkennedy@availmedia.com> wrote:> I was afraid of that. > I''m not directly mounting sda/sdb in the dom0, but they are members of a > MD RAID1 that the dom0''s root fs is on so... yeah, I''m hosed. > Is there any way to run a command on the dom0 from the domU?why would you want to manage from DomU a hardware that is so many layers away from what DomU uses? hardware management is the role of Dom0, doing elsewhere is asking for trouble. like trying to send commands... ssh makes you jump through several hoops precisely because it would be such a wide security hole to do otherwise. -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Oh yes... I understand the concern completely. The only reason I want to do this is to pull the S/N from the sda hard drive for encryption purposes. Know of any way to do that from the DomU? Javier Guerra wrote: On Fri, Apr 17, 2009 at 2:31 PM, Ryan Kennedy wrote: I was afraid of that. I''m not directly mounting sda/sdb in the dom0, but they are members of a MD RAID1 that the dom0''s root fs is on so... yeah, I''m hosed. Is there any way to run a command on the dom0 from the domU? why would you want to manage from DomU a hardware that is so many layers away from what DomU uses? hardware management is the role of Dom0, doing elsewhere is asking for trouble. like trying to send commands... ssh makes you jump through several hoops precisely because it would be such a wide security hole to do otherwise. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
If it is for domU encrypted storage you would be better off using the domU''s GUID as the salt then the SN of dom0''s HD. -Ross On Apr 17, 2009, at 4:06 PM, Ryan Kennedy <rkennedy@availmedia.com> wrote:> Oh yes... I understand the concern completely. The only reason I > want to do this is to pull the S/N from the sda hard drive for > encryption purposes. Know of any way to do that from the DomU? > > Javier Guerra wrote: >> >> On Fri, Apr 17, 2009 at 2:31 PM, Ryan Kennedy <rkennedy@availmedia.com >> > wrote: >> >>> I was afraid of that. >>> I''m not directly mounting sda/sdb in the dom0, but they are >>> members of a >>> MD RAID1 that the dom0''s root fs is on so... yeah, I''m hosed. >>> Is there any way to run a command on the dom0 from the domU? >>> >> why would you want to manage from DomU a hardware that is so many >> layers away from what DomU uses? >> >> hardware management is the role of Dom0, doing elsewhere is asking >> for >> trouble. like trying to send commands... ssh makes you jump through >> several hoops precisely because it would be such a wide security hole >> to do otherwise. >> >> >> > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
How can I get the domU''s GUID? Ross Walker wrote: If it is for domU encrypted storage you would be better off using the domU''s GUID as the salt then the SN of dom0''s HD. -Ross On Apr 17, 2009, at 4:06 PM, Ryan Kennedy <rkennedy@availmedia.com> wrote: Oh yes... I understand the concern completely. The only reason I want to do this is to pull the S/N from the sda hard drive for encryption purposes. Know of any way to do that from the DomU? Javier Guerra wrote: On Fri, Apr 17, 2009 at 2:31 PM, Ryan Kennedy <rkennedy@availmedia.com> wrote: I was afraid of that. I''m not directly mounting sda/sdb in the dom0, but they are members of a MD RAID1 that the dom0''s root fs is on so... yeah, I''m hosed. Is there any way to run a command on the dom0 from the domU? layers away from what DomU uses? hardware management is the role of Dom0, doing elsewhere is asking for trouble. like trying to send commands... ssh makes you jump through several hoops precisely because it would be such a wide security hole to do otherwise. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users