*New 12.1 series Release:
2020-09-13: XigmaNAS 12.1.0.4.7743 - released

*New 11.4 series Release:
2020-09-12: XigmaNAS 11.4.0.4.7741 - released!


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

[REQUEST] Option for zfs pool on GPT labels

Post/Debate your Suggestions & Requests of XigmaNAS here. This ONLY pertains to XigmaNAS.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
MikeMac
Forum Moderator
Forum Moderator
Posts: 444
Joined: 07 Oct 2012 23:12
Location: Moscow, Russia
Contact:
Status: Offline

[REQUEST] Option for zfs pool on GPT labels

#1

Post by MikeMac »

I use my nas4free NAS with zfs pool on GPT labels, not raw disks or even numbers of GPT partitions

Code: Select all

nas4free ~/ root~$ zpool status
  pool: Pool
 state: ONLINE
  scan: resilvered 116K in 0h0m with 0 errors on Wed Nov 30 00:28:10 2016
config:

        NAME                STATE     READ WRITE CKSUM
        Pool                ONLINE       0     0     0
          raidz2-0          ONLINE       0     0     0
            gpt/D_Z300V843  ONLINE       0     0     0
            gpt/D_Z300W3TK  ONLINE       0     0     0
            gpt/D_W300DZ5A  ONLINE       0     0     0
            gpt/D_W300E0RC  ONLINE       0     0     0
            gpt/D_Z30053GL  ONLINE       0     0     0
            gpt/D_Z300PRXX  ONLINE       0     0     0
            gpt/D_Z300V7PE  ONLINE       0     0     0
            gpt/D_Z300V7AV  ONLINE       0     0     0

errors: No known data errors

  pool: WD2T
 state: ONLINE
  scan: none requested
config:

        NAME                  STATE     READ WRITE CKSUM
        WD2T                  ONLINE       0     0     0
          gpt/D_WCAZAA099483  ONLINE       0     0     0

errors: No known data errors
Due to this I am quite free from disk numbers change problem then I add, remove or rearrange disks, or even SATA/SAS controllers because gpt labels are stable.

I have created this in CLI, alike

Code: Select all

gpart add -t freebsd-zfs -l D_WMAVU0055531 -a 4K /dev/da0
and then syncronize pools wirh Disks > ZFS > Configuration > Synchronize

I hope option for creating zfs pools on GPT labes could be added to webgui

May be at Disks > Management > HDD Format > Step 2

This case already existing parameter "Volume label" could be used as GPT label. I set ones in accrding with HDD serial numbers. Also I phisically mark disks. This help in troublesooting
12480_original.jpg
PS Of course, pools on raw disks could not be converted to pool on GPT labels, at least without recreation
But this is possible for pools on GPT partition numbers

Code: Select all

nas4free: ~# gpart modify -i 1 -l VB763b8b793c8d656d /dev/ada2
ada2p1 modified

nas4free: ~# zpool export TestPool
nas4free: ~# zpool import -d /dev/gpt -f -a 
But I'm not sure if this trick is suitable for webgui.
You do not have the required permissions to view the files attached to this post.

User avatar
MikeMac
Forum Moderator
Forum Moderator
Posts: 444
Joined: 07 Oct 2012 23:12
Location: Moscow, Russia
Contact:
Status: Offline

Re: [REQUEST] Option for zfs pool on GPT labels

#2

Post by MikeMac »

I, of course, use this on my NAS. Today I reconnect one of disks from LSI SAS controller to chipset SATA (I need SAS for LTO tape device)
Of course ZFS pools on GPT labels remains intact
Image
despite of changes in da/ada numbers. Pay attention on disk with S/N Z3002AV, ex da7 now ada0
Image
Image

User avatar
ms49434
Developer
Developer
Posts: 994
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: [REQUEST] Option for zfs pool on GPT labels

#3

Post by ms49434 »

All steps you performed using CLI are available in the WebGUI.

HDD Format covers: gpart add -t freebsd-zfs -l D_WMAVU0055531 -a 4K /dev/da0
Format Options (preparing all disks da0-da5 in one go)

Code: Select all

File System	ZFS Storage Pool	
Volume Label	disk%0
GPT Partition	Create ZFS on a GPT partition.
Erase MBR	Do not erase the Master Boot Record (useful for some RAID controller cards).
Disk Selection
	Device	Serial Number	Size	Path	Filesystem	Reason Code	Toolbox
	ada0		4.29GB	/dev/ada0	UFS	Device contains boot partition	
x	da0		2.15GB	/dev/da0	ZFS Storage Pool		
x	da1		2.15GB	/dev/da1	ZFS Storage Pool		
x	da2		2.15GB	/dev/da2	ZFS Storage Pool		
x	da3		2.15GB	/dev/da3	ZFS Storage Pool		
x	da4		2.15GB	/dev/da4	ZFS Storage Pool		
x	da5		2.15GB	/dev/da5	ZFS Storage Pool		

Creating the vdevs and the pools are done using da0p1, da1p1...
Pool Information & Status

Code: Select all

Information	
  pool: P
 state: ONLINE
  scan: none requested
config:

	NAME        STATE     READ WRITE CKSUM
	P           ONLINE       0     0     0
	  mirror-0  ONLINE       0     0     0
	    da0p1   ONLINE       0     0     0
	    da1p1   ONLINE       0     0     0
	  mirror-1  ONLINE       0     0     0
	    da2p1   ONLINE       0     0     0
	    da3p1   ONLINE       0     0     0
	  mirror-2  ONLINE       0     0     0
	    da4p1   ONLINE       0     0     0
	    da5p1   ONLINE       0     0     0

errors: No known data errors

Tools support: zpool export TestPool
Tools support: zpool import -d /dev/gpt -f -a
ZFS Pool Tools

Code: Select all

Activity	List or import pools
Parameter
	Force Operation
x	Search for and import all disks found
x	Import using GPT labels
	Import using GPT ID

Don't forget to synchronize your configuration after you performed the above steps.

ZFS Pool Tools

Code: Select all

Activity	Display ZFS command history
Output	Command	zpool history
Output	History for 'P':
2017-05-29.21:53:03 zpool create -m /mnt/P P mirror /dev/da0p1 /dev/da1p1 mirror /dev/da2p1 /dev/da3p1 mirror /dev/da4p1 /dev/da5p1
2017-05-29.21:53:29 zpool export P
2017-05-29.21:53:47 zpool import -a -d /dev/gpt

Success	Command execution was successful

Pool Information & Status

Code: Select all

Information	
  pool: P
 state: ONLINE
  scan: none requested
config:

	NAME           STATE     READ WRITE CKSUM
	P              ONLINE       0     0     0
	  mirror-0     ONLINE       0     0     0
	    gpt/disk0  ONLINE       0     0     0
	    gpt/disk1  ONLINE       0     0     0
	  mirror-1     ONLINE       0     0     0
	    gpt/disk2  ONLINE       0     0     0
	    gpt/disk3  ONLINE       0     0     0
	  mirror-2     ONLINE       0     0     0
	    gpt/disk4  ONLINE       0     0     0
	    gpt/disk5  ONLINE       0     0     0

errors: No known data errors

What WebGUI cannot do is:
- Create vdevices directly by selecting from GPT labels
- Modify GPT labels
1) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, L2ARC: Samsung 850 Pro; Pool 2: 1x Samsung 860 EVO 1TB, SLOG: Samsung SM883, services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.1.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U3, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

Post Reply

Return to “Suggestions & Requests”