Formatted NAS from windows

olafbeserka

Cadet
Joined
Jun 16, 2022
Messages
7
TrueNAS-12.0-U7

Let me preface by saying I am not expert, just an enthusiast. If I use the wrong terminology I'm sorry.

I have a HP N54L with 4 drives. The 4 drives are split into 2 raid 1 pools. This is shared via SMB to my Win10 desktop. My main drive holds all of my family photos. The other week I went to format my daughters microsd for her tablet. The microsd was used for a pi or nintendo switch, so it didnt show up in File Manager. I went to Disk Management, deleted the volumes and then formatted. Turns out I deleted one of my shared drives from my NAS.

I didnt realize until a week later since I never use that drive except to backup photos. So now when I see the drive in File Manager nothing shows in the directory. But it shows the drive is 1/4 used. You can see here https://i.postimg.cc/2jKz720K/dummy.jpg

Is there any possibility to recover my data?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Possibly. You definitely cannot format a NAS drive in windows. At least not via SMB. So let's start with some commands you need to enter on the command line while logged in to your NAS via ssh. Then please post the output here.

First three:
Code:
zpool status
zfs list
testparm -s
 

olafbeserka

Cadet
Joined
Jun 16, 2022
Messages
7
Last login: Thu Jun 16 10:07:44 on pts/0
FreeBSD 12.2-RELEASE-p11 75566f060d4(HEAD) TRUENAS

TrueNAS (c) 2009-2021, iXsystems, Inc.
All rights reserved.
TrueNAS code is released under the modified BSD license with some
files copyrighted by (c) iXsystems, Inc.

For more information, documentation, help or support, go here:
http://truenas.com
Welcome to FreeNAS

Warning: settings changed through the CLI are not written to
the configuration database and will be reset on reboot.

root@freenas[~]# zpool status
pool: fn2
state: ONLINE
scan: scrub repaired 0B in 03:07:00 with 0 errors on Sun May 15 03:07:00 2022
config:

NAME STATE READ WRITE CKSUM
fn2 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gptid/c6c8b440-60d9-11ea-a207-2c768aadf61e ONLINE 0 0 0
gptid/c9283460-60d9-11ea-a207-2c768aadf61e ONLINE 0 0 0

errors: No known data errors

pool: freenas-boot
state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
the pool may no longer be accessible by software that does not support
the features. See zpool-features(5) for details.
scan: scrub repaired 0B in 00:00:25 with 0 errors on Tue Jun 14 03:45:25 2022
config:

NAME STATE READ WRITE CKSUM
freenas-boot ONLINE 0 0 0
ada4p2 ONLINE 0 0 0

errors: No known data errors

pool: freenas10tb
state: ONLINE
scan: scrub repaired 0B in 05:16:29 with 0 errors on Sun May 15 05:16:30 2022
config:

NAME STATE READ WRITE CKSUM
freenas10tb ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gptid/503bfe32-5e58-11ea-a6f2-2c768aadf61e ONLINE 0 0 0
gptid/5140261f-5e58-11ea-a6f2-2c768aadf61e ONLINE 0 0 0

