Hello,
some more 4k-bytes/sector fun today. dump(8) doesn't like the
4k-byte/sectors source devices. There is an output below as an example and
also related patch for the man page.
With restore(8), i did't encounter any problems when restoring dumps of
regular 512-byte/sectors filesystems to a filesystem residing on a
4k-byte/sector device. (I silently suppose that all sector sizes other
than 512 bytes are affected.)
Connected
>> OpenBSD/i386 BOOT 3.21
boot> boot kernel/i386/bsd.mp -a
booting hd0a:kernel/i386/bsd.mp:
-\|/-\|/-9831612\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\!
|/-\
|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\+1082924
[72+407248|/-\|/-\|/-\|/-\|/-\|/-\|+400515/-\|/-\|/-\|/-\|/-\|/-\|]=0xb2e020
entry point at 0x200120
[ using 808248 bytes of bsd ELF symbol table ]
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
Copyright (c) 1995-2014 OpenBSD. All rights reserved. http://www.OpenBSD.org
OpenBSD 5.5-current (GENERIC.MP) #54: Sun Apr 20 03:46:09 MDT 2014
[email protected]:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz ("GenuineIntel" 686-class) 1.80 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,LAHF,PERF
real mem = 526807040 (502MB)
avail mem = 505761792 (482MB)
warning: no entropy supplied by boot loader
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 11/24/08, BIOS32 rev. 0 @ 0xfa080, SMBIOS
rev. 2.4 @ 0xf0000 (34 entries)
bios0: vendor Phoenix Technologies, LTD version "MS7336 1.14" date 11/24/2008
bios0: Hewlett-Packard HP Compaq dx2300 Microtower
acpi0 at bios0: rev 0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC HPET MCFG APIC SSDT SSDT
acpi0: wakeup devices PEX0(S5) PEX1(S5) PEX2(S5) PEX3(S5) PEX4(S5) PEX5(S5)
HUB0(S5) UAR1(S5) UAR2(S5) USB0(S3) USB1(S3) USB2(S3) USB3(S3) USBE(S3)
AC97(S5) AZAL(S5) [...]
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 199MHz
cpu0: mwait min=64, max=64, C-substates=0.2.0.0.0, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU 4300 @ 1.80GHz ("GenuineIntel" 686-class) 1.80 GHz
cpu1:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,LAHF,PERF
ioapic0 at mainbus0: apid 4 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 0, remapped to apid 4
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEX0)
acpiprt2 at acpi0: bus -1 (PEX1)
acpiprt3 at acpi0: bus -1 (PEX2)
acpiprt4 at acpi0: bus -1 (PEX3)
acpiprt5 at acpi0: bus -1 (PEX4)
acpiprt6 at acpi0: bus -1 (PEX5)
acpiprt7 at acpi0: bus 2 (HUB0)
acpicpu0 at acpi0: FVS, 1800, 1200 MHz
acpicpu1 at acpi0: FVS, 1800, 1200 MHz
acpibtn0 at acpi0: PWRB
bios0: ROM list: 0xc0000/0xb000! 0xcc000/0x1800
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82946GZ Host" rev 0x02
ppb0 at pci0 dev 1 function 0 "Intel 82946GZ PCIE" rev 0x02: apic 4 int 16
pci1 at ppb0 bus 1
vga1 at pci0 dev 2 function 0 "Intel 82946GZ Video" rev 0x02
intagp0 at vga1
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1280x1024
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x01: msi
azalia0: codecs: Realtek ALC888
audio0 at azalia0
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x01: apic 4 int 23
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x01: apic 4 int 19
uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x01: apic 4 int 18
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x01: apic 4 int 16
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x01: apic 4 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb1 at pci0 dev 30 function 0 "Intel 82801BA Hub-to-PCI" rev 0xe1
pci2 at ppb1 bus 2
fxp0 at pci2 dev 8 function 0 "Intel 82801GB LAN" rev 0x01, i82562: apic 4 int
20, address xx:xx:xx:xx:xx:xx
inphy0 at fxp0 phy 1: i82562ET 10/100 PHY, rev. 0
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GB LPC" rev 0x01: PM disabled
pciide0 at pci0 dev 31 function 2 "Intel 82801GB SATA" rev 0x01: DMA, channel 0
configured to native-PCI, channel 1 configured to native-PCI
pciide0: using apic 4 int 19 for native-PCI interrupt
wd0 at pciide0 channel 0 drive 0: <ST3250318AS>
wd0: 16-sector PIO, LBA48, 238475MB, 488397168 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 6
atapiscsi0 at pciide0 channel 1 drive 0
scsibus1 at atapiscsi0: 2 targets
cd0 at scsibus1 targ 0 lun 0: <HL-DT-ST, DVD+-RW GSA-H31L, W618> ATAPI 5/cdrom
removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x01: apic 4 int 19
iic0 at ichiic0
iic0: addr 0x2f 00=c0 01=07 02=00 03=00 04=07 05=00 06=00 07=00 14=14 15=62
16=03 17=04 words 00=c0ff 01=07ff 02=00ff 03=00ff 04=07ff 05=00ff 06=00ff
07=00ff
spdmem0 at iic0 addr 0x50: 512MB DDR2 SDRAM non-parity PC2-5300CL5
usb1 at uhci0: USB revision 1.0
uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
usb4 at uhci3: USB revision 1.0
uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
isa0 at ichpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
wbsio0 at isa0 port 0x4e/2: W83627DHG rev 0x23
lm1 at wbsio0 port 0x290/8: W83627DHG
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
umass0 at uhub0 port 2 configuration 1 interface 0 "Generic USB2.0-CRW" rev
2.00/11.22 addr 2
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd0 at scsibus2 targ 1 lun 0: <Generic-, Compact Flash, 1.00> SCSI0 0/direct
removable
sd1 at scsibus2 targ 1 lun 1: <Generic-, SM/xD-Picture, 1.00> SCSI0 0/direct
removable
sd2 at scsibus2 targ 1 lun 2: <Generic-, SD/MMC, 1.00> SCSI0 0/direct removable
sd3 at scsibus2 targ 1 lun 3: <Generic-, MS/MS-Pro, 1.00> SCSI0 0/direct
removable
umass1 at uhub0 port 8 configuration 1 interface 0 "HGST Touro Desk 3.0" rev
2.10/0.00 addr 3
umass1: using SCSI over Bulk-Only
scsibus3 at umass1: 2 targets, initiator 0
sd4 at scsibus3 targ 1 lun 0: <HGST, , 0000> SCSI4 0/direct fixed
serial.xxxxxxxxxxxxxxxxxxxx
sd4: 3815446MB, 4096 bytes/sector, 976754431 sectors
vscsi0 at root
scsibus4 at vscsi0: 256 targets
softraid0 at root
scsibus5 at softraid0: 256 targets
root device (default wd0a): sd4a
swap device (default sd4b):
root on sd4a swap on sd4b dump on sd4b
# mount
/dev/sd4a on / type ffs (local)
/dev/sd4k on /home type ffs (local, nodev, nosuid)
/dev/sd4d on /tmp type ffs (local, nodev, nosuid)
/dev/sd4f on /usr type ffs (local, nodev)
/dev/sd4g on /usr/X11R6 type ffs (local, nodev)
/dev/sd4h on /usr/local type ffs (local, nodev)
/dev/sd4j on /usr/obj type ffs (local, nodev, nosuid)
/dev/sd4i on /usr/src type ffs (local, nodev, nosuid)
/dev/sd4e on /var type ffs (local, nodev, nosuid)
# disklabel sd4
# /dev/rsd4c:
type: SCSI
disk: SCSI disk
label: HGST
duid: cac6a3f85ac3a5cf
flags:
bytes/sector: 4096
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 60800
total sectors: 976754431
boundstart: 262144
boundend: 7602175
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg]
a: 243296 262144 4.2BSD 4096 32768 1 # /
b: 194159 505440 swap # none
c: 976754431 0 unused
d: 387224 699600 4.2BSD 4096 32768 1 # /tmp
e: 599808 1086824 4.2BSD 4096 32768 1 # /var
f: 453216 1686632 4.2BSD 4096 32768 1 # /usr
g: 262144 2139848 4.2BSD 4096 32768 1 # /usr/X11R6
h: 969928 2401992 4.2BSD 4096 32768 1 # /usr/local
i: 351272 3371920 4.2BSD 4096 32768 1 # /usr/src
j: 511056 3723192 4.2BSD 4096 32768 1 # /usr/obj
k: 2319328 4234248 4.2BSD 4096 32768 1 # /home
l: 524288 6553576 4.2BSD 4096 32768 1
#
# fsck -nf /dev/rsd4a
** /dev/rsd4a (NO WRITE)
** Last Mounted on /
** Root file system
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1847 files, 13705 used, 227598 free (86 frags, 28439 blocks, 0.0% fragmentation)
#
# cd /home/X
# pwd
/home/X
# dump -0af ./sd4a.dump /dev/rsd4a
DUMP: Date of this level 0 dump: Tue Apr 22 13:26:04 2014
DUMP: Date of last level 0 dump: the epoch
DUMP: Dumping /dev/rsd4a to ./sd4a.dump
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 54795 tape blocks.
DUMP: Volume 1 started at: Tue Apr 22 13:26:05 2014
DUMP: dumping (Pass III) [directories]
DUMP: read error from /dev/rsd4a: Invalid argument: [block 521802]:
count=10240
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521802]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521803]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521804]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521805]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521806]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521807]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521808]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521809]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521810]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521811]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521812]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521813]:
count=512 DUMP:
read error from /dev/rsd4a: Invalid argument: [block 521792]: count=5120
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521814]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521792]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521815]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521793]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521816]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521794]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521817]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521795]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521818]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521796]:
count=512
DUMP: DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521819]:
count=512read error from /dev/rsd4a: Invalid argument: [sector 521797]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521798]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521820]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521799]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521821]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [block 521822]:
count=5120
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521800]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521822]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521801]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521823]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521824]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521825]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521826]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521827]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521828]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521829]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521830]:
count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 521831]:
count=512
DUMP: dumping (Pass IV) [regular files]
DUMP: read error from /dev/rsd4a: Invalid argument: [block 4160]: count=9216
DUMP: read error from /dev/rsd4a: Invalid argument: [block 4178]: count=10240
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4160]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4178]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4161]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4179]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4162]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4180]: count=512
DUMP:
read error from /dev/rsd4a: Invalid argument: [sector 4163]: count=512
DUMP: read error fr^C
DUMP: DUMP: read error from /dev/rsd4a: Invalid argument: [block 4198]:
count=10240
read error from /dev/rsd4a: Invalid argument: [sector 4187]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4198]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4188]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4199]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4189]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4200]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4190]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4201]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4191]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4202]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4192]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4203]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4193]: count=512
DUMP: DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4204]:
count=512
read error from /dev/rsd4a: Invalid argument: [sector 4194]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4205]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4195]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4206]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4196]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4207]: count=512
DUMP: read error from /de^C DUMP:
read error from /dev/rsd4a: Invalid argument: [sector 4173]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4212]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4174]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4213]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4175]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4214]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4176]: count=512
DUMP: read error from /dev/rsd4a: Invalid argument: [sector 4215]: count=512
DUMP: read^C
DUMP: "Yes" or "No"?
DUMP: Do you want to abort dump?: ("yes" or "no") yes
DUMP: The ENTIRE dump is aborted.
#
Index: src/sbin/dump/dump.8
===================================================================
RCS file: /cvs/src/sbin/dump/dump.8,v
retrieving revision 1.45
diff -u -p -u -r1.45 dump.8
--- src/sbin/dump/dump.8 4 Apr 2013 10:47:21 -0000 1.45
+++ src/sbin/dump/dump.8 22 Apr 2014 13:03:10 -0000
@@ -475,3 +475,5 @@ told the operator which tape to mount wh
and provided more assistance
for the operator running
.Xr restore 8 .
+.Pp
+Only devices with 512-byte sectors can be dumped from.
Regards,
David