LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to mount usb hdd formatted with reiserfs? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-mount-usb-hdd-formatted-with-reiserfs-780371/)

Odyssey1942 01-06-2010 04:08 PM

How to mount usb hdd formatted with reiserfs?
 
Greetings, As soon will be apparent, I am (as usual) in WAY over my head. I NEED to recover files from a SimpleShare 500GB NAS which suddenly, and unaccountably, stopped showing me a huge number of files. Turns out that the (Hitachi) hdd in the NAS is formatted resierfs (new to me, but I believe it to be a linux format)

BTW, what, if any, is the relationship between reiserfs and Ext formats?

I have opened the case, removed the drive and connected it to an ide to usb connector, but it does not show on the desktop. In my Ubuntu 9.04 computer, when I click on Places/Computer, it shows a USB Drive with a little red circle with a white design of some sort within over the little hardware logo in front of the words, "USB Drive". When I click on the "USB Drive", a 2 line message pops up saying:

"Unable to mount location"
"Can't mount file"

I can remember back several versions of Ubuntu ago, when Ubunutu almost never recognized USB hdd's, that you had to find the drive designator (e.g. sba or hdb or something like this) using some command like fdisk or fstab or the like, then make a directory entry, then mount it. My memory on this is very hazy and the Googling I have done so far has not led me to a reasonably simple explanation of the process.

Could some kind soul please step me through the process of getting the (now USB) hdd to show up so I can see whether or not there are any files there. Your kindness in explaining what each step is doing will be much appreciated. I intend to make a record of this process so that I can refer to it in future if needed.

If the reiserfs format is going to complicate this process, then if someone could kindly hold my hand through this complication, I would be eternally grateful. (My wife has just completed a gigantic documents scanning exercise while I was away, saving it directly to the NAS rather than her computer, so rather than just losing the backup, we may have lost the originals, if the drive cannot be read.) TIA.

markush 01-06-2010 05:11 PM

Hello Odyssey1942,

I think the errormessage says that the mountcommand can't deal with the reiser-fs. It may be that your kernel lacks a driver for reiser. I'd suggest at first to look at the kernelconfiguration (somewhere in the filesystems-section).
If you have reiser-support in your kernel or the appropriate module loaded, I'd suggest to read in the man page of the mount command which option one has to use for the reiserfs. Well
Code:

mount -t reiserfs /dev/.....
will do the job. But there are many other options for reiserfs described in the manpage for the mount command.

Markus

Odyssey1942 01-06-2010 07:38 PM

Hello Markush,

I used Synaptic to look for reiserf tools and it showed it to be already installed, so I don't know why it isn't auto-mounting.

I tried:

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

So that didn't work. What next? Thanks.

Davno 01-07-2010 03:08 AM

Quote:

Originally Posted by Odyssey1942 (Post 3816920)
Hello Markush,

I used Synaptic to look for reiserf tools and it showed it to be already installed, so I don't know why it isn't auto-mounting.

I tried:

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

So that didn't work. What next? Thanks.

Are you sure it is (sdb) and also you should create a mount point like /mnt/temp then try to mount it.

evo2 01-07-2010 04:36 AM

What about

Code:

sudo mount -t reiserfs /dev/sdb1 /mnt
Or maybe it isn't reiserfs? Have you tried mounting with "auto" fs type?

As root:
Code:

echo '/dev/sdb1      /mnt/foobar  auto  defaults 0 0' >> /etc/fstab
mkdir -p /mnt/foobar
mount /mnt/foobar

(Still assuming if should be /dev/sdb1)

Cheers,

Evo2.

Odyssey1942 01-07-2010 01:03 PM

(Q) what about

Code:

sudo mount -t reiserfs /dev/sdb1 /mnt
(a) sudo mount -t reiserfs /dev/sdb1 /mnt
[sudo] password for robert:
Mount: Special device /dev/sdb1 does not exist

robert@ubunutu:~$ sudo mount -t reiserfs /dev/sdb /mnt
mount: Wrong fs type, bad option, bad superblock on /dev/sdb,
missing codepage or helper program, or other error
in some cases useful info is found in syslog - try
dmesg | tail or so

(q) or maybe it isn't reiserfs? Have you tried mounting with "auto" fs type?

(a) the tech support, in the very brief time i had with them, said that the entire disk is reiser fs.

(Q) As root:
Code:

echo '/dev/sdb1      /mnt/foobar  auto  defaults 0 0' >> /etc/fstab
mkdir -p /mnt/foobar
mount /mnt/foobarover Clea

(still assuming if should be /dev/sdb1)

(A) echo '/dev/sdb1 /mnt/foobar auto defaults 0 0' >> /etc/fstab
root@Ubunutu:/home/robert# mkdir -p /mnt/foobar
root@Ubunutu:/home/robert# mount /mnt/foobar
mount: special device /dev/sdb1 does not exist

As you can tell, and I was upfront about in my original post, I am in way over my head, but I very much appreciate your continuing patience and support in trying to help me with this. Have I done the above correctly, and what can I do next? TIA

markush 01-07-2010 03:09 PM

Hello Odyssey1942,

please post the output of the following commands "ls /dev/sd*", "ls /dev/hd*" and "df -h".

Markus

Odyssey1942 01-07-2010 04:05 PM

root@Ubunutu:/home/robert# ls /dev/sd*
/dev/sda /dev/sda2 /dev/sda4 /dev/sda6
/dev/sda1 /dev/sda3 /dev/sda5 /dev/sdb

