lilo/raid?
hi
still - sorry if this is OT - I'm just too close to tear my hair or head off or something
The documentation everywhere, including the lilo 22.3.1 sample conf ffile tells me "use boot = /dev/md0", but lilo, when run, just tells me
Fatal: Filesystem would be destroyed by LILO boot sector: /dev/md0
Please help
roy
Signature · 4 lines
Roy Sigurd Karlsbakk, Datavaktmester Computers are like air conditioners. They stop working when you open Windows.
Quoted 7 lines · Roy Sigurd Karlsbakk
still - sorry if this is OT - I'm just too close to tear my hair or head off or something
The documentation everywhere, including the lilo 22.3.1 sample conf ffile tells me "use boot =
/dev/md0", but lilo, when run, just tells meFatal: Filesystem would be destroyed by LILO boot sector:
/dev/md0
I saw something like that when someone had made a raid device by hand and used hda and hdb instead of hda1 and hdb1.
Signature · 3 lines
bill davidsen <[email protected]> CTO, TMR Associates, Inc Doing interesting things with little computers since 1979.
Quoted 11 lines · Bill Davidsen
Quoted 7 lines · Roy Sigurd Karlsbakk
still - sorry if this is OT - I'm just too close to tear my hair or head off or something
The documentation everywhere, including the lilo 22.3.1 sample conf ffile tells me "use boot =
/dev/md0", but lilo, when run, just tells meFatal: Filesystem would be destroyed by LILO boot sector:
/dev/md0I saw something like that when someone had made a raid device by hand and used hda and hdb instead of hda1 and hdb1.
problem is: lilo does not seem to install at all with hd[ab]1 given. only hdm(!!!), and then it just goes LI
See dmesg log at http://karlsbakk.net/bugs/ for more info
thanks for all help
roy
Signature · 4 lines
Roy Sigurd Karlsbakk, Datavaktmester Computers are like air conditioners. They stop working when you open Windows.
Quoted 10 lines · Roy Sigurd Karlsbakk
Quoted 9 lines · Bill Davidsen
Quoted 7 lines · Roy Sigurd Karlsbakk
still - sorry if this is OT - I'm just too close to tear my hair or head off or something
The documentation everywhere, including the lilo 22.3.1 sample conf ffile tells me "use boot =
/dev/md0", but lilo, when run, just tells meFatal: Filesystem would be destroyed by LILO boot sector:
/dev/md0
Quoted 7 lines
Quoted 2 lines
I saw something like that when someone had made a raid device by hand and used hda and hdb instead of hda1 and hdb1.
problem is: lilo does not seem to install at all with hd[ab]1 given. only hdm(!!!), and then it just goes LI
See dmesg log at http://karlsbakk.net/bugs/ for more info
No, what I had in mind was that in the raid definition, instead of a partition such as /dev/hda1, the physical driver was given, like /dev/hda. That gave the message you mention. In any case you seem to have identified the problem, so this is probably not relevant.
Signature · 3 lines
bill davidsen <[email protected]> CTO, TMR Associates, Inc Doing interesting things with little computers since 1979.
Quoted 9 lines · Roy Sigurd Karlsbakk
still - sorry if this is OT - I'm just too close to tear my hair or head off or something
The documentation everywhere, including the lilo 22.3.1 sample conf ffile tells me "use boot =
/dev/md0", but lilo, when run, just tells meFatal: Filesystem would be destroyed by LILO boot sector:
/dev/md0Please help
But (i) why don't you ask the maintainer of LILO,
(ii) why don't you read the source?
If I grep for "Filesystem would be destroyed" in the LILO sources I find it in lilo-22.3.1/bsect.c:
ireloc = part_nowrite(boot_dev);
if (ireloc>1) {
die("Filesystem would be destroyed by LILO boot sector: %s", boot_dev);
}So, some routine part_nowrite() returned a value larger than 1. This routine lives in partition.c and does
int part_nowrite(char* device)
{
int fd;
BOOT_SECTOR bs;
int ret=0; /* say ok, unless we recognize a problem partition */
if ((fd = open(device, O_RDONLY)) < 0) pdie("part_nowrite check:");
if (read(fd, bs.sector, sizeof(bs)) != SECTOR_SIZE) pdie("part_nowrite: rea\d:");
/* check for XFS */
if (!strncmp("XFSB", bs.sector, 4)) ret=2;/* check for NTFS */
else if ( !strncmp("NTFS", bs.par_d.system, 4)
|| strstr(bs.sector,"NTLDR") ) ret=2;
/* check for SWAP -- last check, as 'bs' is overwritten */
else if (*(long*)bs.sector == 0xFFFFFFFEUL) {
if (lseek(fd, (PAGE_SIZE)-SECTOR_SIZE, SEEK_SET) != (PAGE_SIZE)-SECTOR_\
SIZE)
pdie("part_nowrite lseek:");
if (SECTOR_SIZE != read(fd, bs.sector, sizeof(bs)) ) pdie("part_nowrite\
swap check:");
if (!strncmp(bs.sector+SECTOR_SIZE-10,"SWAPSPACE2",10)
|| !strncmp(bs.sector+SECTOR_SIZE-10,"SWAP-SPACE",10) ) ret=2;
}/* check for override (-F) command line flag */
if (ret==2 && force_fs) {
fprintf(errstd, "WARNING: '-F' override used. Filesystem on %s may be\
destroyed.\n", device);
ret=0;
}
return ret;
}So, it looks like (1) you can use the -F flag and lilo will go ahead anyway,
(2) lilo thinks it recognizes XFS or NTFS or swap space on the boot sector of your device.
It must be easy for you to investigate what you have in reality, and determine whether there is any potential problem.
Andries
Quoted 3 lines
So, it looks like (1) you can use the -F flag and lilo will go ahead anyway, (2) lilo thinks it recognizes XFS or NTFS or swap space on the boot sector of your device.
Thanks
I added some debug output in part_nowrite(), and - you're right - it thinks it's NTFS. More info below
fstab:
LABEL=/ / ext3 defaults 1 1 /dev/md2 /tmp ext3 defaults 1 2 /dev/md3 /var jfs defaults 1 2 /dev/md4 /data jfs defaults 1 2 /dev/md1 swap swap defaults 0 0 none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/proc/partitions:
9 0 4096448 md0 0 0 0 0 0 0 0 0 0 0 0 9 1 2048128 md1 0 0 0 0 0 0 0 0 0 0 0 9 2 2048192 md2 0 0 0 0 0 0 0 0 0 0 0 9 3 40958720 md3 0 0 0 0 0 0 0 0 0 0 0 9 4 1631383040 md4 0 0 0 0 0 0 0 0 0 0 0 89 0 120627360 hdo 52 144 632 400 524 106 4368 130 -2 534050 41882082 89 1 4095976 hdo1 40 35 360 230 517 6 4136 80 0 260 310 89 2 116531352 hdo2 11 106 264 160 7 100 232 50 0 110 210 89 64 120627360 hdp 7 3 56 100 2 0 16 0 -2 534050 41881682 89 65 4095976 hdp1 3 0 24 40 1 0 8 0 0 40 40 89 66 116531352 hdp2 3 0 24 50 1 0 8 0 0 50 50 88 0 120627360 hdm 23 10 192 230 259 0 2072 80 -2 534060 41881822 88 1 4096543 hdm1 16 0 128 160 257 0 2056 80 0 220 240 88 2 116527477 hdm2 6 7 56 60 2 0 16 0 0 60 60 88 64 120627360 hdn 22 10 184 140 13 0 104 10 -2 534070 41881682 88 65 4096543 hdn1 18 7 152 110 12 0 96 10 0 120 120 88 66 116527477 hdn2 3 0 24 30 1 0 8 0 0 30 30 57 0 120627360 hdk 44 53 488 400 342 29 2824 180 -2 534070 41882072 57 1 4095976 hdk1 36 31 392 330 341 29 2816 180 0 420 510 57 2 116531352 hdk2 7 19 88 60 1 0 8 0 0 60 60 57 64 120627360 hdl 25 159 488 260 177 155 1696 110 -2 534040 41881862 57 65 4095976 hdl1 19 62 264 170 174 61 1496 90 0 240 260 57 66 116531352 hdl2 5 94 216 90 3 94 200 20 0 80 110 56 0 120627360 hdi 32 14 296 240 129 12 1080 70 -2 534080 41881772 56 1 4095976 hdi1 28 11 264 200 128 12 1072 70 0 240 270 56 2 116531352 hdi2 3 0 24 40 1 0 8 0 0 40 40 56 64 120627360 hdj 39 68 424 270 324 62 2704 230 -2 534030 41881972 56 65 4095976 hdj1 32 62 368 210 323 62 2696 230 0 350 440 56 66 116531352 hdj2 6 3 48 50 1 0 8 0 0 50 50 34 0 120627360 hdg 37 7 328 360 392 2 3152 130 -2 534110 41881922 34 1 4095976 hdg1 32 4 288 300 390 2 3136 130 0 350 430 34 2 116531352 hdg2 4 0 32 60 2 0 16 0 0 60 60 34 64 120627360 hdh 26 5 224 260 330 2 2656 160 -2 534060 41881872 34 65 4095976 hdh1 22 2 192 190 329 2 2648 160 0 300 350 34 66 116531352 hdh2 3 0 24 60 1 0 8 0 0 60 60 33 0 120627360 hde 36 33 312 400 15 7 128 30 -2 534130 41881842 33 1 4095976 hde1 32 30 280 350 14 7 120 30 0 140 380 33 2 116531352 hde2 3 0 24 40 1 0 8 0 0 40 40 33 64 120627360 hdf 39 11 376 350 863 5 6944 480 -2 534090 41882252 33 65 4095976 hdf1 35 8 344 280 862 5 6936 480 0 630 760 33 66 116531352 hdf2 3 0 24 60 1 0 8 0 0 60 60 22 0 120627360 hdc 20 12 154 100 20 27 360 10 -2 534140 41881502 22 1 2048224 hdc1 4 0 32 0 1 0 8 0 0 0 0 22 2 2048256 hdc2 12 9 90 50 18 27 344 10 0 60 60 22 3 116530848 hdc3 3 0 24 50 1 0 8 0 0 50 50 22 64 120627360 hdd 22 68 264 150 20 27 360 10 -2 534140 41881552 22 65 2048224 hdd1 5 0 40 20 1 0 8 0 0 20 20 22 66 2048256 hdd2 13 65 192 70 18 27 344 10 0 80 80 22 67 116530848 hdd3 3 0 24 50 1 0 8 0 0 50 50
3 0 120627360 hda 972 1726 21338 3630 502 1142 13192 1210 -2 533970
41886202
3 1 4096543 hda1 953 1694 21170 3540 497 1136 13152 1210 0 3550 4750
3 2 116527477 hda2 18 29 160 90 5 6 40 0 0 90 90
3 64 120627360 hdb 844 1990 22648 3410 498 1136 13160 2740 -2 533950
41887522
3 65 4096543 hdb1 840 1987 22616 3350 497 1136 13152 2740 0 3340 6090
3 66 116527477 hdb2 3 0 24 50 1 0 8 0 0 50 50
Signature · 4 lines
Roy Sigurd Karlsbakk, Datavaktmester Computers are like air conditioners. They stop working when you open Windows.
Quoted 5 lines · Roy Sigurd Karlsbakk
LABEL=/ / ext3 defaults 1 1 /dev/md2 /tmp ext3 defaults 1 2 /dev/md3 /var jfs defaults 1 2 /dev/md4 /data jfs defaults 1 2 /dev/md1 swap swap defaults 0 0
One small thing, you do know that you can interleave swap?
Regards,
Zwane
Signature · 1 line
http://function.linuxpower.ca
Quoted 10 lines · Zwane Mwaikambo
Quoted 5 lines · Roy Sigurd Karlsbakk
LABEL=/ / ext3 defaults 1 1 /dev/md2 /tmp ext3 defaults 1 2 /dev/md3 /var jfs defaults 1 2 /dev/md4 /data jfs defaults 1 2 /dev/md1 swap swap defaults 0 0One small thing, you do know that you can interleave swap?
There are sometimes reasons not to do that. Heavy swapping may be caused by attempts to cache massive io on some fs. You better not have swap on that heavily accessed spindle - because then everything ends up waiting on that io.
Keeping swap somewhere else means other programs just wait a little for swap - undisturbed by the massive io also going on.
Helge Hafting
Quoted 10 lines · Helge Hafting
Quoted 3 lines
Quoted 1 line
/dev/md1swap swap defaults 0 0One small thing, you do know that you can interleave swap?
There are sometimes reasons not to do that. Heavy swapping may be caused by attempts to cache massive io on some fs. You better not have swap on that heavily accessed spindle - because then everything ends up waiting on that io.
Quoted 3 lines
Keeping swap somewhere else means other programs just wait a little for swap - undisturbed by the massive io also going on.
True, but what i meant was that instead of creating a RAID device to swap to, he could have just interleaved normal swap partitions and gotten the same effect.
Regards,
Zwane Mwaikambo
Signature · 1 line
http://function.linuxpower.ca
Quoted 12 lines · Zwane Mwaikambo
Quoted 10 lines · Helge Hafting
Quoted 3 lines
Quoted 1 line
/dev/md1swap swap defaults 0 0One small thing, you do know that you can interleave swap?
There are sometimes reasons not to do that. Heavy swapping may be caused by attempts to cache massive io on some fs. You better not have swap on that heavily accessed spindle - because then everything ends up waiting on that io.
Quoted 7 lines
Quoted 3 lines
Keeping swap somewhere else means other programs just wait a little for swap - undisturbed by the massive io also going on.
True, but what i meant was that instead of creating a RAID device to swap to, he could have just interleaved normal swap partitions and gotten the same effect.
Not a config i would recommend. While spreading swap over multiple spindles that way is good for speed it multiplies the likelihood that a disk failure will down the system. If you think a dead filesystem is a mess, just watch what happens when swap goes dead.
Much better to put swap on several RAID-1 volumes if you want to spread it around. Disks just aren't that expensive anymore. RAID-5 though would be a bad move since swap gets an order of magnitude more writes than reads. On account of the heavy write tendencies i lean toward so-called hardware RAID for swap in order to offload the PCI buss.
Signature · 5 lines
________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: [email protected] Remember Cernan and Schmitt
Quoted 12 lines · Zwane Mwaikambo
Quoted 10 lines · Helge Hafting
Quoted 3 lines
Quoted 1 line
/dev/md1swap swap defaults 0 0One small thing, you do know that you can interleave swap?
There are sometimes reasons not to do that. Heavy swapping may be caused by attempts to cache massive io on some fs. You better not have swap on that heavily accessed spindle - because then everything ends up waiting on that io.
Quoted 7 lines
Quoted 3 lines
Keeping swap somewhere else means other programs just wait a little for swap - undisturbed by the massive io also going on.
True, but what i meant was that instead of creating a RAID device to swap to, he could have just interleaved normal swap partitions and gotten the same effect.
If it is a RAID-1 device, there are very good reasons for creating a RAID device for the swapping :)
But other than that, you are right. There is no reason for creating a RAID-0 device for swapping.
Signature · 6 lines
................................................................ : [email protected] : And I see the elder races, : :.........................: putrid forms of man : : Jakob Østergaard : See him rise and claim the earth, : : OZ9ABN : his downfall is at hand. : :.........................:............{Konkhra}...............:
Quoted 9 lines · Helge Hafting
Quoted 8 lines · Zwane Mwaikambo
Quoted 6 lines · Roy Sigurd Karlsbakk
LABEL=/ / ext3 defaults
1 1/dev/md2/tmp ext3 defaults
1 2/dev/md3/var jfs
defaults 1 2/dev/md4/data jfs
defaults 1 2/dev/md1swap
swap defaults 0 0
Quoted 5 lines
Quoted 1 line
One small thing, you do know that you can interleave swap?
There are sometimes reasons not to do that.
Heavy swapping may be caused by attempts to cache
massive io on some fs.
<snip/>
I've seen it. 1GB of swap for caching heavy downloads (se earlier thread 'VM fsckup' or somehting)
What is the reason of using swap for cache buffers?????
roy
Signature · 4 lines
Roy Sigurd Karlsbakk, Datavaktmester Computers are like air conditioners. They stop working when you open Windows.
Quoted 4 lines · Roy Sigurd Karlsbakk
I've seen it. 1GB of swap for caching heavy downloads (se earlier thread 'VM fsckup' or somehting)
What is the reason of using swap for cache buffers?????
To be precise - swap is never used _for_ cache buffers - you'll never see file contents in the swap partition, perhaps with the exception of tmpfs stuff.
But aggressive caching may indeed push other stuff into swap, typically little-used program memory.
The balance is probably off, but the feature is a good one. The point is to minimize disk waiting by ensuring that often-used stuff is in memory, possibly pushing seldom-used stuff into swap.
Some workload results in some files being accessed a lot, such as the homepage files for a webserver. Caching them makes sense then, even if some little-used sleeping program is pushed into swap. It is used less than those often-used files, so recovering it from swap when it eventually is needed results in less total waiting than what you get if every web server access hits the disk.
The balance being off have several explanations:
1. People don't _expect_ to wait for paging activity, while they expect having to wait for the disk.
2. Selecting wich pages to keep and which to swap (or not cache if it is a data file) is hard.
The reverse mapping VM will limit the unnecessary swapping, making the best decision is sometimes impossible without it, or at least much harder.
3. The problem is still hard, even with rmap. That's because we don't know how files and executables will be used in the future. All we have to make the decision is statistics about previous use.
Allowing applications to give the kernel hints may help, but giving good hints may be hard, and the potential for abuse is there. (App gives unrealistic hints - and seems more snappy than the competition. And lots of other processes suffer.) This is avoidable by only allowing negative hints, i.e. "Don't bother caching this"
You probably agree that it makes sense to swap out program initialization code that won't be used again once the program is up and running. The problem is that the VM system can't identify such code other than by the fact that it is a long time since the last use.
Helge Hafting
Quoted 8 lines
Quoted 1 line
What is the reason of using swap for cache buffers?????
To be precise - swap is never used _for_ cache buffers - you'll never see file contents in the swap partition, perhaps with the exception of tmpfs stuff.
But aggressive caching may indeed push other stuff into swap, typically little-used program memory.
ok.
tell me, then
When having an http-server-of-choice (tried several), I start downloading 10-50 files at 4Mbps. After some time, the server OOMs. The only processes running are syslog, nfs daemons (idle) and the web server. This happens without swap or with swap (1gig swap - fills up, and the server dies).
My last thread about it was "[BUG] 2.4 VM sucks. Again". After a rather experimental patch my akpm, the problem was solved.
<snip>
roy
Signature · 4 lines
Roy Sigurd Karlsbakk, Datavaktmester Computers are like air conditioners. They stop working when you open Windows.
Quoted 9 lines · Zwane Mwaikambo
Quoted 6 lines · Roy Sigurd Karlsbakk
LABEL=/ / ext3 defaults 1
1/dev/md2/tmp ext3 defaults
1 2/dev/md3/var jfs defaults
1 2/dev/md4/data jfs defaults
1 2/dev/md1swap swap defaults
0 0One small thing, you do know that you can interleave swap?
What does that mean?
Signature · 4 lines
Roy Sigurd Karlsbakk, Datavaktmester Computers are like air conditioners. They stop working when you open Windows.
Quoted 4 lines · Roy Sigurd Karlsbakk
hi
still - sorry if this is OT - I'm just too close to tear my hair or head off or something
Quoted 10 lines
The documentation everywhere, including the lilo 22.3.1 sample conf ffile tells me "use boot =
/dev/md0", but lilo, when run, just tells meFatal: Filesystem would be destroyed by LILO boot sector:
/dev/md0Please help
roy
Hi Roy,
I have some machines running root on raid but I always have
boot=/dev/hda and a second copy of lilo.con with boot pointing to /dev/hdb or whatever drive it was.
What is really importat for you anyway is to be able to boot again if one of the disk is failing. The raid will ensure you to keep the root but I always keep a boot floppy for emergencies. Not all the BIOS supports a boot from /dev/hdb (I used hda/b just as an example...).
At end if you loose a disk you will be always able to change it and boot again to rebuilt it.
Fabio
Quoted 2 lines
What is really importat for you anyway is to be able to boot again if one of the disk is failing.
My main concern now is to be able to boot the bloody server from something apart from a floppy!
Signature · 4 lines
Roy Sigurd Karlsbakk, Datavaktmester Computers are like air conditioners. They stop working when you open Windows.