Errors mounting/unmounting hard disk

Status
Not open for further replies.

hendrik.h

Dabbler
Joined
May 4, 2013
Messages
10
Hey guys,
I need help to figure out what's wrong with my Freenas.
Today I received my new hard disk - 3TB WD30EFRX Red -, installed it in my Freenas Server (just updated to FreeNAS-8.3.1-RELEASE-p2-x64) and mounted it successfully (UFS). So far, so good.
I do not have any RAID configured, just 4 UFS-formatted hard disks.

Now the troubles began: As I was used to mount new disks with specified paths, I wanted to do the same with my new hard disk.
So I had to change the mounting path of that disk (in this case ada1).
Using the GUI, I first detached the disk succesfully, but as I tried to mount it again (this time with the right path), the console threw out this error:

[MiddlewareError: Unable to GPT format the disk "ada1"]

Tried this about 2-3 times, same error. On the 4th try, the GUI told me it had successfully mounted the disk, but looking into the "Storage"-Tab it had the same Used/Available/Size-statistics as the 3TB disk I already had in use before I installed the new one. Only difference: "Status" shows "DEGRADED".
Looking around in the forum, I only found that this status mostly occured in ZFS or RAID builds.

Now trying to detach the disk gives me back this error:

freenas manage.py: [middleware.exceptions:38] [MiddlewareError: Failed to detach storage2 with "umount /mnt/storage2" (exited with 1): umount: /mnt/storage2: statfs: No such file or directory umount: /mnt/storage2: unknown file system ]

Honestly I have no idea what is going on. I already ran a SMART-test (short) with no errors, so hopefully the hard drive isn't the problem.
Maybe someone who can help me? Thanks in advance
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Did you "detach" the old drive from the GUI before installing the new drive?

Have you tried a reboot?

Can you post your hardware specs please?
 

hendrik.h

Dabbler
Joined
May 4, 2013
Messages
10
I think i described it a little confusing. I don't want to replace any hard drive, just add the new one.
I already tried rebooting several times, problem persists.

Hardware:
AMD E-350 Processor (Asus E35M1-M Pro)
4 GB RAM (Kingston 1333MHz, DDR3)
1x WD Green 1TB
1x WD Green 1,5TB
1x WD Green 3TB
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I think i described it a little confusing. I don't want to replace any hard drive, just add the new one.
I already tried rebooting several times, problem persists.

Hardware:
AMD E-350 Processor (Asus E35M1-M Pro)
4 GB RAM (Kingston 1333MHz, DDR3)
1x WD Green 1TB
1x WD Green 1,5TB
1x WD Green 3TB

Unfortunately I'm even more confused now. Your hardware seems sufficient for the task. You said in the first post "it had the same Used/Available/Size-statistics as the 3TB disk I already had in use before I installed the new one" so I'm pretty confused now.
 

hendrik.h

Dabbler
Joined
May 4, 2013
Messages
10
Sorry for confusing you :D

I'll try to describe it clearer: One 3TB drive is already installed, a new 3TB was installed to expand the storage space.
Now looking in the "Storage"-Tab, the old 3TB (storage1) shows up normal, with "2.4TB Used - 95.9GB Available". Further down the list is the new 3TB drive (storage2), with the same statistics as the "storage1". Only it has the status "DEGRADED.

Hope it didn't make your confusion worse.

EDIT: Here's a screenshot to help you understand :)

storage.jpg
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I would try unmounting all of the disks from the GUI. Reboot, then remount them all. Naturally, you might get the error you mentioned above, but its the first thing I'd try.

Secondly, you could try running a long SMART test on the new drive to see if it has problems. Generally long tests are kind of pointless, but its better than nothing since you are already having problems.
 

hendrik.h

Dabbler
Joined
May 4, 2013
Messages
10
Wouldn't unmounting all drives result in data loss? Can I remount them without problems?

I'll give it a try and keep you up to date.
Thanks for the advice!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
You should be able to unmount and remount them without problems. The system should be unmounting and remounting them every time it boots up and shuts down. If you lose data because of the unmount and remount you have bigger problems that would have eventually shown themselves on a reboot anyway. :P
 

hendrik.h

Dabbler
Joined
May 4, 2013
Messages
10
Okay, so unmounting the 1TB and 1,5TB was successful, unfortunately trying to unmount the older 3TB drive failed with this error:

May 4 16:09:37 freenas kernel: GEOM_ELI: Detached ada2p1.eli on last close.
May 4 16:09:37 freenas notifier: geli: No such device: /dev/ada2p1.
May 4 16:09:38 freenas manage.py: [middleware.exceptions:38] [MiddlewareError: Failed to remove mountpoint /mnt/storage1: [Errno 66] Directory not empty: '/mnt/storage1']


Now it shows me the following information about the disks
storage2.jpg
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Yeah, those weird values can be ignored. Its a problem that creeps up with FreeNAS' GUI. Don't let it freak you out.

Can you post the output of:

# camcontrol devlist
# gpart list

