[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Homebuilt NAS: System Drive Filesystem?



On 2020-08-23 11:22, Patrick Bartek wrote:
On Sat, 22 Aug 2020 01:49:45 -0700
David Christensen <dpchrist@holgerdanske.com> wrote:

On 2020-08-21 21:02, Patrick Bartek wrote:

Hi! All:

For my Homebuilt NAS [specs below], I've decided on a very small 32GB
SanDisk flash drive for the system drive to keep the 6 available SATA
II connectors free for storage drives. But I'm concerned about writes
wearing out the flash drive too soon. I don't know if it has wear
leveling built in.  Nothing in the specs about it. So, worse case, I'll
assume it doesn't.

For that reason, I thought EXT4 without journaling would work well.  No
journaling -- issues that causes aside -- would reduce writes a lot.
Then I came across F2FS which I hadn't heard of.  After some reading,
it seems the perfect filesystem for my purposes: It's more "modern" and
faster than EXT4, designed specifically for solid state devices, and
available in the Debian Repo. (I plan to use OpenMediaVault NAS
software which is Debian based.)

Opinions?  Suggestions?  Recommendations?

Thanks


B

THE BOX: ASRock 770DE+ BIOS/MBR Only MB (EFI/GPT Not Supported), AMD
Phenom II X4 CPU at 3.0GHz, 8GB DDR2 RAM (16GB Max), 6 SATA II, 1 IDE
(Master and Slave) -- IDE DVD Writer on Master, 1 Floppy connector, but
no floppy drive, 6 USB 2.0/1.0, 1GB ethernet

I ran a Samba server and a backup server on my SOHO LAN using SanDisk
Ultra Fit 16 GB USB 3.0 flash drives with ext4 for several years.  I
installed Debian just like I would for a HDD or SSD.  The computers
worked, and the flash drives did not wear out.  But, they saw light use.

Mine's the Ultra Fit, too, but 32GB. I've done some addtional research,
and it looks like it has wear leveling built in. > Read a SanDisk blurb
that all their solid state devices have it by default.

AIUI all USB flash drives have wear-leveling -- it is a practical requirement. Otherwise, "hot spots" would wear out patches very quickly.


In any case, the
NAS software I'll be using (OpenMediaVault) has a specific plugin for
solid state to reduce write wear to a minimum.

If they've done the engineering, figured it out, and made it a plug-in, that sounds ideal. If you find an explanation of how they do it, please post a link.


I used a 2015 MacBook Pro 15 with VirtualBox and a Debian desktop as a
[snip]


If I wanted to use a USB flash drive as a Debian system drive again, I
would probably just go with an Ultra Fit 16 GB and ext4.  They are
inexpensive; and if they fail too often, I would try a high endurance SD
card and USB adapter.

My plan is after the OS install and configuring to just clone the drive
for a quick reinstall, if or when it's needed.

Clones are nice.  Good appliances often include backup and restore features.


Tuning the system to minimize flash drive writes sounds appealing, but I
never had much success at it.  Mounting the root filesystem with
'relatime' or 'noatime' options sounds like a good way to break things,
and I'm not going to audit an entire Debian system to figure it out.  I
tried running without swap -- that is a good way to crash your systems.
I have not tried alternate filesystems, because I want to be able to
boot a standard Debian Installer and run the rescue console when needed
(thus precluding ZFS, which I really want).  One trick I have not tried
is a USB disk on module.  Eventually SSD's became cheap enough that I
replaced all of the USB flash drives, so I have not pursued this.

I'll use "relatime" instead of "noatime." "Relatime" is said to
create less problems with software that needs dates/times when files,
etc. were last modified, accessed, etc.

I only use 'relatime' on data disks. I would not use it on a root filesystem. /boot might be okay. (I let the installer set the boot, swap, and root entries in fstab and I am loath to touch them.)


My systems rarely use swap, and when they does it's only a few
kilobytes. My main 1-year old under-the-desk box with 16GB RAM has
yet to use any.

Run from RAM is definitely the best situation.


I won't be using ZFS because of its propensity for lots of RAM. The old
box I'm using for this project has only 8GB of DDR2, and I don't plan
to expand that.

Two words: bit rot.


We have been discussing dm-integrity on another thread. I am still trying to figure out if it is production ready and supported/ integrated on Debian 10.


OpenMediaVault, to its credit, is very lightweight and
RAM efficient. Perfect for the home NAS on an old system.

I have mixed feelings about pre-rolled appliance distributions. If I can fumble my way through the UI and solve my needs without understanding what is going on under the hood, okay. I did this with IPCop for years. (And, it was simple enough that I could mess around under the hood.) But, when I tried to make changes and understand what was going on under the hood of FreeNAS, it was a disaster. I started over with FreeBSD RELEASE and rolled my own.


Thanks for your input.

YW.  :-)


David


Reply to: