Re: SSD and HDD

2020-10-12 Thread David Christensen

On 2020-10-12 15:04, Weaver wrote:

On 13-10-2020 07:27, mick crane wrote:



I being a home user have pfsense on old lenovo between ISP router and
switch to PCs


I personally have apf-firewall onboard, and it's hard to beat in my
opinion, for ease of config as well as efficiency, but pfsense is
excellent and, in a separate box, very good.


another old buster lenovo doing email


Any chance of putting this onto a separate drive in your firewall box?
This way it doesn't get any further into your system and you clear up
some clutter, with a machine you can allocate to something else.


If you mean "boot into either a firewall/ router or into a e-mail 
workstation", then the LAN will go down when the computer is booted into 
the e-mail workstation.



If you mean "add a graphical desktop environment and GUI e-mail client 
to the firewall/router", then, no insult intended, that is a very bad 
idea.  A firewall/ router should be running a stripped-down and hardened 
OS with only the software components necessary to perform its role in a 
network.  Adding an e-mail client to such a machine would not only be 
difficult, it would jeopardize the network.  (I attempted this with 
FreeNAS and it was a disaster.)



David



Re: SSD and HDD

2020-10-12 Thread David Christensen

On 2020-10-12 14:27, mick crane wrote:


might I ask a favour for information on accepted wisdom for this stuff ?
I being a home user have pfsense on old lenovo between ISP router and 
switch to PCs

another old buster lenovo doing email
another Buster PC I do bits of programming on.
Windows PC I play poker on and some games.
My approach to backup has been to copy files I want to keep to external 
HDs and other disks when I remember. If something goes wrong so long as 
I remember what the config files do it's not such a big deal to start 
again.

I suppose I should try to make it more formal

Tips for understood accepted wisdom appreciated, like is it better if 
want to use a windows program have this Virtualization or reboot and 
change boot order or just have it on another PC. And also practical 
method for backup hardware as consumer hardware only seem to have room 
for 2 disks at most.


mick


I did the "old PC firewall" for many years with IPCop.  It had a text 
console UI and I could login via SSH and do Linux things.  Then I added 
a consumer AP.  It had a web UI.  Then I changed the old PC to a 
consumer firewall/ VPN router and installed another at a remote site. 
Again, web UI's.  Keeping the configuration settings of only a few 
network devices in sync, each with its own UI, was problematic at best. 
Finally, I discovered UniFi, and its "software defined networking".  I 
have one "controller" (free as in beer) running on a virtual host 
(linode.com) that provides centralized command and control via a web UI 
for one or more devices organized into one or more networks.  Even with 
only one security gateway and one AP in my home, the administration 
savings is noticeable and welcome:


https://unifi-network.ui.com/


Backups are a subset of disaster planning, preparedness, recovery, etc.. 
 There seems to be two extremes:


1.  A packaged solution -- amanda, borg backup, bacula, etc..  These 
tools are very good from a pragmatic standpoint.


2.  Home-grown solutions, starting with basic tools  tar(1), gzip(1), 
rsync(1), then wrapped with shell scripts, then put into programs/ 
suites, etc..  Code weenies can go this route, as I did, but I'm not so 
sure it's a good idea.



Software for a specific platform runs the best when the platform is real 
hardware, rather then virtualization or emulation.  Rather than dual- or 
multi-boot several operating systems on one drive, I put trayless racks 
in my computers, put each OS on a separate drive, and mix and match as 
desired.



If you want a lot of drives in one build-your-own computer, look at full 
tower cases.  Alternatively, look at storage server products with 
multiple drive bays/ racks.



David



Re: SSD and HDD

