Hard Disk Cluster size?


bburns

Recommended Posts

What does unraid use for cluster size when formatting the HD? Is this customizable?

 

B2

You are thinking in terms of MS-DOS file-systems.  unRAID uses reiserfs file systems.  They use an entirely different way to organize their data.  It does not have "clusters"

 

The default "block" size of a reiserfs is 4096.  According to the manual page for mkreiserfs, you can set the block size to any power-of-2 value between 512 and 8192.   

 

Far more details here: http://homes.cerias.purdue.edu/~florian/reiser/reiserfs.php

 

Since the file-systems in unRAID are created by it when formats the disk, there is no way to alter the default.

 

Joe L.

Link to comment

Any chance to get Unraid to support selecting a "block" size at format time? I store mainly Blu Ray rips on my unraid server, so the file size is huge. I would expect it to be much more efficient if it a larger block size were used.

 

B2

You could probably do something like this if the disk is completely empty (as it would be if you just added it to the array)

 

Add the disk to the array as usual, let unRAID format the disk.  It will use the default block size of 4096.  Let the array start with it.

 

Then, stop SAMBA and any other processes potentially accessing the new disk, because we will want to un-mount it.

To stop SAMBA

killall smbd nmbd

 

Then un-mount the "md" device affiliated with the newly added (empty) disk.  For this example, I'll use disk2  which would have an affiliated device of /dev/md2

 

umount /dev.md2

 

Next, you will want to re-format /dev/md2 with the new larger block size.  Since the default is 4096 there is only one size larger... 8192.  This WILL ERASE anything on the disk... Only do this on an empty disk... you have been warned.  Also, you must do these steps with the array started.  Do not attempt to perform them with the array stopped or parity will be incorrect.

mkreiserfs -b 8192 /dev/md2

 

Now that you have a newly formatted disk, you need to re-mount it.

mount -t reiserfs -o noacl,nouser_xattr,noatime,nodiratime /dev/md2 /mnt/disk2

 

(It is important to mount the "md2" device for disk2 on /mnt/disk2.  "/dev/md3" would be mounted on /mnt/disk3, etc...)

 

Now you can re-start samba

/usr/sbin/smbd -D

/usr/sbin/nmbd -D

 

The bulk of these instructions are identical to those given in the wiki if you need to perform a file-system check on a disk.  Those instructions are here: http://lime-technology.com/wiki/index.php?title=Check_Disk_Filesystems  The difference is that you are re-formatting the disk, and the wiki describes running reiserfsck on the disk while un-mounted.

 

 

Personally, I'll be curious to see if you notice any difference at all.  I doubt you will, but then I only store smaller DVD ISO images, and they rarely get over 8Gig.

 

Joe L.

Joe L.

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.