Access HDD content outside of SC101?

37 views
Skip to first unread message

kris...@gmail.com

unread,
Dec 29, 2008, 10:38:59 AM12/29/08
to SC101 NBD Server
Hi all,
I'm using this SC101-NBD software to use my SC101 under Linux (v.
helpful project!). I formatted my partitions using ext3. When I pull a
HDD out of the SC101 and hook it to my computer (via IDE->USB
adapter), linux sees my device as a HDD (/dev/sdX). But when I try to
mount one of the partitions as ext3, I get errors.

Is it possible to mount the HDD partitions if I remove the HDD from
SC101? I'm worried about the viability of the unit -- If the SC101
dies, is my data inaccessible? If do I need to buy a new SC101 to
access it (which isn't bad b/c they're so cheap!).

Thanks so much for your help. This project really is a lifesaver.

-Chris

Iain Wade

unread,
Dec 29, 2008, 8:30:01 PM12/29/08
to kris...@gmail.com, SC101 NBD Server
Hi Chris,

Good question!

The device doesn't do anything crazy like scrambling or splitting up
the data on disk, so it should definitely be possible to mount it on
Linux.

The sc101 seems to reserve a small area at the beginning of the disk,
without a partition table it seems to reserve 512 bytes (1 sector).

If you have partitioned the disk then the first partition will be
offset in by an extra 63 sectors.

On linux you can use a tool called losetup to create a loopback device
which is offset by a certain amount into the original file. e.g.

losetup -o 512 /dev/loop0 /dev/nbd0

or if the disk is partitioned:

losetup -o $[512+63*512] /dev/loop0 /dev/nbd0

then:

mount -t ext3 /dev/loop0 /mnt

Regards,
--Iain

Chris Hill

unread,
Dec 30, 2008, 1:44:04 PM12/30/08
to iw...@optusnet.com.au, SC101 NBD Server
Thanks for the tips. Since I've already partitioned the drive and formatted it ext3, I did this:


losetup -o $[512+63*512] /dev/loop0 /dev/nbd0

But when I try to mount /dev/loop0 as ext3 under Linux, I get this error:

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Dmesg says this:
VFS: Can't find ext3 filesystem on dev loop0.

I _can_ still access the partition if it's in SC101. Here's the dmesg from that activity:
nbd: registered device at major 43
 nbd0: unknown partition table
kjournald starting.  Commit interval 5 seconds
EXT3 FS on nbd0, internal journal
EXT3-fs: mounted filesystem with ordered data mode.

And "fdisk -l /dev/nbd0":
Disk /dev/nbd0: 79.9 GB, 79993765888 bytes
255 heads, 63 sectors/track, 9725 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/nbd0 doesn't contain a valid partition table
root@ibm:/mnt/test# cfdisk /dev/nbd0

And "ut listall":
===============================================================================
VERSION  : 4.23.0                        ROOT IP ADDR : 192.168.1.106  
TOTAL(MB): 76315                         # PARTITIONS : 1
FREE (MB): 27   
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PARTITION                                LABEL           IP ADDR      SIZE (MB)
D8A92090-D1D4-11DD-8C71-000AE4C2C9E0     NAS1            192.168.1.107    76288
===============================================================================

I'm using Debian unstable, kernel 2.6.27

I'm not sure where to look. All I can think is my partition table is wrong. Any ideas?
Thanks!

-Chris
Reply all
Reply to author
Forward
0 new messages