Attaching a previously attached volume without clearing data

Status
Not open for further replies.

Hsan

Dabbler
Joined
Dec 14, 2012
Messages
11
I have FreeNAS 8.3.0R operating with miniDLNA 1.0.24 amd64 on a HP N40L uServer on my LAN. FreeNAS is on a USB stick, miniDLNA on HDD. HDD is WD Red 1.0T used as basic CIFS storage disk and is setup with UFS.

It has run for almost a year after I built the install with very few issues since, so I am not very FreeNAS savvy.

I recently had a power failure and the server didn't come back on line. Re-booted a few times, same.

Got a screen and keyboard up to it and found the following:

UNEXPECTED SOFT UPDATE INCONSISTENCY; RUN fsck MANUALLY:
ufs: /dev/ufs/volume1 (/mnt/NASDISK1)
Automatic file system check failed; help!

I tried to run fsck -y /dev/ufs/NASDISK1 but system wouldn't find it.

I did however power down and pulled out the HDD and when re-powered the server came back on line and I could access the FreeNas GUI.

Using Volume Manager I removed NASDISK1 from the storage and shutdown.

I re-inserted the HDD back into the server and FreeNAS GUI is accessible . However when I try to re-attach the NASDISK1 volume in Volume Manager, the Add Volume button also has in red the warning "Existing data will be cleared". (Other sites with fixes for similar problems have re-attached without losing data and haven't mentioned the warning)

I am assuming this is losing my data on the HDD so I haven't proceeded.

Q1. Assuming this would wipe the data on the HDD is there a way of re-attaching without clearing or does fsck need to done somehow?

Q2. Is this problem better handled by a later version of FreeNAS? Should I update FreeNAS or will this just confuse the issue more?



 
D

dlavigne

Guest
The Add Volume function is used to format disks, thus the warning. You instead want to Auto Import. However, it will most likely fail until you have a successful fsck.
 

Hsan

Dabbler
Joined
Dec 14, 2012
Messages
11
Thanks for the response.

Yep Import and AutoImport didnt work.

Unfortunately I think I need a bit of spoon feeding here.... actually trying to get anything meaningful from fsck . How do I point freenas to the disk for fsck to do its stuff?

From CLI Shell I have the prompt: [root@freenas] ~#

trying fsck /dev/nasdisk1 and fsck -y /dev/nasdisk1 gives the response "fsck: cannot open /dev/nasdisk1: no such file or directory"

trying (from another similar thread) gpart show /dev/nasdisk1 gives the response "gpart: No such geom: /dev/nasdisk1."

Pretty similar to the first time I tried it.
 

Hsan

Dabbler
Joined
Dec 14, 2012
Messages
11
Hi Dusan, TIA.

camcontrol devlist:
<WDC WD10EFRX-68JCNS0 01.01A01> at scbus0 target 0 lun 0 (pass0,ada0)
<Sony Storage Media 0100> at scbus6 target 0 lun 0 (pass1, da0)

gpart show:
=> 34 1953525101 ada0 GPT (931G)
34 94 - free - (47k)
128 41944304 1 freebsd-swap (2.0G)
4194432 1949330703 2 freebsd-ufs (929G)

=> 63 15826881 da0 MBR (7.6G)
63 1930257 1 freebsd (942M)
1930320 63 - free - (31k)
1930383 1930257 2 freebsd [active] (942M)
3860640 3024 3 freebsd (1.5M)
3863664 41328 4 freebsd (20M)
3904992 11921952 - free - (5.7G)

=> 0 1930257 da0s1 BSD (942M)
0 16 - free - (8.0k)
16 1930241 1 !0 (942M)

=> 0 1930257 da0s2 BSD (942M)
0 16 - free - (8.0k)
16 1930241 1 !0 (942M)
 

Hsan

Dabbler
Joined
Dec 14, 2012
Messages
11
assume that is fsck /dev/ada0p2 (ada zero p2)

fsck: Could not determine filesystem type
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Yes, it's ada(zero)p2. You can try to specify the filesystem type like this:
fsck -t ufs /dev/ada0p2
 

Hsan

Dabbler
Joined
Dec 14, 2012
Messages
11
Multiple responses

175128683 DUP I=43760988
UNEXPECTED SOFT UPDATE INCONSISTENCY

through to

175128690 DUP I=43760988
UNEXPECTED SOFT UPDATE INCONSISTENCY

EXCESSIVE DUP BLKS I=43760988
CONTINUE? [yn]

I should continue?
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Yes, fsck will try to fix the filesystem. How successful it will be depends on what is damaged.
 

Hsan

Dabbler
Joined
Dec 14, 2012
Messages
11
OK thanks...


bad .jpg file (path to pc) - Cleared.

bad DUP File - Cleared

Free Blk(s) Counts Wrong in SUPERBLK - Salvaged

Summary Information bad - Salvaged

BLK(S) Missing in Bit Maps - Salvaged

***** File System Marked Clean *****

***** File System Was Modified *****


Re-Attached in Volume Manager - manually with Import Volume (named drive as before NASDISK1 , selected ada0p2, UFS) ... the Auto Imp0rt wouldn't work, it didn't see the drive ada0p2.

Re-booted server, then my network could see the shared disk on the server, all my devices can access/play content!!

Hopefully I have documented this well enough so others who may have similar problems can fix them.



Thank you very much Dusan for your step by step help... appreciate it greatly.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Re-Attached in Volume Manager - manually with Import Volume (named drive as before NASDISK1 , selected ada0p2, UFS) ... the Auto Imp0rt wouldn't work, it didn't see the drive ada0p2
That's OK. The Auto Import Volume only imports ZFS or UFS RAID volumes. For non-raid volumes you have to use the Import Volume screen.
 
Status
Not open for further replies.
Top