Pool importing with empty datasets

Status
Not open for further replies.

LostFate

Dabbler
Joined
Aug 6, 2013
Messages
27
Peculiar... Just humor me here... but type in:

Code:
cd /vol2/MainDataSet
ls


Sound absolutely bizarre... but comparing my mount points to yours, your system is mounting at the root instead of in the mnt folder. *cough*
 

rafadavidc

Dabbler
Joined
Mar 26, 2016
Messages
38
Code:
[root@freenas ~]# cd ..
[root@freenas /]# ls
.cshrc compat lib rescue var
.profile conf libexec root zfsd.core
.rnd data media sbin
COPYRIGHT dev mnt sys
bin entropy nonexistent tmp
boot etc proc usr
[root@freenas /]# cd vol2
bash: cd: vol2: No such file or directory
[root@freenas /]#
 

LostFate

Dabbler
Joined
Aug 6, 2013
Messages
27
Can I get a:
Code:
zfs get all vol2


It might be necessary to use SSH or "| less" to get the full output. Mostly interested in the mount point but who knows what other fun stuff we will find.
 

rafadavidc

Dabbler
Joined
Mar 26, 2016
Messages
38
Code:
[root@freenas] ~# zfs get all vol2
NAME  PROPERTY              VALUE                  SOURCE
vol2  type                  filesystem             -
vol2  creation              Fri Apr  1 18:35 2016  -
vol2  used                  1.38T                  -
vol2  available             385G                   -
vol2  referenced            96K                    -
vol2  compressratio         1.00x                  -
vol2  mounted               yes                    -
vol2  quota                 none                   default
vol2  reservation           none                   default
vol2  recordsize            128K                   default
vol2  mountpoint            /mnt/vol2              default
vol2  sharenfs              off                    default
vol2  checksum              on                     default
vol2  compression           lz4                    local
vol2  atime                 on                     default
vol2  devices               on                     default
vol2  exec                  on                     default
vol2  setuid                on                     default
vol2  readonly              off                    default
vol2  jailed                off                    default
vol2  snapdir               hidden                 default
vol2  aclmode               passthrough            local
vol2  aclinherit            passthrough            local
vol2  canmount              on                     default
vol2  xattr                 off                    temporary
vol2  copies                1                      default
vol2  version               5                      -
vol2  utf8only              off                    -
vol2  normalization         none                   -
vol2  casesensitivity       sensitive              -
vol2  vscan                 off                    default
vol2  nbmand                off                    default
vol2  sharesmb              off                    default
vol2  refquota              none                   default
vol2  refreservation        none                   default
vol2  primarycache          all                    default
vol2  secondarycache        all                    default
vol2  usedbysnapshots       256K                   -
vol2  usedbydataset         96K                    -
vol2  usedbychildren        1.38T                  -
vol2  usedbyrefreservation  0                      -
vol2  logbias               latency                default
vol2  dedup                 off                    default
vol2  mlslabel                                     -
vol2  sync                  standard               default
vol2  refcompressratio      1.00x                  -
vol2  written               64K                    -
vol2  logicalused           1.39T                  -
vol2  logicalreferenced     35K                    -
vol2  volmode               default                default
vol2  filesystem_limit      none                   default
vol2  snapshot_limit        none                   default
vol2  filesystem_count      none                   default
vol2  snapshot_count        none                   default
vol2  redundant_metadata    all                    default
[root@freenas] ~#
 

LostFate

Dabbler
Joined
Aug 6, 2013
Messages
27
Try running:

Code:
cd /mnt/vol2/MainDataSet
chown -R root:wheel ./
chmod -R 755 ./
ls


Maybe it doesn't traverse the dataset boundary (I don't believe that CIFS does anyways).

Edit: If it doesn't work, give me a:
Code:
zfs get all vol2/MainDataSet
 

rafadavidc

