linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* adding multipath device without reboot?
@ 2006-05-30 13:59 Herta Van den Eynde
  2006-05-30 15:42 ` Francois Barre
  2006-05-30 17:33 ` Luca Berra
  0 siblings, 2 replies; 5+ messages in thread
From: Herta Van den Eynde @ 2006-05-30 13:59 UTC (permalink / raw)
  To: linux-raid

I'm trying to add a new SAN LUN to a system, create a multipath mdadm 
device on it, partition it, and create a new filesystem on it, all 
without taking the system down.

All goes well, up to partitioning the md device:

   # fdisk /dev/md12
   Device contains neither a valid DOS partition table, nor Sun, SGI
   or OSF disklabel
   Building a new DOS disklabel. Changes will remain in memory only,
   until you decide to write them. After that, of course, the
   previous content won't be recoverable.

   The number of cylinders for this disk is set to 8569312.
   There is nothing wrong with that, but this is larger than 1024,
   and could in certain setups cause problems with:
   1) software that runs at boot time (e.g., old versions of LILO)
   2) booting and partitioning software from other OSs
      (e.g., DOS FDISK, OS/2 FDISK)
   Warning: invalid flag 0x0000 of partition table 4 will be
   corrected by w(rite)

   Command (m for help): p

   Disk /dev/md12: 35.0 GB, 35099901952 bytes
   2 heads, 4 sectors/track, 8569312 cylinders
   Units = cylinders of 8 * 512 = 4096 bytes

        Device Boot      Start         End      Blocks   Id  System

   Command (m for help): n
   Command action
      e   extended
      p   primary partition (1-4)
   p
   Partition number (1-4): 1
   First cylinder (1-8569312, default 1):
   Using default value 1
   Last cylinder or +size or +sizeM or +sizeK (1-8569312, default
   8569312):
   Using default value 8569312

   Command (m for help): w
   The partition table has been altered!

   Calling ioctl() to re-read partition table.

   WARNING: Re-reading the partition table failed with error 22:
   Invalid argument.
   The kernel still uses the old table.
   The new table will be used at the next reboot.
   Syncing disks.

I know a reboot will read the new table, but is there any way to clear 
the in-memory table and replace it with the newly written one?
The entire point of this exercise is to be able to add diskspace without 
having to reboot.

Kind regards,

Herta

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: adding multipath device without reboot?
  2006-05-30 13:59 adding multipath device without reboot? Herta Van den Eynde
@ 2006-05-30 15:42 ` Francois Barre
  2006-05-30 17:36   ` Luca Berra
  2006-05-30 17:33 ` Luca Berra
  1 sibling, 1 reply; 5+ messages in thread
From: Francois Barre @ 2006-05-30 15:42 UTC (permalink / raw)
  To: Herta Van den Eynde; +Cc: linux-raid

Guess hdparm -z /dev/md12 would do the trick, if you're lucky enough...

2006/5/30, Herta Van den Eynde <herta.vandeneynde@cc.kuleuven.be>:
> I'm trying to add a new SAN LUN to a system, create a multipath mdadm
> device on it, partition it, and create a new filesystem on it, all
> without taking the system down.
>
> All goes well, up to partitioning the md device:
>
>    # fdisk /dev/md12
>    Device contains neither a valid DOS partition table, nor Sun, SGI
>    or OSF disklabel
>    Building a new DOS disklabel. Changes will remain in memory only,
>    until you decide to write them. After that, of course, the
>    previous content won't be recoverable.
>
>    The number of cylinders for this disk is set to 8569312.
>    There is nothing wrong with that, but this is larger than 1024,
>    and could in certain setups cause problems with:
>    1) software that runs at boot time (e.g., old versions of LILO)
>    2) booting and partitioning software from other OSs
>       (e.g., DOS FDISK, OS/2 FDISK)
>    Warning: invalid flag 0x0000 of partition table 4 will be
>    corrected by w(rite)
>
>    Command (m for help): p
>
>    Disk /dev/md12: 35.0 GB, 35099901952 bytes
>    2 heads, 4 sectors/track, 8569312 cylinders
>    Units = cylinders of 8 * 512 = 4096 bytes
>
>         Device Boot      Start         End      Blocks   Id  System
>
>    Command (m for help): n
>    Command action
>       e   extended
>       p   primary partition (1-4)
>    p
>    Partition number (1-4): 1
>    First cylinder (1-8569312, default 1):
>    Using default value 1
>    Last cylinder or +size or +sizeM or +sizeK (1-8569312, default
>    8569312):
>    Using default value 8569312
>
>    Command (m for help): w
>    The partition table has been altered!
>
>    Calling ioctl() to re-read partition table.
>
>    WARNING: Re-reading the partition table failed with error 22:
>    Invalid argument.
>    The kernel still uses the old table.
>    The new table will be used at the next reboot.
>    Syncing disks.
>
> I know a reboot will read the new table, but is there any way to clear
> the in-memory table and replace it with the newly written one?
> The entire point of this exercise is to be able to add diskspace without
> having to reboot.
>
> Kind regards,
>
> Herta
>
> Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: adding multipath device without reboot?
  2006-05-30 13:59 adding multipath device without reboot? Herta Van den Eynde
  2006-05-30 15:42 ` Francois Barre
