3

Today I just realized in my Ubuntu Linux, I can mount and store files on my newly purchased hard drive as a raw device without a file system. (as long as I partitioned the disk correctly)

So, I am not sure if my below statement is correct, looking for expert to answer:

  1. Looks like it's not required to create a file system on a disk in order to use it in Linux? Is it correct?

  2. I have some very basic understanding of how a file system works. In Linux, is the concept of "inode" a file system feature or a Linux feature?

  3. I understand that the "inode" file system works unlike NTFS or FAT32 that it tries to spread out the data across the disk so that Linux/Unix doesn't need as Windows like "defgramentation" program to keep data in consecutive chunks. My question is, if I am storing my data on a raw device without a file system, and if "inode" is a file system feature not a Linux feature, what will the actual data layout look like on the raw device then?

Thanks in advance

Bob
  • 291
  • 2
  • 8
  • You do need a file system. The disk was preformatted when you bought it, and it sounds like you're just using that fs (deleting and recreating a partition in the same place doesn't change the fs on it). This question may be better suited for StackOverflow's sister site [Unix&Linux](https://unix.stackexchange.com/), and should probably be split up into 2/3 separate questions so they can be answered independently. – that other guy May 17 '18 at 18:38
  • thank you very much, but i am not sure if I am satisfied with the answer. Are you saying that there should be no way I can mount a drive without creating a file system on it? – Bob May 17 '18 at 21:24
  • and are you also saying that when I erased all the partitions and created new partitions on the disk, the pre-existing file system persists regardless of the partition operation? – Bob May 17 '18 at 21:27
  • These are [just comments](https://stackoverflow.com/help/privileges/comment), not actual answers (because again, it's more on-topic for [Unix&Linux](https://unix.stackexchange.com/) or [SuperUser](https://superuser.com/) since this is not about programming). But no, you can't mount devices without file systems. Deleting and recreating a partition is just likely (but not guaranteed) to cover the same on-disk area. When that happens, the old fs will be used when you mount the new partition (if you don't reformat it) – that other guy May 17 '18 at 21:42
  • ok thanks for the comment. – Bob May 17 '18 at 21:45

0 Answers0