Question Regarding Making a Zvol with existing FileSystem

Golgi

Cadet
Joined
Jan 25, 2022
Messages
2
1643137018858.png

Unfortunately because I was a novice, When creating my Truenas Setup, I put all my files in the Root Filesystem of the HHD rather than making a Zvol called storage or somthing.. Is there a way I can move the existing data in root into a Zvol
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
No, you do not want to move your data into a zvol. A zvol is a block device backed by a ZFS pool, not a POSIX filesystem.

What you really need to do is move your data into datasets. A dataset does implement a POSIX filesystem with the relevant bells and whistles, such as "files", "permissions" and "directories".

Fortunately, this is pretty easy:
  1. Create datasets - they're so cheap as to be free, so take a more is better approach when deciding if something should be a directory or a dataset. Careful to avoid name collisions with existing directories, they're a pain to diagnose and repair, and easy to avoid.
  2. Use your favorite tool to move the data from the directory inside the top-level dataset to the dataset(s) you just created. SFTP (filezilla, the sftp Unix utility); Midnight Commander (mc), rsync or even plain old mv via SSH or on the local console... Lots of options, pick your favorite.
 

Golgi

Cadet
Joined
Jan 25, 2022
Messages
2
Thanks for the Advice! Are there any good practices or naming conventions when setting up these datasets? What do you do personally?
 

Cloudified

Dabbler
Joined
Jan 21, 2022
Messages
42
Thanks for the Advice! Are there any good practices or naming conventions when setting up these datasets? What do you do personally?
Don't forget that any UNIX-style OS file system is case-sensitive, so keep that in mind. I personally do not like to use upper-case in my file or directory naming. Same with pools.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Similar. I name all my datasets strictly lower case and without blanks. Then I name the shares I create on top of them "human friendly" because they are rarely typed in and most frequently browsed to in some file manager.

Second I group all similar datasets under one additional top level like "share" (for SMB shares), "data" (for datasets mounted into jails), "vms" (for VM virtual disk zvols), ... you get the idea.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
I use something like this;

pool/media
pool/storage
pool/storage/ISO
pool/storage/docs
pool/storage/software
pool/backup
pool/backup/CLIENT1
pool/backup/CLIENT2
...
 
Top