Cmd to format with xfs?


Recommended Posts

Hi guys,

 

I have a precleared and checked drive which I want to format to xfs while it is not part of the array and copy some data onto it. Can somebody share the proper command and how to partition, etc? 

 

I want to copy data onto it, then put into array and re-construct, then re-build parity. 

 

I am looking to the same squence of commands that are execute after array is started and a new and unformatted drive is found. 

 

Thanks verry much!

Edited by starcat
Link to comment

That is exactly why I wasn't looking into upgrading as everything I need is running fine. You know, never touch a running system. 

 

Only need to parition and format a disk to XFS, then copy data somewhere else, then put back into array, rebuild and calculate new parity. 

 

 

Edited by starcat
Link to comment

You can use the cache disk slot to format to XFS as long as you set the cache slots to display only 1 slot. That way it doesn't disturb the parity array and still sets up the drive correctly.

 

If you currently are using a cache drive just disable the VM and Docker services in settings while you do the unassign current cache, assign temp drive, format, unassign, reassign all current cache drives.

 

  • Like 1
Link to comment

That's a great idea with the cache drive. I currently do not use a cache drive, so the cache drive slot is free. 

So, I insert a new drive there, partition, format, take out and bring elsewhere, copy data onto it and then assign as a regular data drive. Then rebuild parity. 

 

Would that work?

Thanks.

Link to comment
3 minutes ago, starcat said:

That's a great idea with the cache drive. I currently do not use a cache drive, so the cache drive slot is free. 

So, I insert a new drive there, partition, format, take out and bring elsewhere, copy data onto it and then assign as a regular data drive. Then rebuild parity. 

 

Would that work?

Thanks.

Yes. Unraid will partition automatically, and apply whichever format type (XFS or BTRFS) that you have set for that cache slot. XFS is only available if the number of cache slots available is set to exactly 1.

  • Like 1
Link to comment

Thanks on that hint, didn't knew.

 

I am running currently 6.2.0-rc3 and I do not see GPT 4k-aligned available as a partition scheme in the Disk Settings. 

I only see MBR and MBR 4k-aligned and was planning to insert some 8TB drives. Any idea which version do I need to upgrade to without breaking too much of what I currently have and introducing lots of new dependencies? 

 

Thanks

Link to comment
  • 1 month later...

Rather than create a new thread, I thought I'd post here.

 

I'm looking for the same command. I want to format a disk that I have in a different server running Debian and ensure it's formatted to be recogniziable by UnRAID.

 

What is the command?

 

Link to comment

Found it... Dumping this here so I can find it in the future.... special thanks to him who will recognize his code.

 

Don't use this unless you know WTF you're doing. This will destory things.

 

Quote

# Remove previous partition (if needed)
parted {$dev} --script -- rm {$part}

 

# Destory all partition data structures (just be to extra sure)
sgdisk -Z {$dev}

 

# Create new UnRAID Partition
parted {$dev} --script -- mklabel gpt
parted -a optimal {$dev} --script -- mkpart primary xfs 0% 100%

 

# Format XFS
mkfs.xfs -f {$dev}

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.