@ 2006-05-30 17:33 ` Luca Berra
  1 sibling, 0 replies; 5+ messages in thread
From: Luca Berra @ 2006-05-30 17:33 UTC (permalink / raw)
  To: linux-raid

On Tue, May 30, 2006 at 03:59:33PM +0200, Herta Van den Eynde wrote:
>I'm trying to add a new SAN LUN to a system, create a multipath mdadm 
>device on it, partition it, and create a new filesystem on it, all 
>without taking the system down.
>
>All goes well, up to partitioning the md device:
>
>   # fdisk /dev/md12
wait!
you cannot partition an md device.
if you need you have to use an mdp device,
but do you?
if you just want to create a single filesystem, as you do below, use the
md device directly.

Regards,
L.

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: adding multipath device without reboot?
  2006-05-30 15:42 ` Francois Barre
@ 2006-05-30 17:36   ` Luca Berra
  2006-05-30 17:59     ` Francois Barre
  0 siblings, 1 reply; 5+ messages in thread
From: Luca Berra @ 2006-05-30 17:36 UTC (permalink / raw)
  To: linux-raid

On Tue, May 30, 2006 at 05:42:07PM +0200, Francois Barre wrote:
>Guess hdparm -z /dev/md12 would do the trick, if you're lucky enough...
please avoid 
top posting
quoting full emails
give advice if you are not sure

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: adding multipath device without reboot?
  2006-05-30 17:36   ` Luca Berra
@ 2006-05-30 17:59     ` Francois Barre
  0 siblings, 0 replies; 5+ messages in thread
From: Francois Barre @ 2006-05-30 17:59 UTC (permalink / raw)
  To: linux-raid

2006/5/30, Luca Berra <bluca@comedia.it>:
> >Guess hdparm -z /dev/md12 would do the trick, if you're lucky enough...
> please avoid
> top posting
> quoting full emails
> give advice if you are not sure

Sorry for my ugly-looking short answer...
I shall say for my own defense (if the President of the Court admits
me to talk... yes ?... ok...) that... i've got no excuse.
I didn't even think that hdparm'ing a partition would not work.
Well, at the, end, my answer is not so wrong : you must be very very
lucky for this stupid command to merely do something...

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-05-30 17:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-30 13:59 adding multipath device without reboot? Herta Van den Eynde
2006-05-30 15:42 ` Francois Barre
2006-05-30 17:36   ` Luca Berra
2006-05-30 17:59     ` Francois Barre
2006-05-30 17:33 ` Luca Berra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).