Creating partition devices after creating a partition on a harddisk?
I added a partition to a harddisk yesterday, but after I exited fdisk I couldn't mkfs on it, because the device node didn't exist, /dev/hda7 to be exact. After manually creating it with mknod, I still couldn't mkfs. So I removed the manually created node and rebooted and then I had the node and could mkfs.
But what does one do to accomplish the same thing without rebooting?
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 8 lines · Anssi Saari
I added a partition to a harddisk yesterday, but after I exited fdisk I couldn't mkfs on it, because the device node didn't exist,
/dev/hda7to be exact. After manually creating it with mknod, I still couldn't mkfs. So I removed the manually created node and rebooted and then I had the node and could mkfs.But what does one do to accomplish the same thing without rebooting?
You should be able to do 'bockdev --rereadpt /dev/hda' to force kernel to reread partition table. I would expect that fdisk (or whatever is used to repartition) does the equivalent IOCTL automatically.
blockdev is part of util-linux
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFD/Z1mR6LMutpd94wRAqjdAJ9npurMfxg2UxA2oGYpx60dcdIqVACdFRmY 6IkyVQeFt4QRwZYQRNj0Wgo=JM7m
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Re: Creating partition devices after creating a partition on a
In reply to Anssi SaariQuoted 3 lines · Andrey Borzenkov
You should be able to do 'bockdev --rereadpt
/dev/hda' to force kernel to reread partition table. I would expect that fdisk (or whatever is used to repartition) does the equivalent IOCTL automatically.
I'm pretty sure this wont work on IDE unless someone fixed the IDE code in kernel recently. Is this the case?
David
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 7 lines · David Zeuthen
Quoted 3 lines · Andrey Borzenkov
You should be able to do 'bockdev --rereadpt
/dev/hda' to force kernel to reread partition table. I would expect that fdisk (or whatever is used to repartition) does the equivalent IOCTL automatically.I'm pretty sure this wont work on IDE unless someone fixed the IDE code in kernel recently. Is this the case?
Unfortunately I went and used up all the space on my new disk, so I can't easily test this right now. Maybe if I dig up the old disk and plug it in. This is a laptop, so that's harder than with a desktop...
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 8 lines · David Zeuthen
Quoted 3 lines · Andrey Borzenkov
You should be able to do 'bockdev --rereadpt
/dev/hda' to force kernel to reread partition table. I would expect that fdisk (or whatever is used to repartition) does the equivalent IOCTL automatically.I'm pretty sure this wont work on IDE unless someone fixed the IDE code in kernel recently. Is this the case?
Well, it fails if some partition is mounted or otherwise busy, but this is not IDE specific. What makes IDE so different?
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
iD8DBQFEA0ZAR6LMutpd94wRAq5IAKCouLLqln/ONDDaxGfBeHuck0E1CgCeMjC0 Fy7ahI9u3U3LrMeCYEnrKoI=lLc2
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel