DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 12th August 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Thanked 0 Times in 0 Posts
Default Hard disk won't work after changing case

I have an external seagate 2TB and i bought a new case since the power adapter of the old case broke when i tried to connect it.

The problem is that the hard disk is not recognised in the new case.

here is my disklabel
Code:
$ sudo disklabel sd0c
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: 001-9VT156      
duid: 0000000000000000
flags:
bytes/sector: 4096
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 30400
total sectors: 488378646
boundstart: 0
boundend: 488378646
drivedata: 0 

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:        488378646                0  unused

I noticed that with the old case the label was 'i' and now is 'c'.Also if i try to mount i get;

Code:
$ sudo mount -t msdos /dev/sd0c /usr/usb/externaldrives/ 
mount_msdos: /dev/sd0c on /usr/usb/externaldrives: Inappropriate file type or format
Normally i should see something like msdos or ntfs. :/
I have an Ubuntu laptop which also won't find the disk.

Any ideas? :/ I don't wanna lose my data.It's more than 1TB. :/


edit:It's a SATA hd.

Last edited by sepuku; 12th August 2011 at 05:45 PM.
Reply With Quote
  #2   (View Single Post)  
Old 12th August 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Thanked 0 Times in 0 Posts
Default

And my dmesg is

Code:
$ dmesg
OpenBSD 4.9 (GENERIC.MP) #794: Wed Mar  2 07:19:02 MST 2011
    deraadt@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Intel(R) Core(TM)2 CPU T5600 @ 1.83GHz ("GenuineIntel" 686-class) 1.83 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,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM
real mem  = 3211161600 (3062MB)
avail mem = 3148480512 (3002MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 07/26/07, BIOS32 rev. 0 @ 0xfd690, SMBIOS rev. 2.4 @ 0xe0010 (67 entries)
bios0: vendor LENOVO version "7BETD1WW (2.12 )" date 07/26/2007
bios0: LENOVO 1707YF8
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT TCPA APIC MCFG HPET SLIC BOOT SSDT SSDT SSDT SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) DURT(S3) EXP0(S4) EXP1(S4) EXP2(S4) EXP3(S4) PCI1(S4) USB0(S3) USB1(S3) USB2(S3) USB7(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: apic clock running at 166MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 CPU T5600 @ 1.83GHz ("GenuineIntel" 686-class) 1.83 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,SBF,SSE3,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpimcfg0 at acpi0 addr 0xf0000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus 4 (EXP2)
acpiprt5 at acpi0: bus 12 (EXP3)
acpiprt6 at acpi0: bus 21 (PCI1)
acpicpu0 at acpi0: C3, C2, C1, PSS
acpicpu1 at acpi0: C3, C2, C1, PSS
acpipwrres0 at acpi0: PUBSacpitz0 at acpi0: critical temperature 127 degC
acpitz1 at acpi0: critical temperature 97 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "42T4776" serial  6580 type LION oem "SONY"
acpibat1 at acpi0: BAT1 not present
acpibat2 at acpi0: BAT2 not present
acpiac0 at acpi0: AC unit offline
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK not docked (0)
bios0: ROM list: 0xc0000/0xea00! 0xcf000/0x1000 0xd0000/0x1000 0xdc000/0x4000! 0xe0000/0x10000!cpu0: Enhanced SpeedStep 1829 MHz: speeds: 1833, 1333, 1000 MHz
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
vga1 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
intagp0 at vga1
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0 at vga1: apic 1 int 16 (irq 11)
drm0 at inteldrm0
"Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: apic 1 int 
17 (irq 11)
azalia0: codecs: Analog Devices AD1981HD, Conexant/0x2bfa, using Analog Devices AD1981HD
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 1 int 20 (irq 11)
pci1 at ppb0 bus 2
em0 at pci1 dev 0 function 0 "Intel PRO/1000MT (82573L)" rev 0x00: apic 1 int 16 (irq 11), address 00:16:d3:be:48:1f
ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 1 int 21 (irq 11)
pci2 at ppb1 bus 3
wpi0 at pci2 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: apic 1 int 17 (irq 11), MoW2, address 00:1b:77:8f:14:50
ppb2 at pci0 dev 28 function 2 "Intel 82801GB PCIE" rev 0x02: apic 1 int 22 (irq 11)
pci3 at ppb2 bus 4
ppb3 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: apic 1 int 23 (irq 11)
pci4 at ppb3 bus 12
uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 1 int 16 (irq 11)
uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 1 int 17 (irq 11)uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 1 int 18 (irq 11)
uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 1 int 19 (irq 11)
ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 1 int 19 (irq 11)
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
pci5 at ppb4 bus 21
cbb0 at pci5 dev 0 function 0 "Ricoh 5C476 CardBus" rev 0xb4: apic 1 int 16 (irq 11)
"Ricoh 5C552 Firewire" rev 0x09 at pci5 dev 0 function 1 not configured
sdhc0 at pci5 dev 0 function 2 "Ricoh 5C822 SD/MMC" rev 0x18: apic 1 int 18 (irq 11)
sdmmc0 at sdhc0
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 22 device 0 cacheline 0x0, lattimer 0xb0
pcmcia0 at cardslot0
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02: PM disabled
pciide0 at pci0 dev 31 function 2 "Intel 82801GBM SATA" rev 0x02: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <FUJITSU MHW2060BH>wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 1 int 23 (irq 11)
iic0 at ichiic0
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
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
aps0 at isa0 port 0x1600/31npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
mtrr: Pentium Pro MTRR support
umass0 at uhub0 port 1 configuration 1 interface 0 "JMicron USB to ATA/ATAPI bridge" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <ST2000DL, 001-9VT156, > SCSI2 0/direct fixed
sd0: 1907729MB, 4096 bytes/sec, 488378646 sec total
ugen0 at uhub4 port 2 "STMicroelectronics Biometric Coprocessor" rev 1.00/0.01 addr 2
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
root on wd0a swap on wd0b dump on wd0b
sd0 detached
scsibus0 detached
umass0 detached
umass0 at uhub0 port 1 configuration 1 interface 0 "JMicron USB to ATA/ATAPI bridge" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <ST2000DL, 001-9VT156, > SCSI2 0/direct fixed
sd0: 1907729MB, 4096 bytes/sec, 488378646 sec total
sd0 detached
scsibus0 detached
umass0 detached
umass0 at uhub0 port 1 configuration 1 interface 0 "JMicron USB to ATA/ATAPI bridge" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <ST2000DL, 001-9VT156, > SCSI2 0/direct fixed
sd0: 1907729MB, 4096 bytes/sec, 488378646 sec total
sd0 detached
scsibus0 detached
umass0 detached



wd0: 16-sector PIO, LBA48, 57231MB, 117210240 sectors
Reply With Quote
  #3   (View Single Post)  
Old 12th August 2011
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,674
Thanked 214 Times in 189 Posts
Default

Quote:
Originally Posted by sepuku View Post
I noticed that with the old case the label was 'i' and now is 'c'.
Background information, which may help:
There are two levels of partitioning a drive with the i386 architecture: MBR partitions, stored in the Master Boot Record, and OpenBSD partitions, created within the OpenBSD disklabel.

At boot time, or at device attach time, if there is no disklabel on the drive, a virtual disklabel is created in memory. The OpenBSD kernel will add any foreign MBR partitions it recognizes as mountable to the virtual disklabel with unassigned letters, starting with partition "i".
It appears that your MBR partition table is now empty, because the disklabel shows only the "c" partition, the entire physical drive. Possible causes might be:

  • The electronics of your new case have reassigned drive sector numbers, rendering pre-existing data on the drive difficult or impossible to retrieve.
  • Your MBR sector was damaged and reassigned to a spare sector by drive electronics.
If it were me, I'd be using dd(1) with hexdump(1) to inspect the first set of sectors of sd0c to see what's on it, with something like:

# dd if=/dev/rsd0c count=63 | hexdump -C | less

Based on what I saw in that output, I would determine next steps.
Reply With Quote
  #4   (View Single Post)  
Old 12th August 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Thanked 0 Times in 0 Posts
Default

Hello jggimi,

Code:
dd if=/dev/rsd0c count=63 | hexdump -C | less
won't return anything to the output.I see a blank terminal and "(END)" at the bottom of that terminal that can be quited the same way vi editor does.
Reply With Quote
  #5   (View Single Post)  
Old 12th August 2011
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,674
Thanked 214 Times in 189 Posts
Default

The less(1) program is a pager, based on more(1). Please see the man page.

Your description of the output is very strange. I can think of three possibilities:
  1. Your $TERM is not correct. Unlikely, since you mention using vi.
  2. Some sort of PEBKAC, such as a typo while entering the command string.
  3. Your new case and it's connection is returning zero bytes to I/O requests. Perhaps there are I/O errors you are missing from the console. Review /var/log/messages for the timeframe of the dd, or run an xconsole(1) window or run # tail -f /var/log/messages & while doing it again.
You requested 63 512-byte sectors, and got nothing back. Here is an example of just the first sector, sector #0, which is an MBR and the primary partition table (sector #0) from my netbook's hard drive:
Code:
# dd if=/dev/rsd0c count=1 | hexdump -C
1+0 records in
1+0 records out
512 bytes transferred in 0.062 secs (8193 bytes/sec)
00000000  fc 33 c0 8e d8 8e c0 be  00 7c bf 00 06 b9 00 01  |ü3À.Ø.À¾.|¿..¹..|
00000010  f3 a5 ea 2e 06 00 00 47  41 47 3a 20 90 01 10 00  |ó¥ê....GAG: ....|
00000020  01 00 00 7c 00 00 00 00  00 00 00 00 00 00 bf 17  |...|..........¿.|
00000030  06 b4 0e bb 07 00 8a 05  3c 90 74 07 57 cd 10 5f  |.´.»....<.t.WÍ._|
00000040  47 eb ee bf 1d 06 80 3d  00 75 65 b4 02 cd 16 a9  |Gëî¿...=.ue´.Í.©|
00000050  0f 00 74 5c 33 c0 8e d8  8e c0 be be 7d b9 04 00  |..t\3À.Ø.À¾¾}¹..|
00000060  80 3c 80 74 0a 83 c6 10  e2 f6 b0 32 e9 cd 00 b2  |.<.t..Æ.âö°2éÍ.²|
00000070  80 b4 41 bb aa 55 cd 13  72 67 81 fb 55 aa 75 61  |.´A»ªUÍ.rg.ûUªua|
00000080  bf 26 06 8b 4c 08 89 0d  8b 4c 0a 89 4d 02 b4 42  |¿&..L....L..M.´B|
00000090  be 1e 06 bb 03 00 50 56  53 b2 80 cd 13 73 3c 33  |¾..»..PVS².Í.s<3|
000000a0  c0 b2 80 cd 13 5b 5e 58  4b 75 eb b0 31 e9 8c 00  |À².Í.[^XKuë°1é..|
000000b0  bb 7f 01 b8 00 10 8e d8  8e c0 b9 03 00 51 ba 80  |»..¸...Ø.À¹..Qº.|
000000c0  00 b9 02 00 b4 02 b0 3d  90 cd 13 73 52 33 c0 b2  |.¹..´.°=.Í.sR3À²|
000000d0  80 cd 13 59 e2 e7 b0 31  eb 62 90 5b 5e 58 eb 2d  |.Í.Yâç°1ëb.[^Xë-|
000000e0  90 b2 80 8a 74 01 8b 4c  02 bb 03 00 53 51 52 bb  |.²..t..L.»..SQR»|
000000f0  00 7c b8 01 02 cd 13 73  11 33 c0 b2 80 cd 13 5a  |.|¸..Í.s.3À².Í.Z|
00000100  59 5b 4b 75 e7 b0 31 eb  33 90 5a 59 5b 81 3e fe  |Y[Kuç°1ë3.ZY[.>þ|
00000110  7d 55 aa 74 05 b0 34 eb  23 90 ea 00 7c 00 00 b8  |}Uªt.°4ë#.ê.|..¸|
00000120  00 10 8e c0 26 81 3e fc  02 47 41 75 0d 26 83 3e  |...À&.>ü.GAu.&.>|
00000130  fe 02 47 75 05 ea 00 03  00 10 b0 33 bb 07 00 b4  |þ.Gu.ê....°3»..´|
00000140  0e cd 10 eb fe 56 e8 2d  07 c6 06 ea 5f 00 c6 06  |.Í.ëþVè-.Æ.ê_.Æ.|
00000150  eb 5f 00 c6 06 db 5f 5f  52 be 23 35 bb 48 00 b8  |ë_.Æ.Û__R¾#5»H.¸|
00000160  38 00 e8 5c f4 5a 5e b6  0a bb 10 12 e8 42 02 bf  |8.è\ôZ^¶.»..èB.¿|
00000170  db 5f b7 00 e8 4c 00 53  e8 a0 04 5b 3c 0d 75 09  |Û_·.èL.Sè .[<.u.|
00000180  c6 05 20 c6 06 ea 5f 00  c3 3c 08 75 11 80 ff 00  |Æ. Æ.ê_.Ã<.u..ÿ.|
00000190  74 e5 c6 05 20 4f fe cf  c6 05 5f eb 21 90 3c 20  |tåÆ. OþÏÆ._ë!.< |
000001a0  72 d5 80 3e 00 00 00 00  00 00 00 00 00 00 00 00  |rÕ.>............|
000001b0  00 00 00 00 00 00 4f 78  ca ac ca ac 00 00 00 01  |......Oxʬʬ....|
000001c0  01 00 07 fe ff ff 3f 00  00 00 a9 c3 4a 09 00 00  |...þÿÿ?...©ÃJ...|
000001d0  c1 ff 0c fe ff ff fe eb  03 12 fe 64 9c 00 00 00  |Áÿ.þÿÿþë..þd....|
000001e0  c1 ff ef fe ff ff fc 50  a0 12 c5 39 01 00 80 00  |ÁÿïþÿÿüP .Å9....|
000001f0  c1 ff a6 fe ff ff e8 c3  4a 09 16 28 b9 08 55 aa  |Áÿ¦þÿÿèÃJ..(¹.Uª|
00000200
#

Last edited by jggimi; 12th August 2011 at 07:41 PM. Reason: clarity of background tail(1) command
Reply With Quote
  #6   (View Single Post)  
Old 13th August 2011
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,674
Thanked 214 Times in 189 Posts
Default

Last night I helped my son with two hard drives that were not communicating. One was an external USB that was SATA within its enclosure, the other a SATA internal drive. Both it turns out, had varying SATA electronics issues, rendering recovery impossible.

One would perform limited I/O and had a damaged SMART service, the other would not respond to any I/O command on the SATA bus whatsoever.

Last edited by jggimi; 13th August 2011 at 01:59 PM.
Reply With Quote
  #7   (View Single Post)  
Old 13th August 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Thanked 0 Times in 0 Posts
Default

Now this is a strange thing; Today i tried once again
Code:
dd if=/dev/rsd0c count=1 | hexdump -C
and that's what i get;

Code:
# dd if=/dev/rsd0c count=1 | hexdump -C 
dd: /dev/rsd0c: Invalid argument
0+0 records in
0+0 records out
0 bytes transferred in 0.000 secs (0 bytes/sec)
Don't know why i didn't work yesterday.
Reply With Quote
  #8   (View Single Post)  
Old 13th August 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jggimi View Post
Last night I helped my son with two hard drives that were not communicating. One was an external USB that was SATA within its enclosure, the other a SATA internal drive. Both it turns out, had varying SATA electronics issues, rendering recovery impossible.

One would perform limited I/O and had a damaged SMART service, the other would not respond to any I/O command on the SATA bus whatsoever.
Did you manage to make them work?I am a little stressed.I worry about my data.Thanx for your help though.

Edit: I also inserted the hd on a windows machine and says that it has to be formatted in order to use it! :S

Last edited by sepuku; 13th August 2011 at 07:00 PM.
Reply With Quote
  #9   (View Single Post)  
Old 13th August 2011
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,674
Thanked 214 Times in 189 Posts
Default

Quote:
Originally Posted by sepuku View Post
Now this is a strange thing....
It is telling us that sd0 is not attached to the kernel. I recommend doing your diagnostics from the console, not from an X window, so that you will be sure to see (or not see) kernel messages as they occur, and avoid confusing yourself. Note that above, the bottom of your dmesg shows an sd0 attaching, and then being detached. Sit at the console and watch for messages as you attach your external device.
Quote:
Originally Posted by sepuku View Post
Did you manage to make them work?
The one that would still do some I/O when it felt like it had nothing on it of value, and the one that was completely dead had files which are now forever unrecoverable.
Quote:
I am a little stressed.I worry about my data.Thanx for your help though.
Disk drives have lifespans -- the manufacturers publish "mean time between failures" for their products; the numbers for an individual drive are relatively meaningless, but for people who manage large disk farms they are helpful to set expectations for the rate of failure.
Quote:
Edit: I also inserted the hd on a windows machine and says that it has to be formatted in order to use it! :S
If the MBR and its partition table has been wiped -- one of the possibilities I mentioned in my first post here -- your OSes will not be able to retrieve anything until the MBR is recovered/restored. At the moment, you have yet to prove you can read a single sector from the drive. I cannot tell you if you have lost anything at all, yet, or what recovery is possible if you have.
Reply With Quote
Old 14th August 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jggimi View Post
It is telling us that sd0 is not attached to the kernel. I recommend doing your diagnostics from the console, not from an X window, so that you will be sure to see (or not see) kernel messages as they occur, and avoid confusing yourself.

Until now i used only xterm and i haven't learnt another way for diagnostics.((If by console you mean xterm then what's 'X window'?)Moving from Ubuntu to OBSD is like suddenly diving to deep waters.Truth is i like it because it offers a lot of knowledge that it's -if not impossible- really difficult to obtain when using other OSes.I might learn things the 'hard' way but once learnt something,it's not going to be forgotten."And knowledge is power" especially in OBSD.


Quote:
Originally Posted by jggimi View Post
Note that above, the bottom of your dmesg shows an sd0 attaching, and then being detached. Sit at the console and watch for messages as you attach your external device.

That happens just because that's what i did; i was trying attaching/detaching to see if it would work but it failed.



Quote:
Originally Posted by jggimi View Post
Sit at the console and watch for messages as you attach your external device.
Code:
$ dmesg | tail 
ugen0 at uhub4 port 2 "STMicroelectronics Biometric Coprocessor" rev 1.00/0.01 addr 2
vscsi0 at root
scsibus0 at vscsi0: 256 targets
softraid0 at root
root on wd0a swap on wd0b dump on wd0b
umass0 at uhub0 port 1 configuration 1 interface 0 "JMicron USB to ATA/ATAPI bridge" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd0 at scsibus1 targ 1 lun 0: <ST2000DL, 001-9VT156, > SCSI2 0/direct fixed
sd0: 1907729MB, 4096 bytes/sec, 488378646 sec total
That's the only thing i see when attaching the hard disk.And i see only a c partition on disklabel.
Reply With Quote
Old 14th August 2011
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,674
Thanked 214 Times in 189 Posts
Default

You will only see more than a "c" partition under two circumstances:

  • There is a disklabel on the drive, with partitions defined, or
  • There is an MBR on the drive, with partitions recognized as mountable.
---

I'm not looking over your shoulder as you type commands, so this is only from what you tell me. The "Invalid argument" error with that dd command should only occur when one of these three things is true:
  1. You mistype the device node argument, such as using the letter O instead of the number 0
  2. The device is not attached to the kernel at the time you issue the command
  3. Your /dev directory has been damaged, and does not have an rsd0c node in the directory.

Try the following:

# fdisk sd0

This should show if the drive has a partition table in its MBR, and if it shows anything at all, it is reading sector #0. Before running it, please start an xconsole, so in the event there are any kernel messages, you see them as they happen. (An xconsole is a window that shows kernel messages. Please review the xconsole(1) man page.)
Reply With Quote
Old 14th August 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Thanked 0 Times in 0 Posts
Default

I see no kernel messages in the xconsole when running

Code:
$ sudo fdisk sd0 
Password:
Disk: sd0       geometry: 30400/255/63 [488378646 4096-byte Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: 07      0   1   1 - 243200 254  63 [          63:  3907024002 ] NTFS        
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused      
 3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
I think i lost all hope right now. :/

I only see these kernel messages when attaching the disk:

Code:
umass0 at uhub0 port 1 configuration 1 interface 0 "JMicron USB to ATA/ATAPI bridge" rev 2.00/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd0 at scsibus1 targ 1 lun 0: <ST2000DL, 001-9VT156, > SCSI2 0/direct fixed
sd0: 1907729MB, 4096 bytes/sec, 488378646 sec total
Reply With Quote
Old 14th August 2011
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,142
Thanked 182 Times in 149 Posts
Default

The MBR seems to be OK There is a NTFS partition.

The Master Boot Record is in the first sector of the disk
My wild guess is the the new case electronics somehow does a different mapping of the other disk sectors.

How about putting your disk back in the old case and finding another power adapter/supply that supplies about the same voltage/current. Or find an electronics hobbyist who has an adjustable laboratory power supply for lending.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 15th August 2011
shep shep is offline
ISO Quartermaster
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 589
Thanked 9 Times in 9 Posts
Default

One problem is your trying to mount ntfs as msdos - they are different file systems
Quote:
sudo mount -t msdos /dev/sd0c /usr/usb/externaldrives/
Quote:
$ sudo fdisk sd0
Password:
Disk: sd0 geometry: 30400/255/63 [488378646 4096-byte Sectors]
Offset: 0 Signature: 0xAA55
Starting Ending LBA Info:
#: id C H S - C H S [ start: size ]
-------------------------------------------------------------------------------
0: 07 0 1 1 - 243200 254 63 [ 63: 3907024002 ] NTFS
1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
Man page for ntfs
man mount_ntfs
Reply With Quote
Old 15th August 2011
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,674
Thanked 214 Times in 189 Posts
Default

Another possibility would be to write a physical disklabel on the drive, mapping to the MBR partition's sectors.
Reply With Quote
Old 15th August 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by shep View Post
One problem is your trying to mount ntfs as msdos - they are different file systems



Man page for ntfs
man mount_ntfs
Well i use mount -t msdos because i could not mount it using mount_ntfs.And Everything worked great that way.
Reply With Quote
Old 15th August 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by J65nko View Post
How about putting your disk back in the old case and finding another power adapter/supply that supplies about the same voltage/current. Or find an electronics hobbyist who has an adjustable laboratory power supply for lending.
Well the piece that connects the board of the case with the cable is broken(the usb cable not the power cable).I'm a hobbyist for the time being as i study electronics and even if i made it work,i would need a case anyway cause i broke the old one to obtain the disk.That's why i'm trying to make it work on the new case.
Reply With Quote
Old 15th August 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jggimi View Post
Another possibility would be to write a physical disklabel on the drive, mapping to the MBR partition's sectors.
And how is that done?
Reply With Quote
Old 15th August 2011
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 3,674
Thanked 214 Times in 189 Posts
Default

With the disklabel(8) command, of course.

It appears you have an MBR that has an NTFS partition defined, that you later manually formated as FAT, then later wrote an empty physical disklabel. That is what I gather from your odd set of symptoms.
Reply With Quote
Old 15th August 2011
sepuku's Avatar
sepuku sepuku is offline
Real Name: Vizard Sepuku
Package Pilot
 
Join Date: Jun 2011
Location: Athens & Chania,Greece
Posts: 143
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jggimi View Post
With the disklabel(8) command, of course.

Correct me if i'm wrong,but if i understand what i read in the manual i must use the '-E' command of disklabel?And if so,i can't understand the "mapping to the MBR partitions" part.
Reply With Quote
Reply

Tags
format, hard disk, master boot record, seagate

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hard disk reliability ephemera General Hardware 32 20th April 2010 10:17 AM
Hard disk utilization Greg_Morgan General software and network 3 16th October 2009 12:13 PM
Formatting Hard Disk Drive to UFS in OS X 10.5 Turquoise88 Other BSD and UNIX/UNIX-like 1 7th March 2009 09:57 PM
Hard disk bottle neck deathsoul FreeBSD General 1 28th September 2008 10:44 AM
Copy VCD film to hard disk mfaridi FreeBSD General 4 5th June 2008 01:57 PM


All times are GMT. The time now is 07:32 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick