this post was submitted on 19 Oct 2023
39 points (93.3% liked)

Linux

47952 readers
2565 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

A moment ago I unmounted my 1TB HDD with 400GB of content and I partition it into two different partitions, obviously keeping the space that was already occupied. I did because I don't care if the content get corrupted, but after I did it everything is still working perfectly, when I thought everything would be corrupted.

I am possibly a complete ignorant on this subject, but due to the nature of the HDD and how it writes and reads data I expected it to corrupt everything, why didn't it happen? On an SSD on the other hand I would not consider that possible because it is not even a mechanical part where the information is stored.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 7 points 1 year ago* (last edited 1 year ago) (1 children)

Well, hard to say that everything is not corrupted unless you verify each bit. What file system are you using?

Partitioning I believe (if you don't format anything) is just rewriting drive headers and creating a new header at some new point on the disk for the next partition.

Obviously we aren't in the days of sequential files, so files are spread physically over the disk with space in between. I'm not up with the exact specifics on whatever the latest windows FS is and how it works, or how EXT works at that level, but it would seem you partitioned it at a point after the data ended.

That, or you haven't corrupted the inodes/pointers, so it appears that all the files are there, until you try to actually access that place on the disk. If the files existed in the space that the new partition is, then you're going to get errors. I suspect this is more likely, because inodes will exist in the first sequential bytes on the disk, while the actual file location could be anywhere.

Correct me if I'm wrong on any of the details here.

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago)

I’m using ext4 and the contents of the HDD are basically virtual machines, and I was able to access most of them (who use dynamic virtual hard drives) and they seem to work without problem, so I assumed that nothing got corrupted.

Actually I was surprised because a long ago I tried to do the same with BFTRS and all my data get corrupted that time.

And it’s interesting, thanks for the info. I didn’t know that it worked like that.