2020-10-12 Thread Weaver
On 13-10-2020 07:27, mick crane wrote:
> On 2020-10-11 19:01, Andy Smith wrote:
>> Hi Mick,
>>
>> On Sun, Oct 11, 2020 at 05:45:45PM +0100, mick crane wrote:
>>> Got a PC that has SSD and a HDD. I see that you are supposed to avoid writes
>>> to SSD for longevity.
>>
>> Flash write endurance has come on leaps and bounds over the last
>> decade to the point where most people don't have to worry about
>> this.
>>
>> You can look at "tune2fs -l" output or at SMART attributes to see
>> how much has been written to your current filesystems / devices over
>> their life times, to see how your use case matches up against the
>> write endurance advertised for your SSD.
>>
>> I wouldn't recommend taking any special measures unless you have
>> some doubt that the SSD endurance is up to it.
>>
>> With only a single SSD and a single HDD I'd rate device failure from
>> other problems as a higher risk than wearing out the SSD.
>>
>>> Is it a matter of putting entries in fstab for /swap /var /home to suitably
>>> formatted partitions on HDD ?
>>
>> If you still think you will have a problem then yes, that is one way
>> to go. Another is to leave some percentage of the SSD unpartitioned
>> and never used. That will increase its write endurance.
>>
>> [ Leaving aside the fact that if I were doing this I'd have an extra
>> storage device for redundancy… ]
>>
>> If I were in your position and still had concerns about write
>> endurance I'd probably put everything in LVM with a volume group on
>> the SSD and a volume group on the HDD. I'd then use separate logical
>> volumes for the filesystems that got a lot of writes. The use of LVM
>> like this would allow me to change my mind later and move LVs
>> between the SSD and HDD while the machine is online.
>>
>> Plus any time you are thinking of doing multiple filesystems, LVM is
>> a good bet.
>>
>> Plus you might be using LVM anyway for encryption.
>>
>> But again I can't emphasise enough how you are probably over thinking
>> write endurance.
>>
>> Cheers,
>> Andy

Hullo,

> 
> might I ask a favour for information on accepted wisdom for this stuff ?
> I being a home user have pfsense on old lenovo between ISP router and
> switch to PCs

I personally have apf-firewall onboard, and it's hard to beat in my
opinion, for ease of config as well as efficiency, but pfsense is
excellent and, in a separate box, very good.

> another old buster lenovo doing email

Any chance of putting this onto a separate drive in your firewall box?
This way it doesn't get any further into your system and you clear up
some clutter, with a machine you can allocate to something else.

> another Buster PC I do bits of programming on.

Perhaps upgrade this to your main box, which you also do your
programming on?

> Windows PC I play poker on and some games.

The only games I play are Chess and Go, but I believe Linux also has
poker, although I don't know how well that integrates with online game
venues. Install Steam, and you have it all! The last time I used a
Windows box was when XP came out, and that was one of their better ones.
But, I actually bought a second-hand Windows 10 box recently (HP
EliteDesk G1), and all I use it for is a driver box for better scanners
and printers Linux doesn't cater to as yet. When the market picks up in
that regard, I'll probably turn it into a home theatre box running Kodi.
A possible option worth looking at.

> My approach to backup has been to copy files I want to keep to
> external HDs and other disks when I remember. If something goes wrong
> so long as I remember what the config files do it's not such a big
> deal to start again.
> I suppose I should try to make it more formal

Yep, make the leap to learn about back-ups. Depending on your desktop,
it can be quite easy. KDE run a gui set-up that you barely have to think
about, but config files for back-up ninja and a couple of others are,
literally, trivial to figure out. Not that I can talk. I didn't become
the world's foremost authority on reinstalls by backing up. It's for
chickens! But keeping a separate \home partition is good policy.

Cheers!

Harry.

