Skip to contentSkip to conversation

mdadm: hot add failed ... lun0/part6: No space left on device

DISCUSSION Sandro Dentella 2 participants 3 messages Jan 30, 2004 – Feb 3, 2004 MD RAID

lore
Share & tools
lore
#0 lore raw

Hi all,
while trying to substitute a failed disk, I'm using the command:

    # mdadm /dev/md1 --add /dev/ide/host0/bus1/target0/lun0/part6

but I get:

mdadm: hot add failed for /dev/ide/host0/bus1/target0/lun0/part6: No space left on device

What does it mean?

I don't know how to interpret it. I thought it was the partition that is not same dime as the other one (disks are different) but the partition I'm adding is bigger... as you can see further on.

I noticed that the 2 disks are not seen in the same way, as if the second is not in LBA mode:

	cat /proc/ide/hda/model
	MODEL: MAXTOR 6L040J2
	GEOMETRY:
	cat /proc/ide/hda/geometry
	physical     77557/16/63
	logical      4866/255/63

	cat /proc/ide/hdc/model
	MODEL: Maxtor 6E040L0
	GEOMETRY:
	cat /proc/ide/hdc/geometry
	physical     79656/16/63
	logical      79656/16/63

########### mdstat ##########################################################

    root@argo-cd root # cat /proc/mdstat 
    Personalities : [raid1] 
    read_ahead 1024 sectors
    md0 : active raid1 hdc1[1] ide/host0/bus0/target0/lun0/part1[0]
	  24000 blocks [2/2] [UU]

    md1 : active raid1 ide/host0/bus0/target0/lun0/part6[0]
	  2048192 blocks [2/1] [U_]

    md2 : active raid1 ide/host0/bus0/target0/lun0/part7[0]
	  36491520 blocks [2/1] [U_]

    unused devices: <none>

########### fdisk - parted ##################################################
And here are the partition tables of the disks:

root@argo-cd root # parted /dev/hda print
Disk geometry for /dev/ide/host0/bus0/target0/lun0/disc: 0.000-38172.750 megabytes Disk label type: msdos

Minor    Start       End     Type      Filesystem  Flags
1          0.031     23.532  primary   ext2        raid
2         23.533  38170.063  extended              lba
5         23.563    533.408  logical   linux-swap  
6        533.439   2533.688  logical   reiserfs    raid
7       2533.720  38170.063  logical   reiserfs    raid

root@argo-cd root # parted /dev/hdc print
Disk geometry for /dev/ide/host0/bus1/target0/lun0/disc: 0.000-39205.687 megabytes Disk label type: msdos

Minor    Start       End     Type      Filesystem  Flags
1          0.031     23.625  primary   ext2        raid
2         23.625  39205.687  extended              lba
5         23.656    533.531  logical               
6        533.562   2536.242  logical               raid
7       2536.273  39205.687  logical               raid

Thanks in advance
sandro
*:-)

Signature · 3 lines
Sandro Dentella  *:-)
e-mail: [email protected] 
http://www.tksql.org                    TkSQL Home page - My GPL work
#1 lore raw
Quoted 10 lines · On Friday January 30, [email protected] wrote:

Hi all,
while trying to substitute a failed disk, I'm using the command:

    # mdadm /dev/md1 --add /dev/ide/host0/bus1/target0/lun0/part6

but I get:

mdadm: hot add failed for /dev/ide/host0/bus1/target0/lun0/part6: No space left on device

What does it mean?

It means, as you guess lower down, that the partition you have provided appears to be too small to be used in the given array.

This error should cause a message to appear in the kernel logs something like

md1: disk size XXX blocks < array size YYY

You might finding it by
dmesg | grep 'disk size'

or looking in some file in /var/log (depending on which distribution you use. Debian puts it in /var/log/kern.log).

Quoted 4 lines

I don't know how to interpret it. I thought it was the partition that is not same dime as the other one (disks are different) but the partition I'm adding is bigger... as you can see further on.

Indeed I can: hda6 appears to be 2533.688 - 533.439 = 2000.249 Mb while hdc6 (the new one) is 2536.242 - 533.562 = 2002.680 Mb

My only guess is that the kernel hasn't found out about some recent change in partition size. What partition sizes are given in
cat /proc/partitions
??

NeilBrown

#2 lore raw
Quoted 11 lines · Neil Brown
Quoted 5 lines
    # mdadm /dev/md1 --add /dev/ide/host0/bus1/target0/lun0/part6

but I get:

mdadm: hot add failed for /dev/ide/host0/bus1/target0/lun0/part6: No space left on device

It means, as you guess lower down, that the partition you have provided appears to be too small to be used in the given array.

This error should cause a message to appear in the kernel logs something like

Quoted 7 lines

md1: disk size XXX blocks < array size YYY

You might finding it by
dmesg | grep 'disk size'

or looking in some file in /var/log (depending on which distribution you use. Debian puts it in /var/log/kern.log).

It's a pity the system was running on a rescue CD so when I had to reboot (the client really needed to have it up soon) I lost the messages. I can tell that I bypassed the problem swapping the position of the two HD (hda and hdc). At that point both where seen in LBA mode and the partition could be added... I that any usefull to help understand? Is there anything I could/should have been done to avoid this behaviour?

Why hdc is so often seen not in LBA mode (BIOS set up correctly) until you force it w/ fdisk while hda is always right?

Thanks for your help

sandro
*:-)

Signature · 3 lines
Sandro Dentella  *:-)
e-mail: [email protected] 
http://www.tksql.org                    TkSQL Home page - My GPL work