errors: No known data errors
root@freenas[~]# zfs list
NAME USED AVAIL REFER MOUNTPOINT
fn2 1.32T 2.19T 88K /mnt/fn2
fn2/fn4tb 1.32T 2.19T 1.32T /mnt/fn2/fn4tb
freenas-boot 3.72G 104G 64K none
freenas-boot/ROOT 3.70G 104G 29K none
freenas-boot/ROOT/11.2-U8 206K 104G759M /
freenas-boot/ROOT/11.3-U5 234K 104G 1.02G /
freenas-boot/ROOT/FreeNAS-12.0-U7 3.70G 104G 1.21G /
freenas-boot/ROOT/Initial-Install 1K 104G756M legacy
freenas-boot/ROOT/default 196K 104G757M legacy
freenas10tb 2.70T 6.08T 88K /mnt/freenas10tb
freenas10tb/.system 892M 6.08T786M legacy
freenas10tb/.system/configs-9a9c823ea6d045b2b2330e3252de4f8d 79.8M 6.08T 79.8M legacy
freenas10tb/.system/cores 88K 1024M 88K legacy
freenas10tb/.system/rrd-9a9c823ea6d045b2b2330e3252de4f8d 19.9M 6.08T 19.9M legacy
freenas10tb/.system/samba4 3.30M 6.08T380K legacy
freenas10tb/.system/services 96K 6.08T 96K legacy
freenas10tb/.system/syslog-9a9c823ea6d045b2b2330e3252de4f8d 2.93M 6.08T 2.93M legacy
freenas10tb/.system/webui 88K 6.08T 88K legacy
freenas10tb/iocage 3.62G 6.08T 7.77M /mnt/freenas10tb/iocage
freenas10tb/iocage/download 403M 6.08T 96K /mnt/freenas10tb/iocage/download
freenas10tb/iocage/download/12.3-RELEASE 403M 6.08T403M /mnt/freenas10tb/iocage/download/12.3-RELEASE
freenas10tb/iocage/images 96K 6.08T 96K /mnt/freenas10tb/iocage/images
freenas10tb/iocage/jails 1.76G 6.08T 96K /mnt/freenas10tb/iocage/jails
freenas10tb/iocage/jails/homebridge 1.76G 6.08T284K /mnt/freenas10tb/iocage/jails/homebridge
freenas10tb/iocage/jails/homebridge/root 1.76G 6.08T 1.76G /mnt/freenas10tb/iocage/jails/homebridge/root
freenas10tb/iocage/log 100K 6.08T100K /mnt/freenas10tb/iocage/log
freenas10tb/iocage/releases 1.45G 6.08T 96K /mnt/freenas10tb/iocage/releases
freenas10tb/iocage/releases/12.3-RELEASE 1.45G 6.08T 96K /mnt/freenas10tb/iocage/releases/12.3-RELEASE
freenas10tb/iocage/releases/12.3-REL
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
There's at least the testparm output missing and probably some of the zfs list, too. Please do not use the web console - it's broken. Log in via SSH. Then enclose the copied output in code tags. Thanks.
 

olafbeserka

Cadet
Joined
Jun 16, 2022
Messages
7
Code:
root@freenas[~]# zpool status
zfs list
testparm -s
  pool: fn2
 state: ONLINE
  scan: scrub repaired 0B in 03:07:00 with 0 errors on Sun May 15 03:07:00 2022
config:

        NAME                                            STATE     READ WRITE CKSUM
        fn2                                             ONLINE       0     0     0
          mirror-0                                      ONLINE       0     0     0
            gptid/c6c8b440-60d9-11ea-a207-2c768aadf61e  ONLINE       0     0     0
            gptid/c9283460-60d9-11ea-a207-2c768aadf61e  ONLINE       0     0     0

errors: No known data errors

  pool: freenas-boot
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(5) for details.
  scan: scrub repaired 0B in 00:00:25 with 0 errors on Tue Jun 14 03:45:25 2022
config:

        NAME          STATE     READ WRITE CKSUM
        freenas-boot  ONLINE       0     0     0
          ada4p2      ONLINE       0     0     0

errors: No known data errors

  pool: freenas10tb
 state: ONLINE
  scan: scrub repaired 0B in 05:16:29 with 0 errors on Sun May 15 05:16:30 2022
config:

        NAME                                            STATE     READ WRITE CKSUM
        freenas10tb                                     ONLINE       0     0     0
          mirror-0                                      ONLINE       0     0     0
            gptid/503bfe32-5e58-11ea-a6f2-2c768aadf61e  ONLINE       0     0     0
            gptid/5140261f-5e58-11ea-a6f2-2c768aadf61e  ONLINE       0     0     0