-- 
`Religion is regarded by the common people as true,
by the wise as false,
and by the rulers as useful'.

— Lucius Annæus Seneca.

Terrorism, the new religion.

Registered Linux User: 554515



Re: SSD and HDD

2020-10-12 Thread mick crane

On 2020-10-11 19:01, Andy Smith wrote:

Hi Mick,

On Sun, Oct 11, 2020 at 05:45:45PM +0100, mick crane wrote:
Got a PC that has SSD and a HDD. I see that you are supposed to avoid 
writes

to SSD for longevity.


Flash write endurance has come on leaps and bounds over the last
decade to the point where most people don't have to worry about
this.

You can look at "tune2fs -l" output or at SMART attributes to see
how much has been written to your current filesystems / devices over
their life times, to see how your use case matches up against the
write endurance advertised for your SSD.

I wouldn't recommend taking any special measures unless you have
some doubt that the SSD endurance is up to it.

With only a single SSD and a single HDD I'd rate device failure from
other problems as a higher risk than wearing out the SSD.

Is it a matter of putting entries in fstab for /swap /var /home to 
suitably

formatted partitions on HDD ?


If you still think you will have a problem then yes, that is one way
to go. Another is to leave some percentage of the SSD unpartitioned
and never used. That will increase its write endurance.

[ Leaving aside the fact that if I were doing this I'd have an extra
storage device for redundancy… ]

If I were in your position and still had concerns about write
endurance I'd probably put everything in LVM with a volume group on
the SSD and a volume group on the HDD. I'd then use separate logical
volumes for the filesystems that got a lot of writes. The use of LVM
like this would allow me to change my mind later and move LVs
between the SSD and HDD while the machine is online.

Plus any time you are thinking of doing multiple filesystems, LVM is
a good bet.

Plus you might be using LVM anyway for encryption.

But again I can't emphasise enough how you are probably over thinking
write endurance.

Cheers,
Andy


might I ask a favour for information on accepted wisdom for this stuff ?
I being a home user have pfsense on old lenovo between ISP router and 
switch to PCs

another old buster lenovo doing email
another Buster PC I do bits of programming on.
Windows PC I play poker on and some games.
My approach to backup has been to copy files I want to keep to external 
HDs and other disks when I remember. If something goes wrong so long as 
I remember what the config files do it's not such a big deal to start 
again.

I suppose I should try to make it more formal

Tips for understood accepted wisdom appreciated, like is it better if 
want to use a windows program have this Virtualization or reboot and 
change boot order or just have it on another PC. And also practical 
method for backup hardware as consumer hardware only seem to have room 
for 2 disks at most.


mick


--
Key ID4BFEBB31



Re: SSD and HDD

2020-10-12 Thread Andrei POPESCU
On Du, 11 oct 20, 19:06:12, Linux-Fan wrote:
> 
> Another common option is using the `relatime` mount option for SSDs, but I
> do not configure this explicitly on my systems.

According to mount(8) 'relatime' is the default since Linux 2.6.30.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


Re: SSD and HDD

2020-10-11 Thread David Christensen

On 2020-10-11 09:45, mick crane wrote:
Bearing in mind I rarely do installs and when I do usually let the 
installer do its thing.
Got a PC that has SSD and a HDD. I see that you are supposed to avoid 
writes to SSD for longevity.
Is it a matter of putting entries in fstab for /swap /var /home to 
suitably formatted partitions on HDD ?

Or is there more to  it ?


First, backup any data you want to keep.


Then run the manufacturer diagnostics for both the SSD and the HDD.  Run 
all the tests.  Zero all the blocks on the HDD.  "Secure erase" the SSD. 
 If anything fails, run any repair functions and test, zero/erase 
again.  Recycle any device that fails or is questionable.



It would help if you told us how you plan to use the computer, and what 
kind of network it fits into.



I would do my typical install onto the SSD.  I believe the installer, 
boot loader, and/or kernel, etc., are now smart enough to detect the SSD 
and adjust accordingly.  For ordinary workloads, I would not worry about 
wearing out the SSD.



If you know that you will be running a workload that is going to do 
heavy I/O onto a particular filesystem, consider:


1.  Adding RAM and using tmpfs, as previously suggested.  This should 
provide excellent performance (best?).


2.  Add device(s) specifically made for heavy I/O (e.g. enterprise 
SSD's).  Monitor regularly.


3.  Pick sacrificial device(s) and monitor them frequently.


I use pairs of HDD's in ZFS mirrors for storage of bulk data.


I use single HDD's in shock-mounted mobile racks for backup/ archive media.


David



Re: SSD and HDD

2020-10-11 Thread Jim Popovitch
On Sun, 2020-10-11 at 20:25 +0200, Sven Joachim wrote:
> On 2020-10-11 13:48 -0400, Jim Popovitch wrote:
> 
> > On Sun, 2020-10-11 at 19:47 +0200, Sven Joachim wrote:
> > > "Percentage Used Endurance Indicator"
> > 
> > Where do you see that?
> 
> For a SATA SSD:
> 
> # smartctl -l devstat $SSD
> 

+1 Thanks Sven.


-Jim P.



Re: SSD and HDD

2020-10-11 Thread Sven Joachim
On 2020-10-11 13:48 -0400, Jim Popovitch wrote:

> On Sun, 2020-10-11 at 19:47 +0200, Sven Joachim wrote:
>> "Percentage Used Endurance Indicator"
>
> Where do you see that?

For a SATA SSD:

# smartctl -l devstat $SSD

Cheers,
   Sven



Re: SSD and HDD

2020-10-11 Thread Darac Marjal

On 11/10/2020 18:48, Jim Popovitch wrote:
> On Sun, 2020-10-11 at 19:47 +0200, Sven Joachim wrote:
>> "Percentage Used Endurance Indicator"
> Where do you see that?

If you have an NVMe device, you can run "nvme smart-log
/dev/nvme" (or "nvme smart-log
/dev/nvmen" if you have multiple namespaces on a
controller).

The "percentage used" stat is what you're looking for.


>
> -Jim P.
>



signature.asc
Description: OpenPGP digital signature


Re: SSD and HDD

2020-10-11 Thread Andy Smith
Hello,

On Sun, Oct 11, 2020 at 01:48:48PM -0400, Jim Popovitch wrote:
> On Sun, 2020-10-11 at 19:47 +0200, Sven Joachim wrote:
> > "Percentage Used Endurance Indicator"
> 
> Where do you see that?

Usually a SMART attribute like "233 Media Wearout Indicator" or if
that isn't available devices often have "241 Total_LBAs_Written"
which can be compared¹ against published write endurance
specifications.

Sometimes the devices also have a proprietary tool for getting this
information, though in the majority of cases all this is doing is
parsing SMART attributes.

Cheers,
Andy

¹ Though with some care: devices vary on what they consider a
  logical block size to be; also due to internal merging and cell
  erasure, a logical write doesn't necessarily match to a flash
  write.

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: SSD and HDD

2020-10-11 Thread Andy Smith
Hi Mick,

On Sun, Oct 11, 2020 at 05:45:45PM +0100, mick crane wrote:
> Got a PC that has SSD and a HDD. I see that you are supposed to avoid writes
> to SSD for longevity.

Flash write endurance has come on leaps and bounds over the last
decade to the point where most people don't have to worry about
this.

You can look at "tune2fs -l" output or at SMART attributes to see
how much has been written to your current filesystems / devices over
their life times, to see how your use case matches up against the
write endurance advertised for your SSD.

I wouldn't recommend taking any special measures unless you have
some doubt that the SSD endurance is up to it.

With only a single SSD and a single HDD I'd rate device failure from
other problems as a higher risk than wearing out the SSD.

> Is it a matter of putting entries in fstab for /swap /var /home to suitably
> formatted partitions on HDD ?

If you still think you will have a problem then yes, that is one way
to go. Another is to leave some percentage of the SSD unpartitioned
and never used. That will increase its write endurance.

[ Leaving aside the fact that if I were doing this I'd have an extra
storage device for redundancy… ]

If I were in your position and still had concerns about write
endurance I'd probably put everything in LVM with a volume group on
the SSD and a volume group on the HDD. I'd then use separate logical
volumes for the filesystems that got a lot of writes. The use of LVM
like this would allow me to change my mind later and move LVs
between the SSD and HDD while the machine is online.

Plus any time you are thinking of doing multiple filesystems, LVM is
a good bet.

Plus you might be using LVM anyway for encryption.

But again I can't emphasise enough how you are probably over thinking
write endurance.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: SSD and HDD

2020-10-11 Thread Jim Popovitch
On Sun, 2020-10-11 at 19:47 +0200, Sven Joachim wrote:
> "Percentage Used Endurance Indicator"

Where do you see that?

-Jim P.



Re: SSD and HDD

2020-10-11 Thread Sven Joachim
On 2020-10-11 17:45 +0100, mick crane wrote:

> Bearing in mind I rarely do installs and when I do usually let the
> installer do its thing.
> Got a PC that has SSD and a HDD. I see that you are supposed to avoid
> writes to SSD for longevity.

No, you are not.  I put an SSD into my desktop computer almost four
years ago, and its "Percentage Used Endurance Indicator" is currently at
12%, so it probably will be good for another twenty years or longer.

> Is it a matter of putting entries in fstab for /swap /var /home to
> suitably formatted partitions on HDD ?
> Or is there more to  it ?

My advice would be to only use the HDD for big data files where speed is
no concern,  e.g. your music/picture/video collection and such.
Everything else can go onto the SSD.

Cheers,
   Sven



Re: SSD and HDD

2020-10-11 Thread Peter Ehlert
I don't use the automatic install, I don't like what it chooses. I use 
the manual method to set things up exactly as desired.


to answer your question you can install on any available drive, SSD or 
HDD... use or create some or all of your partitions wherever you like.
your new fstab will point to the correct locations without your 
intervention.


as far as SSD life, I am no expert but I do a lot of installs. I use SSD 
for everything that I want to run faster. Sometimes I move the 
partitions to a different drive because of Sace or preference.


In my experience the the SSD failure rate is the same or less than the 
HHD drives.


Back in the day SSDs were primitive and Expensive. I believe those 
gyrations are no longer necessary.


On 10/11/20 9:45 AM, mick crane wrote:
Bearing in mind I rarely do installs and when I do usually let the 
installer do its thing.
Got a PC that has SSD and a HDD. I see that you are supposed to avoid 
writes to SSD for longevity.
Is it a matter of putting entries in fstab for /swap /var /home to 
suitably formatted partitions on HDD ?

Or is there more to  it ?

mick





Re: SSD and HDD

2020-10-11 Thread Linux-Fan

mick crane writes:

Bearing in mind I rarely do installs and when I do usually let the installer  
do its thing.
Got a PC that has SSD and a HDD. I see that you are supposed to avoid writes  
to SSD for longevity.
Is it a matter of putting entries in fstab for /swap /var /home to suitably  
formatted partitions on HDD ?


You can add to /etc/fstab:

tmpfs  /tmptmpfs   defaults,size=6G,nr_inodes=1M  0  0

Change 6G to a size that suits you, 1/2 RAM could a good choice. This puts  
/tmp on a tmpfs such that writes to it no longer go to SSD.


Another common option is using the `relatime` mount option for SSDs, but I  
do not configure this explicitly on my systems.



Or is there more to  it ?


Depends on what exactly you want. In terms of "avoiding writes" all current  
SSDs do with typical OS workloads just fine by default and there is no /need/  
to configure anything. I personally like that periodic `trim` invocations be  
made and thus use a cronjob for it:

https://masysma.lima-city.de/32/ssd-optimization.xhtml

I am not sure whether this is the recommended approach to it as of today,  
though and: It does not reduce writes but tells the SSD controller which  
blocks are unused by the OS such that it can delete them etc. :)


For further optimization, if using virtual Windows machines, configure them  
correctly because otherwise Windows may start "defragmentation" -- a lot of  
unnecessary writes for any SSD.


HTH
Linux-Fan

öö


pgptrGTdxKPrd.pgp
Description: PGP signature