Port-i386 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Disk Problems
Dear Community.
For some weeks my disk setup has consisted of two 2TB disk fully
allocated to NetBSD. I have created several slices of which most
are used in RAID1 configurations.
The other day I experienced a problem on the first partition(s)
(wd0a/wd1a) which are allocated to a RAID1 volume. Somehow I
had been able to allocate the raid volume too close to the
beginning of the disks, so some part of one or both mirrors were
in a disk write-protected zone.
The misplacement of the raid volume led to filesystem and
mirroring errors. The odd thing was that in the first days (or
weeks?) I did not see any errors from the raid volume. Anyway,
I solved the problem by moving the raid volume further away
from the start of the disks.
But then I discovered a new problem I have not been able to
solve. For some reason I am unable to update the fdisk settings
on disk wd1. I would like to change the settings, so they become
identical on the two disks.
The following example shows the problem:
List the settings of wd0
------------------------
root@asus:/root # fdisk /dev/rwd0d
Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 3876021, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 3907029168
BIOS disk geometry:
cylinders: 1024, heads: 63, sectors/track: 63 (3969 sectors/cylinder)
total sectors: 3907029168
Partitions aligned to 3969 sector boundaries, offset 63
Partition table:
0: NetBSD (sysid 169)
start 2048, size 3907027120 (1907728 MB, Cyls 0/32/33-984386/17/63), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector enabled, timeout 15 seconds.
First active partition: 0
root@asus:/root #
List the settings of wd1
------------------------
root@asus:/root # fdisk /dev/rwd1d
Disk: /dev/rwd1d
NetBSD disklabel disk geometry:
cylinders: 3876021, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 3907029168
BIOS disk geometry:
cylinders: 1024, heads: 18, sectors/track: 63 (1134 sectors/cylinder)
total sectors: 3907029168
Partitions aligned to 1134 sector boundaries, offset 63
Partition table:
0: NetBSD (sysid 169)
start 2048, size 3907027120 (1907728 MB, Cyls 1/14/33-3445351), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector enabled, timeout 20 seconds.
First active partition: 0
root@asus:/root #
Change the settings of wd1
--------------------------
root@asus:/root # fdisk -A 3969/63 -b 1024/63/63 -u0 /dev/rwd1d
Partition 0:
NetBSD (sysid 169)
start 2048, size 3907027120 (1907728 MB, Cyls 0/32/33-984386/17/63), Active
The data for partition 0 is:
NetBSD (sysid 169)
start 2048, size 3907027120 (1907728 MB, Cyls 0/32/33-984386/17/63), Active
sysid: [0..255 default: 169] 169
start: [0..984386cyl default: 2048, 1cyl, 1MB] 2048
size: [0..984386cyl default: 3907027120, 984386cyl, 1907728MB] 3907027120
bootmenu: []
We haven't written the MBR back to disk yet. This is your last chance.
Partition table:
0: NetBSD (sysid 169)
start 2048, size 3907027120 (1907728 MB, Cyls 0/32/33-984386/17/63), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector enabled, timeout 20 seconds.
First active partition: 0
Should we write new partition table? [n] y
root@asus:/root #
List the settings of wd1
------------------------
root@asus:/root # fdisk /dev/rwd1d
Disk: /dev/rwd1d
NetBSD disklabel disk geometry:
cylinders: 3876021, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 3907029168
BIOS disk geometry:
cylinders: 1024, heads: 18, sectors/track: 63 (1134 sectors/cylinder)
total sectors: 3907029168
Partitions aligned to 1134 sector boundaries, offset 63
Partition table:
0: NetBSD (sysid 169)
start 2048, size 3907027120 (1907728 MB, Cyls 1/14/33-3445351), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector enabled, timeout 20 seconds.
First active partition: 0
root@asus:/root #
I have tried to copy the first 8K from wd0 to wd1 with
dd if=/dev/rwd0d of=/dev/rws1d bs=512 count=16384
but I am still unable to change the partition settings on wd1.
How do I do that?
As a consequence of moving and remirroring the first partition
and changing MBR and boot code in the first partition I have
also unintentionally changed my boot settings. Before I started
messing with fdisk and disklabeling of the disks the boot command
'dev' listed all my available partitions except for the cdrom
partition(s), i.e. hd0a, hd0e, hd0f, hd0g, hd0h, fd0a etc., and
I was able to 'ls' and boot from all bootable partitions.
Now the 'dev' command shows only hd0a or hd1a depending on the
disk I am booting from, but luckily I can still list and boot
from the other bootable partitions.
Does anyone know how to get the full device list back in the boot
menu?
Kind regards
Ib-Michael
--
Email: i.m.martinsen(at)gmail.com
Running NetBSD/i386 v6.1.4
The ASCII Ribbon Campaign
() No HTML/RTF in email
/\ No Word docs in email
Respect for open standards
Home |
Main Index |
Thread Index |
Old Index