[clug] partition tables in memory
Andrew Pollock
andrew-clug at andrew.net.au
Mon Apr 25 00:38:54 GMT 2005
On Sat, Apr 16, 2005 at 05:02:42PM +1000, Kim Holburn wrote:
> Just to make this clear,
>
> The normal method of making swap is AFAIK :
> 1) make a partition,
> 2) run say:
> mkswap /dev/sda8
> 3) then:
> swapon /dev/sda8.
>
> But in this case the kernel cannot see the partition:
> # l /dev/sda[78]
> brw-rw---- 1 root disk 8, 7 Mar 15 2002 /dev/sda7
> brw-rw---- 1 root disk 8, 8 Mar 15 2002 /dev/sda8
> # cat /proc/partitions
> major minor #blocks name rio rmerge rsect ruse wio wmerge wsect
> wuse running use aveq
>
> 8 0 35545728 sda 688792 1156813 14762148 7980560 13470841
> 37027503 404260530 43342130 1 7507370 51338980
> 8 1 979933 sda1 112258 395055 4058776 542960 59256 312356
> 3012928 1375120 0 443990 1923240
> 8 2 1 sda2 0 0 0 0 0 0 0 0 0 0 0
> 8 5 4883728 sda5 382733 622455 8041500 6313750 10902982
> 16989694 223279552 30965690 1 5792500 37274880
> 8 6 2931831 sda6 154552 52632 1657500 360210 843641 4091059
> 39488440 2485030 0 946790 2845000
> 8 7 979933 sda7 39198 86298 1003524 763420 1664957 15634399
> 138479640 8516260 0 543100 9294370
> # fdisk -l /dev/sda
>
> Disk /dev/sda: 255 heads, 63 sectors, 4425 cylinders
> Units = cylinders of 16065 * 512 bytes
>
> Device Boot Start End Blocks Id System
> /dev/sda1 1 122 979933+ 82 Linux swap
> /dev/sda2 123 1704 12707415 5 Extended
> /dev/sda5 123 730 4883728+ 83 Linux
> /dev/sda6 731 1095 2931831 83 Linux
> /dev/sda7 1096 1217 979933+ 83 Linux
> /dev/sda8 1218 1704 3911796 82 Linux swap
>
> So when I do mkswap:
>
> # mkswap /dev/sda8
> /dev/sda8: No such device or address
>
> So my question: without rebooting how do I get the kernel to reread the
> partition. Need I mention this is the boot disk so I can't unmount it.
>
This is why God invented LVM...
regards
Andrew
More information about the linux
mailing list