errors: No known data errors
NAME                                                           USED  AVAIL     REFER  MOUNTPOINT
fn2                                                           1.32T  2.19T       88K  /mnt/fn2
fn2/fn4tb                                                     1.32T  2.19T     1.32T  /mnt/fn2/fn4tb
freenas-boot                                                  3.72G   104G       64K  none
freenas-boot/ROOT                                             3.70G   104G       29K  none
freenas-boot/ROOT/11.2-U8                                      206K   104G      759M  /
freenas-boot/ROOT/11.3-U5                                      234K   104G     1.02G  /
freenas-boot/ROOT/FreeNAS-12.0-U7                             3.70G   104G     1.21G  /
freenas-boot/ROOT/Initial-Install                                1K   104G      756M  legacy
freenas-boot/ROOT/default                                      196K   104G      757M  legacy
freenas10tb                                                   2.70T  6.08T       88K  /mnt/freenas10tb
freenas10tb/.system                                            892M  6.08T      786M  legacy
freenas10tb/.system/configs-9a9c823ea6d045b2b2330e3252de4f8d  79.9M  6.08T     79.9M  legacy
freenas10tb/.system/cores                                       88K  1024M       88K  legacy
freenas10tb/.system/rrd-9a9c823ea6d045b2b2330e3252de4f8d      20.1M  6.08T     20.1M  legacy
freenas10tb/.system/samba4                                    3.34M  6.08T      388K  legacy
freenas10tb/.system/services                                    96K  6.08T       96K  legacy
freenas10tb/.system/syslog-9a9c823ea6d045b2b2330e3252de4f8d   2.98M  6.08T     2.98M  legacy
freenas10tb/.system/webui                                       88K  6.08T       88K  legacy
freenas10tb/iocage                                            3.62G  6.08T     7.77M  /mnt/freenas10tb/iocage
freenas10tb/iocage/download                                    403M  6.08T       96K  /mnt/freenas10tb/iocage/download
freenas10tb/iocage/download/12.3-RELEASE                       403M  6.08T      403M  /mnt/freenas10tb/iocage/download/12.3-RELEASE
freenas10tb/iocage/images                                       96K  6.08T       96K  /mnt/freenas10tb/iocage/images
freenas10tb/iocage/jails                                      1.77G  6.08T       96K  /mnt/freenas10tb/iocage/jails
freenas10tb/iocage/jails/homebridge                           1.77G  6.08T      284K  /mnt/freenas10tb/iocage/jails/homebridge
freenas10tb/iocage/jails/homebridge/root                      1.77G  6.08T     1.77G  /mnt/freenas10tb/iocage/jails/homebridge/root
freenas10tb/iocage/log                                         100K  6.08T      100K  /mnt/freenas10tb/iocage/log
freenas10tb/iocage/releases                                   1.45G  6.08T       96K  /mnt/freenas10tb/iocage/releases
freenas10tb/iocage/releases/12.3-RELEASE                      1.45G  6.08T       96K  /mnt/freenas10tb/iocage/releases/12.3-RELEASE
freenas10tb/iocage/releases/12.3-RELEASE/root                 1.45G  6.08T     1.45G  /mnt/freenas10tb/iocage/releases/12.3-RELEASE/root
freenas10tb/iocage/templates                                    96K  6.08T       96K  /mnt/freenas10tb/iocage/templates
freenas10tb/nas10                                             2.70T  6.08T     2.70T  /mnt/freenas10tb/nas10
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE

# Global parameters
[global]
        aio max threads = 2
        bind interfaces only = Yes
        disable spoolss = Yes
        dns proxy = No
        enable web service discovery = Yes
        kernel change notify = No
        load printers = No
        logging = file
        map to guest = Bad User
        max log size = 5120
        nsupdate command = /usr/local/bin/samba-nsupdate -g
        registry shares = Yes
        server role = standalone server
        server string = FreeNAS Server
        unix extensions = No
        idmap config *: range = 90000001-100000000
        idmap config * : backend = tdb
        directory name cache size = 0
        dos filemode = Yes


[nas10]
        ea support = No
        guest ok = Yes
        path = /mnt/freenas10tb/nas10
        read only = No
        vfs objects = zfs_space zfsacl streams_xattr
        nfs4:chown = true


[fn4tb]
        ea support = No
        guest ok = Yes
        path = /mnt/fn2/fn4tb
        read only = No
        vfs objects = zfs_space zfsacl streams_xattr
        nfs4:chown = true
