РАСШИФРОВКА 🔗
Josh:
00:00
My first job after college was as a Linux systems administrator at a hosting company.
00:06
We offered shared and dedicated hosting on both Linux and Windows servers.
00:11
The data center had rows of server racks and stacks of disks, which is where I first learned
00:15
how often hard disks can fail.
00:19
One evening around 5pm.
00:20
I was sitting inside one of our data center cages.
00:23
Each data center client had their own secured cage to keep their equipment isolated, and it was my day to be on site.
00:32
I was working on a support request for a business client who was having issues with their server.
00:38
I SSH'd into the system and started troubleshooting.
00:41
After running some tests and making temporary files, I decided to clean up my workspace.
00:48
Out of habit, I typed rm-rf star.
00:53
At first, nothing seemed unusual.
00:56
The command ran for a few seconds, but then I realized something was wrong.
01:01
It was taking too long.
01:03
My stomach dropped as it hit me.
01:06
I wasn't in the right directory.
01:08
I had run the command one level too high and was deleting client data.
01:13
I had only been at the job for a few months, and this wasn't something I could just undo.
01:19
I wasn't pulling a cable or restarting a service.
01:22
I was actively erasing files.
01:25
Not knowing what else to do, I reached out to my colleagues for help.
01:30
Thankfully, we were able to restore everything from backups, and the client never even knew anything had happened.
01:36
So, moral of the story, backups, backups, backups.
01:42
Just because your data lives in the cloud, doesn't mean a recent college graduate can't accidentally delete it.
01:49
That day taught me a valuable lesson.
01:52
And ever since, every time I use the rm command, I stop, double check the directory, and take a deep breath before pressing enter.
02:02
The piece of a computer that holds everything precious to you, on this episode of In The Show.
02:10
The wrong thing to do is just go out and buy a computer, and then learn about it.
02:15
You'll learn, but you'll learn a lot of things that maybe you didn't want to learn.
02:18
A computer that you buy today will likely be obsolete six months from now, and there's not a dang thing that you can do about it.
02:28
My name is Josh, and I'm able to keep this podcast independent and advertisement-free because of support from listeners like you.
02:36
If you are finding value in what I'm doing here, consider becoming a paid supporter at members.sideofburritos.com.
02:44
And as a thank you, members get early access to new videos, ad-free versions of everything, bonus content, and access to a live monthly Q&A.
02:53
Thanks for considering. Now let's get back to the show.
02:58
Storage in a computer is where data is kept long-term, even when it is powered off.
03:03
This includes your operating system, programs, documents, and games.
03:08
But this storage can be slow compared to
Load full transcript
RAM, which we covered in the last episode.
03:14
But RAM is temporary storage that the computer uses only when it's powered on.
03:18
When you turn off your PC, data and RAM is lost.
03:23
RAM is volatile and very fast, while storage is non-volatile and slower.
03:29
Modern personal computers use a few main types of storage drives.
03:34
Hard disk drives, HDDs, solid-state drives, SSDs, and non-volatile Memory Express solid-state disks, NVMe SSDs.
03:47
An HDD is mechanical.
03:50
Inside, it has spinning magnetic platters, called disks, and a moving read-write head, like a tiny record player.
03:58
Because of this design, HDDs are physically limited in speed.
04:03
The disk can only spin so fast, and the head can only move so quickly.
04:07
A typical 3.5-inch desktop hard drive running at 7,200 RPM can deliver around 100-200 MB
04:15
per second in sequential data reads and writes, and even slower for random access.
04:22
due to seek time. They also come in a 2.5 inch size, commonly used in laptops or external hard
04:29
drives. Hard drives are best used for large, inexpensive storage. If you need several terabytes
04:36
to store media, backups, or games on a budget, hard drives give the most capacity per dollar.
04:43
They are common as secondary drives and desktops. For example, pairing a smaller SSD for the
04:49
operating system with a big HDD for files. Also, because they have moving parts, they are more
04:56
prone to physical failure and are more sensitive to physical movement. Noise and heat are additional
05:02
factors. You can hear them click during use. Solid state drives, or SSDs, have no moving parts.
05:11
They use flash memory chips, similar to what's
05:14
in a USB thumb drive, but much faster and more sophisticated to store data.
05:20
SSDs became popular in the late 2000s and quickly took over as the standard for running
05:26
operating systems and software due to their speed. A typical SSD using a SATA interface
05:32
can read and write around 500 to 550 megabytes per second, which is several times faster than a hard
05:40
drive. But beyond just throughput, SSDs have near instant seek times, meaning accessing small files
05:48
scattered around the drive is dramatically quicker. This is why a PC booting from an SSD
05:54
feels much quicker, as you are not waiting for a disk to spin. SSDs often come in a 2.5 inch
06:02
drive form factor with a SATA connector, making them an easy upgrade for older machines.
06:08
There are also M.2 SATA SSDs. These are little gumstick-sized circuit boards that plug into an
06:14
M.2 slot, which perform the same as a 2.5-inch SATA drive, just in a different shape.
06:21
A SATA SSD is a great all-purpose drive for your operating system, programs, and games.
06:29
SSDs are also more shock-resistant, since there are no moving parts, and silence in operation.
06:35
The cost per gigabyte has come down a lot, though hard drives are still cheaper for very large capacities.
06:44
NVMe, non-volatile memory express, SSDs, are the latest generation of solid-state storage
06:51
that connect via the PCI Express bus instead of the older SATA interface.
06:57
In practical terms, NVMe drives are...
06:59
extremely fast, often 5-7 times faster than the SATA SSDs in sequential throughput,
07:07
where SATA tops out around 600MB per second, an NVMe SSD on PCIe 3, which those terms will
07:15
cover in a future episode on motherboards, can hit around 3,500MB per second, and newer PCIe 4
07:23
models can go up to 7,000MB per second, and even faster on cutting-edge PCIe 5 drives.
07:30
These drives typically use the same M.2 form factor, the same gumstick shape, or sometimes
07:37
as PCIe expansion cards. NVMe drives achieve this speed by using multiple PCIe lanes and a
07:45
streamlined protocol designed for flash, instead of the old ATA-SATA designed for spinning disks.
07:52
NVMe SSDs are ideal for performance-critical tasks. If you're doing heavy video editing,
07:58
large file transfers, running virtual machines, or just want the fastest boot and application
08:04
load times, NVMe is the way to go. As of now, NVMe drives are typically a bit more expensive
08:12
per gigabyte than SATA SSDs and require a relatively modern motherboard with M.2 slots
08:19
or PCIe slots for an adapter. Also NVMe drives can run hotter due to their speed,
08:26
so many come with little heat sinks and it's good to have some airflow over them.
08:32
In the past, nearly all desktop and laptop storage was a removable drive. You could swap out the hard
08:39
drive or SSD. Nowadays, especially in slim laptops,
08:44
people who would be using the new laptop of the SSDs in a можputers' station.
08:44
This case is not as good as the limit.
08:44
tablets, and some premium devices, storage may be soldered directly to the motherboard.
08:50
This means you are unable to remove the storage chips. Now you may be wondering why solder the
08:56
storage. For manufacturers, this approach saves space and can be more power efficient. It allows
09:02
devices to be thinner and have one less connector that could potentially fail. Apple and some Windows
09:08
Ultrabook makers do this to achieve very slim form factors. There's also a minor benefit of
09:14
potentially higher speeds if they use multiple chips in parallel, which Apple's recent MacBooks do
09:20
this. It also lets the manufacturer prevent the user from upgrading hardware themselves and forcing
09:27
them to buy a completely new device. So big corporations love this. Now there's one topic
09:34
I've always loved when it comes to storage, and that's RAID.
09:37
RAID stands for Redundant Array of Independent Discs.
09:41
If you have multiple drives, you can combine them in a RAID setup for better performance and or data safety.
09:49
RAID is basically a method to group drives together to act as one unit, using techniques like striping, mirroring, and parity.
09:58
This is more common in servers and enthusiast setups than in a typical single PC build,
10:05
but if you are building a NAS or just want extra protection or speed with several drives, it's good to know the options.
10:13
Before we get into it, RAID is not a backup.
10:17
If malware deletes files or you accidentally format data, that deletion is mirrored to the other drives.
10:24
RAID only protects against hardware failure, so you would still want external backups for critical data.
10:30
Now let's talk about the most common RAID levels. The first is RAID 0 which is striping. This mode
10:36
takes two or more drives and stripes the data across them for speed and combined capacity.
10:42
For example, if you have two 2TB drives in RAID 0, it will appear as one 4TB drive.
10:50
Reads and writes can go roughly two times faster because both disks will work in parallel.
10:56
The downside is there is no redundancy at all. If any one drive in the array fails, the entire array
11:02
and all data is lost because each file is split between drives. RAID 0 is purely for performance.
11:10
With today's super fast SSDs, RAID 0 has lost some of the appeal.
11:17
The next one is RAID 1 which is mirroring. This setup requires two drives of the same
11:21
size. The system writes identical data to both drives, essentially making an automatic duplicate
11:27
of everything in real time. If one drive dies, you have an exact copy on the other, so your data is
11:34
safe. The trade-off is you only get the capacity of one drive. Two 2TB drives in RAID 1 give you
11:41
2TB of usable storage, since the second drive is a mirror. Performance-wise, you don't gain
11:48
write speed because it must write everything twice, but reads can be a bit faster, as it can
11:54
read different parts from each disk simultaneously. RAID 1 is a simple way to add fault tolerance
12:00
against drive failure. It's popular for boot drives in servers, or anyone who absolutely
12:06
can't afford downtime from a single drive failing. The next is RAID 5, which is striping plus
12:14
REST
12:14
REST
12:14
Parity, RAID 5 uses at least three drives and combines them in a way that gives you
12:20
both extra speed and one drive fault tolerance.
12:23
Data is striped across the drives, like RAID 0, with an added parity block distributed
12:29
among the drives.
12:31
Parity is a calculated checksum that can rebuild the data of one failed drive.
12:36
So any one drive can fail and you won't lose any data, and then you can replace the bad
12:41
drive and the array rebuilds itself.
12:44
The usable capacity of RAID 5 is N-1 drives.
12:49
For example, if you have three 2TB drives in RAID 5, that gives you 4TB of usable storage.
12:58
Performance wise, the read speeds are good, often better than a single drive since it can
13:03
be read from multiple disks, and write speeds are a bit slower than RAID 5.
13:06
zero because of the overhead of calculating parity. RAID 5 is common in NAS
devices and
13:13
servers for a balanced approach. Many consumer motherboards even support RAID 5 via fake RAID,
13:20
or you can set it up in software on Windows and Linux. It's a nice option if you have three or
13:26
four drives and want a single large volume with some safety net. Keep in mind, if a drive fails,
13:32
the array is running in a degraded state. There's no protection until you replace the drive,
13:38
and rebuilding can be intensive, which means that the array can fail during the rebuild.
13:44
So if you have a single drive failure and during the rebuild another drive fails,
13:49
that means your RAID 5 array will lose all data, which leads us to RAID 6, which is what I use in
13:56
my NAS. RAID 6 or RAID Z2.
13:59
is dual parity. This is an extension of RAID 5 with two parity blocks instead of one,
14:04
which allows for two drives to fail without losing any data.
14:09
Standard RAID 6 is often found in enterprise arrays or paranoid home users like myself.
14:15
You need at least four drives for RAID 6, since two drives worth of space will be taken up by
14:20
parity information. For example, if you have four 2TB drives in RAID 6, this gives you 4TB
14:28
of usable storage. With more drives, the efficiency gets better. If you have six 2TB drives in RAID 6,
14:36
this gives you 8TB of usable storage. The benefit is higher fault tolerance. You can handle two
14:42
simultaneous drive failures, which is reassuring for large arrays or when using not-so-reliable
14:48
disks. It also makes array rebuilds less.
14:51
risky, as you can have another drive fail during the rebuild and your data will still be safe.
14:57
The bottom line on RAID is that for most single PC builders, you will not bother with RAID at all.
15:03
You'll use one fast SSD for the OS and maybe a hard drive for data and keep regular backups.
15:10
And always weigh the complexity versus benefit, because sometimes a good backup strategy is
15:15
better than a complex RAID setup for home use. Now when you format a drive, you choose a file
15:21
system, which is the way files are organized on that drive. Different operating systems favor
15:27
different file systems. NTFS, or New Technology File System, is the default file system for modern
15:35
Windows. If you format a drive in a Windows machine for internal use, you'll likely use NTFS.
15:42
It supports large file sizes,
15:44
no 4GB limit like older FAT32, large partitions, file permissions and encryption, BitLocker uses
15:52
NTFS, compression and journaling, which helps recover from crashes. You'll want to use NTFS
15:59
for your Windows C drive and any other internal disks on a Windows PC. Other OSs can usually read
16:06
NTFS, but writing to NTFS from, say, macOS requires special drivers. Linux can read and
16:13
write to NTFS with proper software, but generally NTFS is best when the drive will be used with
16:18
Windows. XFAT, or Extended File Allocation Table, is a file system made by Microsoft as a replacement
16:27
for FAT32, introduced in 2006. Its main advantage is broad compatibility. It works on Windows,
16:35
macOS and modern Linux.
16:36
out of the box, and it supports large files, unlike FAT32's 4GB cap.
16:43
XFAT does not have all the features of NTFS. It has no permissions or journaling,
16:48
but that's okay for portable storage. XFAT is ideal for formatting external drives or USB sticks
16:55
that you want to use on multiple platforms. It's also commonly used on SD cards. Just note that
17:02
because it lacks journaling, if the drive is unplugged during a write, there's a high chance
17:07
of corruption, so always eject safely. ext4, which is 4th Extended File System, is the standard file
17:17
system for Linux distributions. Many use ext4 by default for their main partitions. It's a journaling
17:24
file system, reliable and quite performant on Linux. It supports large volumes,
17:29
and files, and has features like extents that reduce fragmentation. For Windows users,
17:36
ext4 isn't directly usable. Windows doesn't natively read ext4,
17:41
so it's mostly for Linux-only environments or Android devices.
17:46
The last one I want to cover is ZFS, which stands for Zetabyte File System.
17:51
This is kind of a random one, but it's what I use on my NAS. ZFS is an advanced file system,
17:57
originally from Sun Microsystems, but it's now open source and popular in server and NAS
18:03
communities. It's more than just a file system, it's also a volume manager. ZFS has features like
18:10
pooled storage, copy-on-write, built-in RAID, RAID-Z, snapshots, checksumming for data integrity,
18:18
and transparent compression. It's designed to
18:21
preferable.
18:21
rent data corruption, and handle massive amounts of data. Like I mentioned, you'd typically use
18:27
ZFS in a NAS or storage server scenario, especially if you want the benefits of RAID Z1,
18:33
2, or 3 and self-healing data. TrueNAS, which I use, is a popular free NAS OS, uses ZFS exclusively.
18:43
ZFS is great if you have a bunch of drives and want a very resilient storage pool.
18:48
It does come with some overhead, it likes having plenty of RAM, and is more complex to administer.
18:55
ZFS is worth knowing about, but it's not the go-to for a simple PC storage setup.
19:02
Lastly, it's important to mention full disk encryption. This is a security feature,
19:07
not a type of drive, but it relates to how you use storage. Full disk encryption means all the data
19:14
the drive is encrypted, such that without the correct password or key, it's unreadable.
19:18
If someone steals your laptop or drive, encryption protects your personal data
19:21
from being accessed by the thief. On Windows, the common solution is BitLocker,
19:25
which can encrypt your entire SSD or hard drive. On macOS, there's FileVault. And on Linux,
19:29
you have tools like Lux or various encryption options during installation.
19:33
When you enable these, you typically enter a passphrase at boot,
19:35
or it ties it to your login, and then the drive is decrypted on the fly as you use it.
19:39
Full disk encryption can lead to some performance reduction,
19:42
but in my opinion, it's a non-negotiable. Take the potential performance hit,
19:45
and make sure your data is secure.
19:48
In the shulls,
19:57
錦
19:58
錦
20:03
錦
20:06
Written, researched, and recorded by me, the Fat32 Podcaster.
20:14
If you are listening in an app that lets you rate shows, please take a minute to rate this one.
20:20
I would truly appreciate it.
20:24
This one time I dared my friend to eat a hard drive.
20:28
He asked, how was he supposed to do that?
20:32
I told him, one bite at a time.
20:37
That's it, take care, and I'll see you next time.