Dabbler
Joined
Mar 26, 2016
Messages
38
Nothin in there but them chickens. :/
Same results from chown/chmod with the other data set.
Code:
[root@freenas] ~# cd /mnt/vol2/MainDataSet
[root@freenas] /mnt/vol2/MainDataSet# ls
./  ../
[root@freenas] /mnt/vol2/MainDataSet# chown -R root:wheel ./
[root@freenas] /mnt/vol2/MainDataSet# chmod -R 755 ./
[root@freenas] /mnt/vol2/MainDataSet# ls
./  ../
[root@freenas] /mnt/vol2/MainDataSet# zfs get all ./
NAME              PROPERTY              VALUE                  SOURCE
vol2/MainDataSet  type                  filesystem             -
vol2/MainDataSet  creation              Fri Apr  1 18:38 2016  -
vol2/MainDataSet  used                  239G                   -
vol2/MainDataSet  available             385G                   -
vol2/MainDataSet  referenced            1.85M                  -
vol2/MainDataSet  compressratio         1.02x                  -
vol2/MainDataSet  mounted               yes                    -
vol2/MainDataSet  quota                 none                   local
vol2/MainDataSet  reservation           none                   local
vol2/MainDataSet  recordsize            128K                   default
vol2/MainDataSet  mountpoint            /mnt/vol2/MainDataSet  default
vol2/MainDataSet  sharenfs              off                    default
vol2/MainDataSet  checksum              on                     default
vol2/MainDataSet  compression           lz4                    inherited from vol2
vol2/MainDataSet  atime                 on                     default
vol2/MainDataSet  devices               on                     default
vol2/MainDataSet  exec                  on                     default
vol2/MainDataSet  setuid                on                     default
vol2/MainDataSet  readonly              off                    default
vol2/MainDataSet  jailed                off                    default
vol2/MainDataSet  snapdir               hidden                 default
vol2/MainDataSet  aclmode               restricted             local
vol2/MainDataSet  aclinherit            passthrough            inherited from vol2
vol2/MainDataSet  canmount              on                     default
vol2/MainDataSet  xattr                 off                    temporary
vol2/MainDataSet  copies                1                      default
vol2/MainDataSet  version               5                      -
vol2/MainDataSet  utf8only              off                    -
vol2/MainDataSet  normalization         none                   -
vol2/MainDataSet  casesensitivity       sensitive              -
vol2/MainDataSet  vscan                 off                    default
vol2/MainDataSet  nbmand                off                    default
vol2/MainDataSet  sharesmb              off                    default
vol2/MainDataSet  refquota              none                   local
vol2/MainDataSet  refreservation        none                   local
vol2/MainDataSet  primarycache          all                    default
vol2/MainDataSet  secondarycache        all                    default
vol2/MainDataSet  usedbysnapshots       239G                   -
vol2/MainDataSet  usedbydataset         1.85M                  -
vol2/MainDataSet  usedbychildren        0                      -
vol2/MainDataSet  usedbyrefreservation  0                      -
vol2/MainDataSet  logbias               latency                default
vol2/MainDataSet  dedup                 off                    default
vol2/MainDataSet  mlslabel                                     -
vol2/MainDataSet  sync                  standard               default
vol2/MainDataSet  refcompressratio      1.00x                  -
vol2/MainDataSet  written               472K                   -
vol2/MainDataSet  logicalused           245G                   -
vol2/MainDataSet  logicalreferenced     935K                   -
vol2/MainDataSet  volmode               default                default
vol2/MainDataSet  filesystem_limit      none                   default
vol2/MainDataSet  snapshot_limit        none                   default
vol2/MainDataSet  filesystem_count      none                   default
vol2/MainDataSet  snapshot_count        none                   default
vol2/MainDataSet  redundant_metadata    all                    default
[root@freenas] /mnt/vol2/MainDataSet#
 

LostFate

Dabbler
Joined
Aug 6, 2013
Messages
27
Try this:

Code:
zfs set aclmode=passthrough vol2/MainDataSet
cd /mnt/vol2/MainDataSet
chown -R root:wheel ./
chmod -R 755 ./
ls
 

LostFate

Dabbler
Joined
Aug 6, 2013
Messages
27
Can I get another:
Code:
zfs get all vol2/MainDataSet

for confirmation that it took the command (and actually did what it was supposed to do)?

