Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Where is my swap and dump space?



Dear list-members.

First of all excuse me if I am posting to the wrong mailling list, but
this matter is regarding my NetBSD/i386 system although I am not
sure it is strictly related to the i386 architecture.



I have been running NetBSD with a RAID1 setup in a few years apparently
without problems, but recently I have been reexamining the setup and
right now I am unable to locate my swap partition.

fdisk shows the disk layout as:

root:/root # fdisk -f /dev/wd0
Disk: /dev/wd0d
NetBSD disklabel disk geometry:
cylinders: 158816, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 160086528

BIOS disk geometry:
cylinders: 1022, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 160086528

Partition table:
0: NetBSD (sysid 169)
    bootmenu: Disk0
    start 63, size 160086465 (78167 MB, Cyls 0-9964/236/1), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector enabled, timeout 10 seconds.
root:/root # fdisk -f /dev/wd1
Disk: /dev/wd1d
NetBSD disklabel disk geometry:
cylinders: 158816, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 160086528

BIOS disk geometry:
cylinders: 1022, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 160086528

Partition table:
0: NetBSD (sysid 169)
    start 63, size 160086465 (78167 MB, Cyls 0-9964/236/1), Active
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
root:/root # 

disklabel shows the disk layout as:

root:/root # disklabel -r -t /dev/wd0
Maxtor1 6Y080L0 |Automatically generated label:\
        :dt=ESDI:se#512:ns#63:nt#16:sc#1008:nc#158816:\
        :pa#160086465:oa#63:ta=RAID:\
        :pc#160086465:oc#63:\
        :pd#160086528:od#0:
root%aptiva.immnet.dk@localhost:/root # disklabel -r -t /dev/wd1
Maxtor2 6Y080L0 |Automatically generated label:\
        :dt=ESDI:se#512:ns#63:nt#16:sc#1008:nc#158816:\
        :pa#160086465:oa#63:ta=RAID:\
        :pc#160086465:oc#63:\
        :pd#160086528:od#0:
root:/root # 

the fstab looks like:

root:/root # cat /etc/fstab
#Filesystem     Mntpt   Type    Option          Dump    Mount-order
/dev/raid0a     /       ffs     rw              1       1
/dev/raid0b     none    swap    sw              0       0
# /dev/wd0e     /c      msdos   rw              1       2
# /dev/wd2e     /d      msdos   rw              1       2
/dev/cd0a       /cdrom  cd9660  ro,noauto       0       0
/dev/fd0a       /floppy msdos   rw,noauto       1       0
kernfs          /kern   kernfs  rw
# procfs                /proc   procfs  rw,noauto
procfs          /emul/linux/proc        procfs  ro,linux
root:/root # 

the swap information is:

root:/root # swapctl -l
Device      1K-blocks     Used    Avail Capacity  Priority
/dev/raid0b   2097152   398076  1699076    19%    0
root:/root # swapctl -z
dump device is raid0b
root:/root # 

and the raid configuration looks like:

root:/root # cat /etc/raid0.conf 
# Mandatory section.
# Define RAID architechture.
# #Rows #Cols   #Spares
START array
1       2       0

# Mandatory section.
# Define disk partitions in stripe.
# NOTE: Order is important.
START disks
/dev/wd0a
/dev/wd1a

# Optional section.
# Define hot spare disks
# START spare
# /dev/wd2a

# Mandatory section.
# Define RAID layout.
# SU:           Stripe Unit
# ReconUnit:    Reconstruction Unit
# sectPerSU     SUsPerParityUnit        SUsPerReconUnit RAID-level
START layout
128     1       1       1

# Mandatory section.
# Define queueing method and number of entries
START queue
fifo    100
root:/root # 

raidctl -s raid0 shows:

root:/root # raidctl -s raid0
Components:
           /dev/wd0a: optimal
           /dev/wd1a: optimal
No spares.
Component label for /dev/wd0a:
   Row: 0, Column: 0, Num Rows: 1, Num Columns: 2
   Version: 2, Serial Number: 2005041001, Mod Counter: 913
   Clean: No, Status: 0
   sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1
   Queue size: 100, blocksize: 512, numBlocks: 160086400
   RAID Level: 1
   Autoconfig: Yes
   Root partition: Yes
   Last configured as: raid0
Component label for /dev/wd1a:
   Row: 0, Column: 1, Num Rows: 1, Num Columns: 2
   Version: 2, Serial Number: 2005041001, Mod Counter: 913
   Clean: No, Status: 0
   sectPerSU: 128, SUsPerPU: 1, SUsPerRU: 1
   Queue size: 100, blocksize: 512, numBlocks: 160086400
   RAID Level: 1
   Autoconfig: Yes
   Root partition: Yes
   Last configured as: raid0
Parity status: clean
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.
root:/root # 



My intentions were to allocate the first 2GB of the disks except for
the first cylinder as swap space and let the rest of the disks be
allocated to one big NetBSD partition, but this seems not to be the
case.

According to the disktab all space except for the first cylinder is
allocated to the NetBSD partition. And now I am wondering: where did I
put my swap space area?


Until now I have been able to boot from both disks (wd0 and wd1). I
can say that for sure because I have set up different boot menu time
out values on wd0 and wd1 (10 seconds and 30 seconds) and I can boot
NetBSD from both disks and run it without any problems.

During boot the system displays the following RAID related messages:

raid0: RAID Level 1
raid0: Components: /dev/wd0a /dev/wd1a
raid0: Total Sectors: 160086400 (78167 MB)
boot device: raid0
root on raid0a dumps on raid0b
root file system type: ffs
raid0: Device already configured!

and during shutdown the system showed a message saying something like

swapctl: removing /dev/raid0b

I did not have the time to not the message completely.


But what is the system using for swap and dump space then?


Is it so that as soon as the RAID has been established the system is
more or less running mostly from wd0 and the first 2GB of wd1 is used
for swap space without my knowledge?

(and consequently the first 2GB are not mirrorred?).


If this is the case I guess I have to reconfigure my setup. Apart from
starting from scratch and laying out the partitions (or slices)
correctly can I do anything "smarter" like moving the slice on wd1 2GB
away from start, resync the mirror and then repeat the process for wd0?


Kind regards
  Ib-Michael Martinsen
-- 
Email: i.m.martinsen(at)gmail.com
Running NetBSD/i386 v3.0


Home | Main Index | Thread Index | Old Index