[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Where are disks without partition table?



On 03/22/2012 02:35 PM, David Lehman wrote:
> On Thu, 2012-03-22 at 11:31 +0100, Jan Safranek wrote:
>> Hi,
>>
>> let's assume someone plugs in a disk without any partition table, like this:
>> dd if=/dev/zero of=/dev/sda bs=1K count=1
>>
>> Devicetree then does not see the disk:
>>
>> disk = storage.devicetree.getDeviceByName('sda')
>> print disk
>> 'None'
>>
>> Where is the disk 'hidden'? Don't tell me I have to use lsblk to find it
>> manually, I expect anaconda knows at least something about it - in GUI
>> it asks 'do you want to intialize the drive?'. I want either to create a
>> partition table on it (how?) or to put it directly into
>> RAID/LVM/whatever (i.e. assign a pyanaconda.storage.format to it?)
> 
> You should familiarize yourself with some log files:
> 
>   /tmp/storage.log contains a great deal of logging from the
>   storage module.

17:03:53,421 INFO storage: scanning sda
(/devices/pci0000:00/0000:00:07.0/host2/target2:0:0/2:0:0:0/block/sda)...
17:03:53,431 DEBUG storage: DeviceTree.getDeviceByName: name: sda ;
17:03:53,449 DEBUG storage: DeviceTree.getDeviceByName returned None
17:03:53,462 DEBUG storage: DeviceTree.addUdevDiskDevice: name: sda ;
17:03:53,474 INFO storage: sda is a disk
17:03:53,475 DEBUG storage: getFormat('None') returning DeviceFormat
instance
17:03:53,490 DEBUG storage: DiskDevice._setFormat: sda ; current: None ;
type: None ;
17:03:53,490 INFO storage: added disk sda (id 3) to device tree
17:03:53,491 DEBUG storage: looking up parted Device: /dev/sda
17:03:53,562 DEBUG storage: DeviceTree.handleUdevDeviceFormat: name: sda ;
17:03:53,576 DEBUG storage: DeviceTree.handleUdevDiskLabelFormat:
device: sda ; label_type: None ;
17:03:53,583 DEBUG storage: getFormat('None') returning DeviceFormat
instance
17:03:53,602 DEBUG storage: DiskDevice.setup: sda ; status: True ;
controllable: True ; orig: False ;
17:03:53,629 DEBUG storage: DiskLabel.__init__: device: /dev/sda ;
labelType: gpt ; exists: True ;
17:03:53,631 INFO storage: removed disk sda (id 3) from device tree
17:03:53,631 DEBUG storage: lvm filter: adding sda to the reject list
17:03:53,633 DEBUG storage: device 'sda' in ignoredDisks

hmmm... how to get the ingoreDisks? DeviceTree._ignoredDisks looks too
private to me. And how to create a partition table on it?

How does anaconda GUI detect that it should 'initialize the drive'?

Jan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]