You are not logged in.

#1 2013-09-30 04:09:16

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

[solved] format a zfs drive to what, with what

Im going to rebuild my zfs array, and im not sure i did it right the first time.  Can somebody please point out to me what command line tool to use, and what filesystem i need to be putting on there?  I once thought it was a zfs file system, but is this just a layer on top of another filesystem?  I clearly remember not having to format the drives last time i build an array, and they had been ext3 if i remember correctly, not sure if i wiped them agan after that. Is this normal, wrong, or what am i missing?

note, my drives have GPT partition tables.

Edit: a thought, since ZFS can use GPT partition table, and if i created the Partition to use the entire disk using gdisk, then is that all that is needed?  shoudl i have stopped there, or do i need to do some kind for formatting?

Last edited by wolfdogg (2013-09-30 20:58:39)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

#2 2013-09-30 04:43:06

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

Re: [solved] format a zfs drive to what, with what

ok, i found this on the wiki

Use # parted --list to see a list of all available drives. It is not necessary to partition your drives before creating the zfs filesystem, this will be done automatically. However, if you feel the need to completely wipe your drive before creating the filesystem, this can be easily done with the dd command.

 # dd if=/dev/zero of=/dev/<device>

so can someone clarify if i use gdisk to zap the partition table, then recreate a new GPT, then create a partition(the whole drive), is that it?  then i can create the zpools no problem?   So doesnt itjust use the disk as is?  i dont ever remember the drive going through a long format process when setting up zpools, they are just available for use right away.

Last edited by wolfdogg (2013-09-30 04:43:44)


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

#3 2013-09-30 12:23:34

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: [solved] format a zfs drive to what, with what

wolfdogg wrote:

so can someone clarify if i use gdisk to zap the partition table, then recreate a new GPT, then create a partition(the whole drive), is that it?  then i can create the zpools no problem?   So doesnt itjust use the disk as is?  i dont ever remember the drive going through a long format process when setting up zpools, they are just available for use right away.

Zfs uses the disk as is, that means there is no need to create a partition, or filesystem. Just clean the drives with dd and use zpool create afterwards.
Wiki: https://wiki.archlinux.org/index.php/ZF … orage_pool
EDIT: Remember to add all you drives to the command, for example like this:
RaidZ1:

zpool create tank raidz1 /dev/sdb /dev/sdc /dev/sdd /dev/sde

There are lots of examples on the manpage of zpool.

Last edited by teateawhy (2013-09-30 12:26:04)

Offline

#4 2013-09-30 20:58:28

wolfdogg
Member
From: Portland, OR, USA
Registered: 2011-05-21
Posts: 545

Re: [solved] format a zfs drive to what, with what

thanks for clarifying that, its a bit odd that a filesystem doesnt need a prepared partition, thats why i wanted to doublecheck.  much appreciated.  Im pretty sure this post will get some hits into the future since theres not many posts on "formating a zfs" filesystem.  lol.


Node.js, PHP Software Architect and Engineer (Full-Stack/DevOps)
GitHub  | LinkedIn

Offline

Board footer

Powered by FluxBB