LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   For Linux compatability: FAT32 or NTFS better ? (https://www.linuxquestions.org/questions/linux-general-1/for-linux-compatability-fat32-or-ntfs-better-504541/)

brjoon1021 11-24-2006 01:22 PM

For Linux compatability: FAT32 or NTFS better ?
 
I have several hard disks that I have added several Linux distributions to. I also have Win XP installed. I want to have a disk set aside for only storage of: Pictures, Videos, Docements and Audio. I will probably name the folders as such. I want my Linuxes to be able to read and write to this disk and its folders as well.

1. Is that possible ?
2. Is that easy ?
3. Is there a preference for FAT32 or NTFS for the disk that will be shared? It is empty now so I can format it however I want. Oddly enough the Windows disk management does not allow for FAT32 formatting but I will use a Linux LiveCD to make it FAT32 if that is better.

Thanks. Also feel free to comment on what I am doing and how to do it better, I am only about 3 months or so into using Linux, I have a LOT to learn.

B.

meetscott 11-24-2006 01:35 PM

Definitely use Fat32. It's a less efficient file system but for Linux to read and write safely you should use Fat32. Linux can only safely read NTFS. It does not safely write without buying some third party tool. These are available but I've never used them.

And yes this is easy. You should only need to add a stanza to your /etc/fstab file. First see if you can access by default as this is possible from some distros. Otherwise add this stanza:
/dev/hda1 /windows vfat defaults,umask=000 1 0

This will give everyone read/write access to the Windows partition. Be careful with this because this makes the partition accessible to anyone on your Linux system. Make sure you take some steps to understand security like watching your logs and installing something like Tripwire for intrusion detection. Use stong passwords. This is a good initial defense. I'm always leary of making a partition writable like that but if you're watching the system closely I think it's okay. It's no worse than /tmp and it's certainly better than Windows ;)

slackhack 11-24-2006 01:37 PM

FAT32 is the clear choice for that, imo. i wouldn't even bother considering NTFS. as for easy, it's not that hard at all. you just have to mount it and make sure the permissions are set right. man mount gives most of the info you'll probably need.

exvor 11-24-2006 01:50 PM

NTFS write support is integrated into the 2.6 kernel and is not experimental anymore. Yes its safe to write to NTFS parttions in Linux no you dont need to buy a 3rd party tool to do it sucessfully. But there are some limitations. Such as NTFS cannot be read or written by any user other then root when mounted. If users are going to need access to the drive then you probably want to use fat32 and would be what I recommend.

Some limitations of the fat32 system are that if you create a parttion larger then 32gigs then dont be suprised if something strange happens (like data loss) there are numours reasons for this that I wont go into but doing MS support for over 4 years has taught me to stear clear of them.

Another limitation of fat32 is that you cannot have larger then 4gig files. If your going to be makeing larger ones (probably only thing larger is a disk image of a harddrive or possibly a dual layer dvd) then you would need to use ext3 or ntfs.

I had the same delima as you and what I ultmetly did was create a parttion 20gigs as fat32 and 30 as ext3 to store data. In windows i used a ext2 filesystem driver to access the data on the 30gigs of space. The reason I made the other is that the driver thats availible for windows to write and read from ext2/3 has issues when installing windows software into the parttion. thus the need for the 20 gig fat32.


I hope this is helpfull for you.

davcefai 11-25-2006 05:00 PM

Quote:

Oddly enough the Windows disk management does not allow for FAT32 formatting but I will use a Linux LiveCD to make it FAT32 if that is better.
I bumped into this earlier this week. Windows XP will only format FAT32 partitions to a max of 32GB but will use larger ones if you format with another OS.

arubin 11-25-2006 06:02 PM

Quote:

Such as NTFS cannot be read or written by any user other then root when mounted.
I have no problem reading it. Just changed fstab
Quote:

/dev/sda2 /mnt/windows ntfs ro 1 0
to
Quote:

/dev/sda2 /mnt/windows ntfs users,umask=1000,ro,auto 1 0

Never tried writing to it though

jkmccarthy 11-25-2006 06:27 PM

Large FAT32 disks -- caution with older Linux kernels
 
brjoon1021 mentions he uses several Linuxes ... so I just wanted to alert him and others *not* to use large FAT32 disks (>128Gb) with Linux kernels older than 2.4.25, at least not without patching those kernels to support large FAT32 disks.

Otherwise, once a disk fills up beyond a certain point (causing sectors above the 128Gb point on the disk to start being used ?), older Linux kernels will corrupt the file directories causing newer files to be reported as having zero byte filesize. It's easy at first to mistake this for a hardware problem (e.g., one or more bad sectors on the disk), but don't be fooled -- if the kernel is older than 2.4.25, it's likely a kernel FAT32 software issue.

I encountered this problem not long ago running 2.4.20-46.7 ... RedHat still considers RH7.3 an officially supported distro and still provides regular patch updates for it -- addressing security issues, but apparently not addressing other critical kernel bugs like large FAT32 support ?! So I had to track-down and apply the appropriate kernel patches myself, and all is well now.

Cheers,

-- Jim

haertig 11-25-2006 06:34 PM

Quote:

Originally Posted by brjoon1021
3. Is there a preference for FAT32 or NTFS for the disk that will be shared?

Define "shared". Are you talking ONE system that will be dual-booting Windows and Linux and accessing the same disk locally, or DIFFERENT systems that will be sharing things across a network?

---

If it's a single dual-boot system, FAT32 is the way to go. At this point in time, I still don't trust Linux to write NTFS. Others might, I don't. I'm too paranoid.

---

If it's two seperate systems sharing over the network, then the filesystem type doesn't matter as far as sharing goes. In this case, I would definitely go with NTFS on the Windows side of the house. NTFS is a journeling filesystem and therefore much more robust than FAT32. Your chances of corruption and/or data loss are greater with FAT32 than with NTFS.

sundialsvcs 11-25-2006 09:31 PM

When I'm dealing with external media and hard-drives, which I happen to do quite often, I choose a format that I can expect to be readable by "any computer I want to plug it into." Right now, FAT32 is that lingua franca. I can expect to find support for that format "everywhere," and I can expect it to work.

brjoon1021 11-28-2006 05:44 AM

When I posted I should have been more clear: This is one local system with several disks; one disk will be storage of audio, video, docements and pictures for Windows and a mess of Linuxes. This is not a networked system.

I am pretty sure that none of the distros that I am using have a 2.4 kernel version. Assuming a 2.6 kernel, does that mean that I can just make a 39 GIG FAT32 partition and not worry about ext2 or ext3? I was a little disappointed to read that I was better off making a FAT32 partition and a Linux partition on the disk. - following is a helpful response to my question:

"I had the same delima as you and what I ultmetly did was create a parttion 20gigs as fat32 and 30 as ext3 to store data. In windows i used a ext2 filesystem driver to access the data on the 30gigs of space. The reason I made the other is that the driver thats availible for windows to write and read from ext2/3 has issues when installing windows software into the parttion. thus the need for the 20 gig fat32."

Also, do I have to make any symbolic links from the Linuxes to the FAT32 partition? I mean, let's say I have Ubuntu or PCLinuxOS booted up and I want to save a MP3, how do I put it into the audio folder on the FAT32 disk?
Sorry, but pretty new to Linux still... I don't know how to do this and I will have to do it with a bunch of Linux distros.

meetscott 11-28-2006 09:34 AM

Sounds like you know what to do. As far as making say a fat32 disk mount in the Linux installations at boot time you just have to make sure the kernels have fat32 support built in or loaded as a module. Also you have to add a stanza to /etc/fstab. Maybe something like this:

/dev/hda1 /audio vfat defaults,umask=000 1 0

This implies that your fat32 disk is the first one, formatted with a fat32 filesystem, on the first partition. The "a" means the first physical disk in /dev/hda. The 1 means the first partition on /dev/hda. Note that the umask=000 makes this filesystem universally readable, writable, and executable. This may or may not make sense for you. Use a different umask like 002 so that you can create audio groups if you like that have write access whereas everyone else will only have read/execute. This will mount things with 775 permissions. The /audio is the directory location to mount your audio media. This is just an example. Change it to anything you like but just make sure you create the corresponding directory or the mount won't happen properly. You may need to add the mount command explicitly in your startup scripts depending on the distro.

To put it another way, this makes the directory /audio contain the contents of the first partition of the first hard disk.

Post back if this doesn't make sense to you, I can elaborate more.

brjoon1021 02-19-2007 11:41 AM

Is there an advantage to using a separate networked computer for storage as far as this filesystem conondrum goes? I have an old P3 450 that I can stick the same hard drive into. I don't know enough to know whether that really would change anything or not - as far as whether it would be EASIER to access an ext2 or ext3 from windows without a driver...

Or, to put this all another way... would I be making this easier to do by adding a second box / disk just for storage?

I have had enough people caution me about FAT32 to make me uncomfortable about using it as the whole 40 GB partition for storage. I have had enough people comment on the windows drivers for reading and writing to ext2 and ext3 to make me a little unfomfortable about that. Not to mention the fact that I don't won't to slow the reads and writes down from within windows because I will be editing Video and pictures in Windows. So, I am still at a loss about how to best do this.

michaelk 02-19-2007 12:09 PM

FAT32 is the most compatable and I would not worry about a 40GB FAT32 partition. Windows XP can not create or format anything > 32GB but if it already exists reading or writing is not a problem. In a nutshell this limitation is based on cluster size and you will use up more disk space with smaller files.

NTFS support is very good but would only write to a data partition that was frequently backed up. FAT32 is more susceptible to corruption then a journaling filesystem or NTFS but again always backup critical data. The only limitation is the FAT32 max file size when dealing with videos/dvds.

BTW Redhat has not supported any version <=9 in several years. Fedora legacy provided security updates but these have ended as of last year.

davcefai 02-19-2007 12:20 PM

If you use another computer for file storage then:

1. You need to install an OS, which will take up space.
2. The network transfer rate will be slower than transfers from a local disc. This could be a show-stopper for video editing. Also only the very foolhardy burn CDs or DVDs across a network.

Personally, in your situation I would go for FAT32.

brjoon1021 02-28-2007 10:42 AM

I went with a 38 GB FAT32 partition, so far so good. Thanks


All times are GMT -5. The time now is 06:00 AM.