[clug] partition tables in memory
David Collett
davico at tpg.com.au
Sat Apr 16 14:54:12 GMT 2005
Come to think of it I think that offset number is wrong, but you get the
idea...
Dave
On Sun, 2005-04-17 at 00:42 +1000, David Collett wrote:
> You could do something creative:
>
> losetup -o $((1218*16065*512)) /dev/loop0 /dev/sda
> mkswap /dev/loop0
> swapon /dev/loop0
>
> Then, add /dev/sda8 as swap in fstab anyway and next time you reboot, it
> will be used as normal...
>
> Dave
>
>
>
> On Sat, 2005-04-16 at 17:02 +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.
> >
> >
> > Kim
> >
> > On 2005 Apr 16, , at 2:36 PM, Kim Holburn wrote:
> >
> > > Hi,
> > >
> > > I have a linux server which needed more swap. I added a new swap
> > > partition wrote the new partition table but it doesn't show up in
> > > /proc/partitions so I can't mkswap etc.
> > > # mkswap /dev/sda8
> > > /dev/sda8: No such device or address
> > >
> > > Is there any way to get the kernel to reread the partition table or do
> > > I have to do the windows thing and reboot (and lose my uptime;-( )?
> > >
> > > Dell debian stable kernel 2.4.26 #1 SMP
> > >
> > > Kim
> > > --
> > > Kim Holburn
> > > Network Manager, National ICT Australia Ltd.
> > > Ph: +61 2 61258620 M: +61 417820641 F: +61 2 6230 6121 aim://kimholburn
> > > Email: kim.holburn at anu.edu.au - PGP Public Key on request
> > > callto://kholburn
> > > Cacert Root Cert: http://www.cacert.org/index.php?id=16 ->
> > > http://www.cacert.org/cacert.crt
> > > Aust. Spam Act: To stop receiving mail from me: reply and let me know.
> > >
> > > Use ISO 8601 dates [YYYY-MM-DD]
> > > http://www.saqqara.demon.co.uk/datefmt.htm
> > > Democracy imposed from without is the severest form of tyranny.
> > > -- Lloyd Biggle, Jr. Analog, Apr 1961
> > >
> > > --
> > > linux mailing list
> > > linux at lists.samba.org
> > > https://lists.samba.org/mailman/listinfo/linux
> > >
> > --
> > Kim Holburn
> > Network Manager, National ICT Australia Ltd.
> > Ph: +61 2 61258620 M: +61 417820641 F: +61 2 6230 6121 aim://kimholburn
> > Email: kim.holburn at anu.edu.au - PGP Public Key on request
> > callto://kholburn
> > Cacert Root Cert: http://www.cacert.org/index.php?id=16 ->
> > http://www.cacert.org/cacert.crt
> > Aust. Spam Act: To stop receiving mail from me: reply and let me know.
> >
> > Use ISO 8601 dates [YYYY-MM-DD]
> > http://www.saqqara.demon.co.uk/datefmt.htm
> > Democracy imposed from without is the severest form of tyranny.
> > -- Lloyd Biggle, Jr. Analog, Apr 1961
> >
>
More information about the linux
mailing list