root@freenas[~]# >....
freenas10tb/.system                                            892M  6.08T      786M  legacy
freenas10tb/.system/configs-9a9c823ea6d045b2b2330e3252de4f8d  79.9M  6.08T     79.9M  legacy
freenas10tb/.system/cores                                       88K  1024M       88K  legacy
freenas10tb/.system/rrd-9a9c823ea6d045b2b2330e3252de4f8d      20.1M  6.08T     20.1M  legacy
freenas10tb/.system/samba4                                    3.34M  6.08T      388K  legacy
freenas10tb/.system/services                                    96K  6.08T       96K  legacy
freenas10tb/.system/syslog-9a9c823ea6d045b2b2330e3252de4f8d   2.98M  6.08T     2.98M  legacy
freenas10tb/.system/webui                                       88K  6.08T       88K  legacy
freenas10tb/iocage                                            3.62G  6.08T     7.77M  /mnt/freenas10tb/iocage
freenas10tb/iocage/download                                    403M  6.08T       96K  /mnt/freenas10tb/iocage/download
freenas10tb/iocage/download/12.3-RELEASE                       403M  6.08T      403M  /mnt/freenas10tb/iocage/download/12.3-RELEASE
freenas10tb/iocage/images                                       96K  6.08T       96K  /mnt/freenas10tb/iocage/images
freenas10tb/iocage/jails                                      1.77G  6.08T       96K  /mnt/freenas10tb/iocage/jails
freenas10tb/iocage/jails/homebridge                           1.77G  6.08T      284K  /mnt/freenas10tb/iocage/jails/homebridge
freenas10tb/iocage/jails/homebridge/root                      1.77G  6.08T     1.77G  /mnt/freenas10tb/iocage/jails/homebridge/root
freenas10tb/iocage/log                                         100K  6.08T      100K  /mnt/freenas10tb/iocage/log
freenas10tb/iocage/releases                                   1.45G  6.08T       96K  /mnt/freenas10tb/iocage/releases
freenas10tb/iocage/releases/12.3-RELEASE                      1.45G  6.08T       96K  /mnt/freenas10tb/iocage/releases/12.3-RELEASE
freenas10tb/iocage/releases/12.3-RELEASE/root                 1.45G  6.08T     1.45G  /mnt/freenas10tb/iocage/releases/12.3-RELEASE/root
freenas10tb/iocage/templates                                    96K  6.08T       96K  /mnt/freenas10tb/iocage/templates
freenas10tb/nas10                                             2.70T  6.08T     2.70T  /mnt/freenas10tb/nas10
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE

# Global parameters
[global]
        aio max threads = 2
        bind interfaces only = Yes
        disable spoolss = Yes
        dns proxy = No
        enable web service discovery = Yes
        kernel change notify = No
        load printers = No
        logging = file
        map to guest = Bad User
        max log size = 5120
        nsupdate command = /usr/local/bin/samba-nsupdate -g
        registry shares = Yes
        server role = standalone server
        server string = FreeNAS Server
        unix extensions = No
        idmap config *: range = 90000001-100000000
        idmap config * : backend = tdb
        directory name cache size = 0
        dos filemode = Yes


[nas10]
        ea support = No
        guest ok = Yes
        path = /mnt/freenas10tb/nas10
        read only = No
        vfs objects = zfs_space zfsacl streams_xattr
        nfs4:chown = true


[fn4tb]
        ea support = No
        guest ok = Yes
        path = /mnt/fn2/fn4tb
        read only = No
        vfs objects = zfs_space zfsacl streams_xattr
        nfs4:chown = true
root@freenas[~]#


There's at least the testparm output missing and probably some of the zfs list, too. Please do not use the web console - it's broken. Log in via SSH. Then enclose the copied output in code tags. Thanks.
hopefully this is complete this time.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
So you have two SMB shares in two different pools that to me look like this:
share nameNAS pathcapacity used
nas10/mnt/freenas10tb/nas102.70T
fn4tb/mnt/fn2/fn4tb1.32T

If you do something like this in the shell:
Code:
cd /mnt/freenas10tb/nas10
ls -lR
cd /mnt/fn2/fn4tb
ls -lR

you will probably find that all your data is still there. Is that the case? That's what I wanted to assess first.

Why your Windows system presents the volume in this weird way, I don't know. Others with a better knowledge of Windows and Samba will have to step in here.
 

olafbeserka

Cadet
Joined
Jun 16, 2022
Messages
7
So you have two SMB shares in two different pools that to me look like this:
share nameNAS pathcapacity used
nas10/mnt/freenas10tb/nas102.70T
fn4tb/mnt/fn2/fn4tb1.32T

If you do something like this in the shell:
Code:
cd /mnt/freenas10tb/nas10
ls -lR
cd /mnt/fn2/fn4tb
ls -lR

you will probably find that all your data is still there. Is that the case? That's what I wanted to assess first.

Why your Windows system presents the volume in this weird way, I don't know. Others with a better knowledge of Windows and Samba will have to step in here.
so nas10 is the one that is messed up. When i ran the command for that specific volume, it DOES show my files there! It hasnt finished loading everything yet, but so far I do recognize the directories and files. Which makes me very happy, but also still need to figure out how to access. It. Thank you so much for the help so far!
 

olafbeserka

Cadet
Joined
Jun 16, 2022
Messages
7
I had help on another forum. Basically since its impossible for windows to delete/format the truenas mapped drives all the data was still there. I just needed to remap the drive and everything showed up.
 
Top