Please put them inside of code tags so they are legible.
 

hendrik.h

Dabbler
Joined
May 4, 2013
Messages
10
Oh, ok. I'm currently wiping the hard drive with dd, as it seems that the partition table is corrupted.
I already tried those commands in the beginning, but can't exactly remember the output. It seemed normal to me, no errors.

I will post the output as soon as it finishes.
 

hendrik.h

Dabbler
Joined
May 4, 2013
Messages
10
By the way, before wiping the disk i ran
Code:
fsck_ufs ada1

and it gave me this:
Code:
** /dev/ada1                                                                    
Cannot find file system superblock                                              
ioctl (GCINFO): Inappropriate ioctl for device                                  
fsck_ufs: /dev/ada1: can't read disk label    


Does this mean the GPT is corrupted?

EDIT: Here are the command outputs you asked me for
Code:
[root@freenas ~]# camcontrol devlist                                            
<WDC WD10EAVS-22D7B0 01.01A01>     at scbus0 target 0 lun 0 (pass0,ada0)        
<WDC WD30EFRX-68AX9N0 80.00A80>    at scbus1 target 0 lun 0 (pass1,ada1)        
<WDC WD30EZRX-00MMMB0 80.00A80>    at scbus2 target 0 lun 0 (pass2,ada2)        
<WDC WD15EARS-00MVWB0 51.0AB51>    at scbus3 target 0 lun 0 (pass3,ada3)        
<USB Flash Disk 1100>              at scbus7 target 0 lun 0 (pass4,da0)  

Code:
[root@freenas ~]# gpart list
Geom name: ada0                                                                 
modified: false                                                                 
state: OK                                                                       
fwheads: 16                                                                     
fwsectors: 63                                                                   
last: 1953525134                                                                
first: 34                                                                       
entries: 128                                                                    
scheme: GPT                                                                     
Providers:                                                                      
1. Name: ada0p1                                                                 
   Mediasize: 2147483648 (2.0G)                                                 
   Sectorsize: 512                                                              
   Stripesize: 0                                                                
   Stripeoffset: 65536                                                          
   Mode: r1w1e1                                                                 
   rawuuid: aa4ec71e-d8b6-11e1-8a0f-f46d04922f3d                                
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b                                
   label: (null)                                                                
   length: 2147483648                                                           
   offset: 65536                                                                
   type: freebsd-swap                                                           
   index: 1       
   end: 4194431                                                                 
   start: 128                                                                   
2. Name: ada0p2                                                                 
   Mediasize: 998057319936 (929G)                                               
   Sectorsize: 512                                                              
   Stripesize: 0                                                                
   Stripeoffset: 2147549184                                                     
   Mode: r0w0e0                                                                 
   rawuuid: aa6251a6-d8b6-11e1-8a0f-f46d04922f3d                                
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b                                
   label: (null)                                                                
   length: 998057319936                                                         
   offset: 2147549184                                                           
   type: freebsd-ufs                                                            
   index: 2                                                                     
   end: 1953525134                                                              
   start: 4194432                                                               
Consumers:                                                                      
1. Name: ada0                                                                   
   Mediasize: 1000204886016 (931G) 
Sectorsize: 512                                                              
   Mode: r1w1e2                                                                 
                                                                                
Geom name: ada2                                                                 
modified: false                                                                 
state: OK                                                                       
fwheads: 16                                                                     
fwsectors: 63                                                                   
last: 5860533134                                                                
first: 34                                                                       
entries: 128                                                                    
scheme: GPT                                                                     
Providers:                                                                      
1. Name: ada2p1                                                                 
   Mediasize: 2147483648 (2.0G)                                                 
   Sectorsize: 512                                                              
   Stripesize: 4096                                                             
   Stripeoffset: 0                                                              
   Mode: r1w1e1                                                                 
   rawuuid: 49dabe2b-cf8b-11e1-b444-f46d04922f3d                                
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b                                
   label: (null)                                                                
   length: 2147483648       
   offset: 65536                                                                
   type: freebsd-swap                                                           
   index: 1                                                                     
   end: 4194431                                                                 
   start: 128                                                                   
2. Name: ada2p2                                                                 
   Mediasize: 2998445415936 (2.7T)                                              
   Sectorsize: 512                                                              
   Stripesize: 4096                                                             
   Stripeoffset: 0                                                              
   Mode: r1w1e2                                                                 
   rawuuid: 49ee92ce-cf8b-11e1-b444-f46d04922f3d                                
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b                                
   label: (null)                                                                
   length: 2998445415936                                                        
   offset: 2147549184                                                           
   type: freebsd-ufs                                                            
   index: 2                                                                     
   end: 5860533134                                                              
   start: 4194432                                                               
Consumers:                                                                      
1. Name: ada2                                                                   
   Mediasize: 3000592982016 (2.7T)
   Sectorsize: 512                                                              
   Stripesize: 4096                                                             
   Stripeoffset: 0                                                              
   Mode: r2w2e5                                                                 
                                                                                
