Forcing a disk rescan after %pre

Paul Malinowski pmalinowskieu at yahoo.co.uk
Thu Oct 2 08:04:29 UTC 2008


Try to use partprobe to re-read available disks/partitions. I'm not sure is it available when %pre script runs, but anaconda does that somehow during the partitioning section so I guess it's possible. In the worst case scenario I would add reboot at the end of creation of raid config in the %pre script - so that it would reboot if change in config occured. I know that its rather a nasty hack, not a proper solution, but please keep in mind that anaconda has some limits.

 
Good luck!

Paul Malinowski





----- Original Message ----
From: John Summerfield <debian at herakles.homelinux.org>
To: Discussion list about Kickstart <kickstart-list at redhat.com>
Sent: Thursday, 2 October, 2008 2:22:48
Subject: Re: Forcing a disk rescan after %pre

Dag Wieers wrote:
> Hi,
> 
> We are integrating some pre-install scripts. One of the things we have 
> now is that in the %pre phase the HW RAID controller is tested for 
> "Virtual disks" and if none are found it will create a RAID config 
> depending on the number of disks found.
> 
> The problem is that even when we created the RAID, restarted the RAID 
> driver and created the device node (fdisk -l shows the new disk). 
> Anaconda does not know about the new disk, likely because the scan for 
> disks happened before.
> 
> I found a file /tmp/scsidisks and also rewrite that file, but still 
> Anaconda does not update its view of the system after the %pre.
> 
> Does someone know how we can make Anaconda understand that we created a 
> disk in the %pre ?

I'm a little puzzled. Years ago (RHL 7.x I think) I used to initialise 
disks in %pre with various incantations of dd and fdisk (one can pipe 
commands into fdisk). That worked fine, and I'm pretty sure I created 
new partitions. fdisk forces partition tables to be reread.

Of course, it's possible anaconda has been broken since then:-)




-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

You cannot reply off-list:-)

_______________________________________________
Kickstart-list mailing list
Kickstart-list at redhat.com
https://www.redhat.com/mailman/listinfo/kickstart-list



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/kickstart-list/attachments/20081002/5ac6b852/attachment.htm>


More information about the Kickstart-list mailing list