Sounds silly but might be worth while to power cycle your system at this point just to verify none of the settings require a dismount and remount to take.
 

LostFate

Dabbler
Joined
Aug 6, 2013
Messages
27
HOLD IT!... Says your dataset is only using 1.85MB and everything else is in snapshots. How much data was supposed to be in here? Hopefully one of those snapshots is recent. You might be able to rollback.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
You have ran so many crazy commands I think you are worse off then when you started. This sounds like a simple problem of you created a dataset with the same name as the directory you where using.

Try to run zfs unmount vol2/MainDataSet then see if your data shows up? If not you can just remount that dataset or reboot and things will be as if you never ran that command.
 

LostFate

Dabbler
Joined
Aug 6, 2013
Messages
27
Not really. We have done nothing but change read/write permissions, ownership, and read zfs configuration parameters.

Your suggestion is fine (totally go for it, there isn't a major downside) but the output from the commands says that it's not likely to work.

It clearly states in "zfs get all vol2/MainDataSet" (specifically under "usedbysnapshots" and "usedbydataset") that something hit the fan before hand and dropped his data out of the set. Should be able to restore from the snapshots.
 

rafadavidc

Dabbler
Joined
Mar 26, 2016
Messages
38
HOLD IT!... Says your dataset is only using 1.85MB and everything else is in snapshots. How much data was supposed to be in here? Hopefully one of those snapshots is recent. You might be able to rollback.
Okay, I did not catch that. Here's the snapshots, with a depressingly familiar ls.
Code:
[root@freenas] /# cd /mnt/vol2/.zfs/snapshot
[root@freenas] /mnt/vol2/.zfs/snapshot# ls
./                     auto-20160413.0138-2w/ auto-20160417.0538-2w/
../                    auto-20160413.0538-2w/ auto-20160417.0938-2w/
auto-20160407.0900-2w/ auto-20160413.0938-2w/ auto-20160417.1338-2w/
auto-20160407.1300-2w/ auto-20160413.1338-2w/ auto-20160417.1738-2w/
auto-20160407.1700-2w/ auto-20160413.1738-2w/ auto-20160417.2138-2w/
auto-20160408.0900-2w/ auto-20160413.2138-2w/ auto-20160418.0138-2w/
auto-20160408.1300-2w/ auto-20160414.0138-2w/ auto-20160418.0538-2w/
auto-20160408.1700-2w/ auto-20160414.0538-2w/ auto-20160418.0938-2w/
auto-20160409.0900-2w/ auto-20160414.0938-2w/ auto-20160418.1338-2w/
auto-20160409.1300-2w/ auto-20160414.1338-2w/ auto-20160418.1619-2m/
auto-20160409.1700-2w/ auto-20160414.1738-2w/ auto-20160418.1738-2w/
auto-20160410.0900-2w/ auto-20160414.2138-2w/ auto-20160418.2138-2w/
auto-20160410.1300-2w/ auto-20160415.0138-2w/ auto-20160419.0138-2w/
auto-20160410.1700-2w/ auto-20160415.0538-2w/ auto-20160419.0538-2w/
auto-20160411.0900-2w/ auto-20160415.0938-2w/ auto-20160419.0938-2w/
auto-20160411.1300-2w/ auto-20160415.1338-2w/ auto-20160419.1338-2w/
auto-20160411.1619-2m/ auto-20160415.1738-2w/ auto-20160419.1738-2w/
auto-20160411.1700-2w/ auto-20160415.2138-2w/ auto-20160419.2138-2w/
auto-20160411.2138-2w/ auto-20160416.0138-2w/ auto-20160420.0138-2w/
auto-20160412.0138-2w/ auto-20160416.0538-2w/ auto-20160420.0538-2w/
auto-20160412.0538-2w/ auto-20160416.0938-2w/ auto-20160420.0938-2w/
auto-20160412.0938-2w/ auto-20160416.1338-2w/ auto-20160420.1338-2w/
auto-20160412.1338-2w/ auto-20160416.1738-2w/ auto-20160420.1738-2w/
auto-20160412.1738-2w/ auto-20160416.2138-2w/
auto-20160412.2138-2w/ auto-20160417.0138-2w/
[root@freenas] /mnt/vol2/.zfs/snapshot# cd auto-20160417.0138-2w/
[root@freenas] /mnt/vol2/.zfs/snapshot/auto-20160417.0138-2w# ls
./            ../           MainDataSet/  MediaDataSet/ jails/
[root@freenas] /mnt/vol2/.zfs/snapshot/auto-20160417.0138-2w# cd MainDataSet
[root@freenas] /mnt/vol2/.zfs/snapshot/auto-20160417.0138-2w/MainDataSet# ls
./  ../
[root@freenas] /mnt/vol2/.zfs/snapshot/auto-20160417.0138-2w/MainDataSet#


I can't do a zfs rollback because that's for datasets, and zpool doesn't have a rollback. So... what now?

Edit - WHAT NOW IS I ROLL THE DATASETS BACK RIGHT IN THE WEB GUI JESUS CHRIST

Thank you so much for seeing the dataset usage fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu-

MainDataSet is back, working on the others now.

Wheeeeeeeeeewwwwwwwwwwwwwwwwwwwwwww
 
Last edited:

rafadavidc

Dabbler
Joined
Mar 26, 2016
Messages
38
OK, my CIFS shares are back up, and everything is in them.

My jail datasets are also back, but none of the jails are installed. When I install those jails, I'll get MineOS_2 and Plex_2, etc.

How can I restore my old config from the legacy mount point, or how can I install these plugins, then migrate the data in the _1 locations to the _2 locations?

(Really, I'd rather have my old config back.)
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
I'll also point out that data just doesn't disappear so someone deleted everything in those datasets at some point. Just be cations with what commands you are running on the cli and what they actually do.
 

LostFate

Dabbler
Joined
Aug 6, 2013
Messages
27
Glad to hear that your data is back. For those jails, you'll want to mount the old ones and dig through the directories for their configs. You'll then copy the configs over to the new ones and restart the jails. I can't help you with where the configs would be stored (depends on the software in the jail). When my Plex jail gets hosed, I usually just build a new Plex instance from scratch and reimport all my media.

Agreed with SweetAndLow though. If ever you need clarification on what a command does, feel free to ask. Some commands sound terrifying and are actually fine... Some sound fine but can hose all your data ("rm -rf /" sounds pretty benign).
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
I'm a bit late, but the mountpoint in zfs list was /vol2/blahblahblah, and you were "ls'ing" /mnt/vol2/blahblahblah. do you have a /vol2 folder to hold the mountpoint? normally everything is mounted under /mnt, which is likely the reason they were showing up in the GUI.
 

rafadavidc

Dabbler
Joined
Mar 26, 2016
Messages
38
cd /vol2/ was giving me a 'no such folder' type of error. The only way I could cd into /vol2/ was by going through /mnt/.

As an update, I decided to wipe my jails and start over with them. There was nothing critical about them; one was a TS3 server (I posted about it on these forums a few months ago), one was a minecraft server for my daughter and me to putz around in, and one was a Plex server. My daughter and I lose our little world, but that's fine, I'll just find us a cool seed to goof around with. Everything else can just be set up again.
 

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
cd /vol2/ was giving me a 'no such folder' type of error. The only way I could cd into /vol2/ was by going through /mnt/.

As an update, I decided to wipe my jails and start over with them. There was nothing critical about them; one was a TS3 server (I posted about it on these forums a few months ago), one was a minecraft server for my daughter and me to putz around in, and one was a Plex server. My daughter and I lose our little world, but that's fine, I'll just find us a cool seed to goof around with. Everything else can just be set up again.
That's probably why nothing was showing up. The ZFS mountpoint pointed to a location (/vol2) that didn't exist. /mnt/vol2 DOES exist, but nothing is mounted there, so nothing is listed.
 

rafadavidc

Dabbler
Joined
Mar 26, 2016
Messages
38
I don't understand why that would have been. Once I reinstalled FreeNAS, the first thing I did was import the extant volume. The datasets were there, jails and all; the two important datasets were empty, though. Snapshots were all there, though.
 
Status
Not open for further replies.
Top