Geom name: ada3                                                                 
modified: false                                                                 
state: OK                                                                       
fwheads: 16                                                                     
fwsectors: 63                                                                   
last: 2930277134                                                                
first: 34                                                                       
entries: 128                                                                    
scheme: GPT                                                                     
Providers:                                                                      
1. Name: ada3p1                                                                 
   Mediasize: 2147483648 (2.0G)                                                 
   Sectorsize: 512                                                              
   Stripesize: 4096                                                             
   Stripeoffset: 0                                                              
   Mode: r1w1e1     
   rawuuid: 6afff990-d678-11e1-a938-f46d04922f3d                                
   rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b                                
   label: (null)                                                                
   length: 2147483648                                                           
   offset: 65536                                                                
   type: freebsd-swap                                                           
   index: 1                                                                     
   end: 4194431                                                                 
   start: 128                                                                   
2. Name: ada3p2                                                                 
   Mediasize: 1498154343936 (1.4T)                                              
   Sectorsize: 512                                                              
   Stripesize: 4096                                                             
   Stripeoffset: 0                                                              
   Mode: r0w0e0                                                                 
   rawuuid: 6b1460c4-d678-11e1-a938-f46d04922f3d                                
   rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b                                
   label: (null)                                                                
   length: 1498154343936                                                        
   offset: 2147549184                                                           
   type: freebsd-ufs                                                            
   index: 2                                                                     
   end: 2930277134     
   start: 4194432                                                               
Consumers:                                                                      
1. Name: ada3                                                                   
   Mediasize: 1500301910016 (1.4T)                                              
   Sectorsize: 512                                                              
   Stripesize: 4096                                                             
   Stripeoffset: 0                                                              
   Mode: r1w1e2                                                                 


Somehow the new disk (ada1) doesn't even show up here.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
First, you shouldn't run a fsck command with the drive mounted. You can lose your data. In your case, I assume you have a backup since you just zeroed the disk.

Second, once you decided to do the disk wipe, the purpose of the gpart list was made mute. gpart list would have told me if your partition table was corrupt(it may have been repairable). Now that it has no partition table, it doesn't showup when you run gpart list. After you create a partition you should be able to run a gpart list and see it.

At this point, since the drive is zeroed out, I'd do a reboot, make sure the GUI looks correct. No drives that aren't mounted that should be, etc. Then go ahead and create your partition again in the GUI. That should fix everything.
 

hendrik.h

Dabbler
Joined
May 4, 2013
Messages
10
First, you shouldn't run a fsck command with the drive mounted.
I would have been happy if the disk would be mounted :D
In your case, I assume you have a backup since you just zeroed the disk.
I don't need a backup of an empty disk. I only zeroed it to delete the partition table.

After doing a reboot and attaching the disk with Volume Manager, the problem persists.

I am beginning to think that this has something to do with the specified path I am trying to mount it on, as the mount point is a folder on another disk.
Could that be it?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
I don't need a backup of an empty disk. I only zeroed it to delete the partition table.

Oops. Duh! I knew that.. I was confusing you with another thread of someone having problems mounting.

After doing a reboot and attaching the disk with Volume Manager, the problem persists.

I am beginning to think that this has something to do with the specified path I am trying to mount it on, as the mount point is a folder on another disk.
Could that be it?

I don't know. The way mounting works it shouldn't matter. It's different from Windows because you don't have the stupid Windows limitations.

It sounds to me almost like there is a discontinuity between the FreeNAS configuration and your actual configuration. But I don't know how to prove that is the problem, nor how to fix it except to reset your config to defaults and start over. Your data would be safe, but that's still a PITA. Things get really messy when you start doing mounts and unmounts from the command line. The GUI really needs to know what is going on so it can keep the configuration correct. For example, if you mount it from the GUI, then unmount it from the command line, the FreeNAS config gets messy. Then, too add to the mess, how do you fix it? The solution isn't necessarily to remount it manually and then all will be well.

The general rule that will never mess you up is to always do things in the GUI if the GUI can do what you need it to do. And be very cautious about what you want to do when the GUI doesn't support it.

If I were in your shoes I'd probably backup my current config file, reset the config to defaults and try to set everything up and see if you get the errors again.
 

hendrik.h

Dabbler
Joined
May 4, 2013
Messages
10
I never did anything over the console, except some clean-up-work on the share (e.g. delete some files, create dir, etc.).
Is there a way to create a partition table manually? Maybe this way i could work around the GUI doing this task, because IMO that's the point where the troubles begin.
This could explain why in the process of unmounting the console spits out "unknown file system".
 

hendrik.h

Dabbler
Joined
May 4, 2013
Messages
10
:D after some thinking I was able to solve the problem.
The disk could not be mounted successfully, because the mount point (folder on another disk) was either too long or it had spaces.
Now I shortened the folder name and left out any spaces. Suddenly everything works as it should.

Anyway thank you for your great effort and help in solving this!
 
Status
Not open for further replies.
Top