root@Ubunutu:/home/robert# ls /dev/hd*
ls: cannot access /dev/hd*: No such file or directory

root@Ubunutu:/home/robert# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 9.2G 2.7G 6.1G 31% /
tmpfs 1007M 0 1007M 0% /lib/init/rw
varrun 1007M 112K 1007M 1% /var/run
varlock 1007M 0 1007M 0% /var/lock
udev 1007M 160K 1007M 1% /dev
tmpfs 1007M 224K 1006M 1% /dev/shm
lrm 1007M 2.2M 1005M 1% /lib/modules/2.6.28-17-generic/volatile
/dev/sda5 37G 28G 7.3G 80% /home

markush 01-07-2010 04:40 PM

ok, it seems that /dev/sdb is a device without partitions. Maybe that the partitiontable is damaged or deleted.
Execute the command
Code:

fdisk -l /dev/sdb
If I'm right this will show a new partitiontable, without entries.

If you once had only one partition on the drive you'll create this partition new, without formatting!!! then try to mount the device again.

Markus

Odyssey1942 01-07-2010 04:59 PM

Not sure what I got, but there's a lot of it:

# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xaa28aa28

Device Boot Start End Blocks Id System
/dev/sda1 * 1 6079 48829536 7 HPFS/NTFS
/dev/sda2 6080 6322 1951897+ 82 Linux swap / Solaris
/dev/sda3 6323 7295 7815622+ 83 Linux
/dev/sda4 7296 13374 48829567+ 5 Extended
/dev/sda5 7296 12158 39062016 83 Linux
/dev/sda6 12159 13374 9767488+ 83 Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table
root@Ubunutu:/home/robert# dd if=/dev/sda of=sda_MBR bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 5.3148e-05 s, 9.6 MB/s
root@Ubunutu:/home/robert# dd if=/dev/sda of=sda_MBR bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 6.2169e-05 s, 8.2 MB/s
root@Ubunutu:/home/robert# dd if=/dev/sdb of=sdb_MBR bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00115342 s, 444 kB/s
root@Ubunutu:/home/robert# hexedit sda_MBR
The program 'hexedit' is currently not installed. You can install it by typing:
apt-get install hexedit
bash: hexedit: command not found
root@Ubunutu:/home/robert# apt-get install hexedit
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-2.6.28-11 linux-headers-2.6.28-11-generic
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
hexedit
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 28.4kB of archives.
After this operation, 115kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com jaunty/universe hexedit 1.2.12-3 [28.4kB]
Fetched 28.4kB in 0s (35.2kB/s)
Selecting previously deselected package hexedit.
(Reading database ... 142208 files and directories currently installed.)
Unpacking hexedit (from .../hexedit_1.2.12-3_i386.deb) ...
Processing triggers for man-db ...
Setting up hexedit (1.2.12-3) ...

root@Ubunutu:/home/robert# hexedit sda_MBR
root@Ubunutu:/home/robert# hexedit sdb_MBR
root@Ubunutu:/home/robert# hexedit sda_MBR
root@Ubunutu:/home/robert# fdisk -l /dev/sdb

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table

Lot of info, but does it get us closer to a solution?

markush 01-07-2010 05:12 PM

well, I was right, sdb has no valid partitiontable. Be aware that the partitiontable is only a table of contents of the disk but is not physically associated with the data on the disk. If the disk had only one partition before it lost its data, you'll create one partition on the disk. Execute
Code:

fdisk /dev/sdb
then press n (new partition) then p (primary) then 1 (number of partition) then first cylinder, last cylinder (chose the default) then w (write and exit). Afterwards the "fdisk -l" command should show up a valid partitiontable for sdb and you may mount it as /dev/sdb1 to /mnt/tmp.

Markus

Skaperen 01-07-2010 05:24 PM

Do the following command. There are THREE (3) spaces between each letter inside the string on the fgrep command.

Code:

od -c < /dev/sdb | fgrep 'R  e  I  s  E  r  2  F  s'
If you get no output within several seconds to a minute, then you don't have any Reiserfs on the drive. However, if you get any output, you'll probably get a lot, in which case repeat the command piped through "head" to see the first line.

Code:

od -c < /dev/sdb | fgrep 'R  e  I  s  E  r  2  F  s' | head
The offset of that first line could tell us where the Reiserfs partition was located. If you get output, please post back the first line. If no output, say so.

Odyssey1942 01-07-2010 07:42 PM

Markush,
I had earlier made a mount point at usb1, here is the result:

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

Skaperen,

Here is the output from the first command (which I terminated after a couple of minutes of no further output):
# od -c < /dev/sdb | fgrep 'R e I s E r 2 F s'
3641314060 002 \0 001 \0 R e I s E r 2 F s \0 \0 \0
3641344060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3641424060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3641464060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3641524060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3641554060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3641624060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3641664060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3641724060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3641764060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3642024060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3642064060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3642124060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3642164060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3642214060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3642274060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3642334060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3642374060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3642434060 002 \0 002 \0 R e I s E r 2 F s \0 \0 \0
3642464060 002 \0 001 \0 R e I s E r 2 F s \0 \0 \0
3642514060 002 \0 001 \0 R e I s E r 2 F s \0 \0 \0

^C

here is the second command, but so far no output after several mins.

root@Ubunutu:/home/robert# od -c < /dev/sdb | fgrep 'R e I s E r 2 F s' | head


All times are GMT -5. The time now is 09:55 AM.