After changing the BIOS partition table with fdisk, cfdisk of sfdisk, the re-read of the partition table by the kernel fails with error 16: Device or resource busy. A reboot is neccessary. I did not have any partition mounted, of course. Could this be related to EVMS somehow, ie. EVMS keeping the disk open? I have done some EVMS configs on the disk before. /dws
Afaik, this is a hardware limitation and is not related to Gentoo Linux per se. Will leave open for a bit to see if anyone has any comments on this.
hardware limitation??? I don't think so. I am 100% positive for the non-EVMS case that when I repartition a drive that currently has no open partitions, I do not have to reboot to activate the new table. There is a special IOTCL that is called by *fdisk: From the sfdisk man page: -R Only execute the BLKRRPART ioctl (to make the kernel re-read the partition table). This can be useful for checking in advance that the final BLKRRPART will be successful, and also when you changed the partition table `by hand' (e.g., using dd from a backup). If the kernel complains (`device busy for revalidation (usage = 2)') then something still uses the device, and you still have to unmount some file system, or say swapoff to some swap partition. dws@cray:pts/1 /cvs/linux-2.5-xfs/linux % grep BLKRRPART include/linux/fs.h #define BLKRRPART _IO(0x12,95) /* re-read partition table */ drivers/block/ioctl.c: case BLKRRPART: return blkdev_reread_part(bdev); static int blkdev_reread_part(struct block_device *bdev) { struct gendisk *disk = bdev->bd_disk; int res; if (disk->minors == 1 || bdev != bdev->bd_contains) return -EINVAL; if (!capable(CAP_SYS_ADMIN)) return -EACCES; if (down_trylock(&bdev->bd_sem)) return -EBUSY; res = rescan_partitions(disk, bdev); up(&bdev->bd_sem); return res; } /dws
OK :) I'll check with the evms guys.
Assigning to our friendly neighborhood EVMS developer :)
It happened to me too. I was installing Dell Latitude LS and repatitioning with cfdisk. First I've deleted all patitions and then created boot, swap and root partitions. I was not using EVMS. After exiting the cfdisk (no message about reboot required) I tried to create the filesystems. However before the repartitioning I had only hda1&2. Now the root was supposed to be hda3 but the mkreiserfs kept reporting some problem (don't remember what exactly - something about nonexistent device). After running some more sessions of fdisk/cfdisk I was somehow able to get going. Now I am emergin -u system...
Assigned to non-devs - reassigning so these may be noticed.
1.4 RC2? Is this even an issue on anything recent? Was it even an issue on 1.4 final? REOPEN if this is still a problem on the 2004.2 release.