View previous topic :: View next topic |
Author |
Message |
K-Dawg Apprentice

Joined: 06 Jan 2004 Posts: 186 Location: Denver, Colorado
|
Posted: Tue May 04, 2004 8:58 am Post subject: NTFS mounting and writing questions |
|
|
Hi all, I have a quick question I was hoping I could get some insight here. I have heard that you can corrupt ntfs file systems by mounting them rw and not just read-only. I have ntfs support built into my kernel and I have been doing a mount /dev/hdb1 /mnt/ntfs -t ntfs -r (120 gig ntfs old storage hd). Then cd to /mnt/ntfs and cp files to gentoo / filesystem as wanted. My main questions are how does Samba do this and is it safe to copy files from my gentoo system to a ntfs share on an XP box and also if me chmod files on an ntfs partition can corrupt them?
Secondly I would like to know of a good solution for this 120 gig hd as storage? Do you think I should just strip needed data of to other hd and wipe and format to ext3 or fat32 for data storage? What in some of your opinions is the best bet here?
All replies greatly appreciated and needed  |
|
Back to top |
|
 |
ynef n00b


Joined: 14 Jan 2004 Posts: 69 Location: Lund, Sweden
|
Posted: Tue May 04, 2004 9:30 am Post subject: Re: NTFS mounting and writing questions |
|
|
K-Dawg wrote: | Hi all, I have a quick question I was hoping I could get some insight here. I have heard that you can corrupt ntfs file systems by mounting them rw and not just read-only. I have ntfs support built into my kernel and I have been doing a mount /dev/hdb1 /mnt/ntfs -t ntfs -r (120 gig ntfs old storage hd). Then cd to /mnt/ntfs and cp files to gentoo / filesystem as wanted. My main questions are how does Samba do this and is it safe to copy files from my gentoo system to a ntfs share on an XP box and also if me chmod files on an ntfs partition can corrupt them?
Secondly I would like to know of a good solution for this 120 gig hd as storage? Do you think I should just strip needed data of to other hd and wipe and format to ext3 or fat32 for data storage? What in some of your opinions is the best bet here?
All replies greatly appreciated and needed  |
Let's break it down a bit:
How does Samba copy files from one box to another?
Well, Samba does not write the actual files on the Windows box -- it uses the SMB network protocol (hence the name SaMBa) to instruct the Windows box to do it. So that's why you can safely write files across the network with it -- it's the host operating system that does the actual file handling. Remember: Samba handles network connections, not file systems.
There is of course the smbfs file system. The name seems to hint that I am wrong in my previous statement, but the way it works is that it's a virtual file system that sits on top of your current file system that waits for files to be sent to it from other SMB speaking computers. It gets a signal and tells your current file system to write a file -- simple.
Is Samba safe to use?
Well, yes.
If you chmod files on an NTFS partition, could it corrupt them?
If you mount it read only, you'll have a pretty hard time trying to chmod them at all, since that's something you have to have write access to do.
File system recommendation for a 120gig storage device?
Well, not counting Captive -- "The first free NTFS read/write filesystem for GNU/Linux" (because I have not used it so I can't say if it's good or bad), the only file system that is supported in both Linux and Windows is the FAT series of file systems. These are, however, horrible for large disks. The maximum partition size you should EVER make with FAT32 is 32GB, read something like this to see why. In fact, Windows currently does not allow you to make partitions larger than 32GB, IIRC.
There is an Ext2 (and Ext3 as well) driver for Windows, so it can read and write to it, but I have not tried it, so again, I can't tell you if it's good or bad.
So you'll either have to use an experimental driver for one of the OSs, make a lot of FAT32 partitions or put the drive into another computer and access it with Samba or FTP. The choice is yours. |
|
Back to top |
|
 |
scout Veteran


Joined: 08 Mar 2003 Posts: 1991 Location: France, Paris en Semaine / Metz le W-E
|
Posted: Tue May 04, 2004 9:32 am Post subject: Re: NTFS mounting and writing questions |
|
|
K-Dawg wrote: | Hi all, I have a quick question I was hoping I could get some insight here. I have heard that you can corrupt ntfs file systems by mounting them rw and not just read-only. |
Indeed, the kernel support for ntfs writes is limited and the only safe thing you can do is to overwrite an existing file by a file of the same size. Otherwise you have to try the captive project, which uses the dll of windows to write on the ntfs filesystem.
K-Dawg wrote: | I have ntfs support built into my kernel and I have been doing a mount /dev/hdb1 /mnt/ntfs -t ntfs -r (120 gig ntfs old storage hd). Then cd to /mnt/ntfs and cp files to gentoo / filesystem as wanted. |
Reading the files from ntfs works smoothely.
K-Dawg wrote: | My main questions are how does Samba do this and is it safe to copy files from my gentoo system to a ntfs share on an XP box and also if me chmod files on an ntfs partition can corrupt them? |
You mean you have a second computer right, and you want to copy files from you computer under gentoo to this second computer under XP with the help of samba: This is completely safe. If you chmod files it may not be what you want: you may change the Archive/not Archive attribute of the files for example (as far as I remeber)
K-Dawg wrote: | Secondly I would like to know of a good solution for this 120 gig hd as storage? Do you think I should just strip needed data of to other hd and wipe and format to ext3 or fat32 for data storage? What in some of your opinions is the best bet here? |
If you only use gentoo on this computer, just format it to ext3 or reiserfs or xfs. You could take a look at lvm if you are not sure of what you're doing and may want to resize your partitions later on. if you still use windows, then rather use fat32 (that way you movies and music are accessible by both operating systems), but keep in mind fat32 can't store files bigger than 4Go and that may be a limit for you (if you make some videos for example), plus the fact that fat32 is slow.
[EDIT] Hey, I was too slow,
by the way I already made a fat32 partition of 50 Go ... but I 'mkfsed' it under linux _________________ http://petition.eurolinux.org/ - Petition against ePatents
L'essence de la finesse |
|
Back to top |
|
 |
ynef n00b


Joined: 14 Jan 2004 Posts: 69 Location: Lund, Sweden
|
Posted: Tue May 04, 2004 9:45 am Post subject: Re: NTFS mounting and writing questions |
|
|
[quote="scout"] K-Dawg wrote: | [EDIT] Hey, I was too slow,
by the way I already made a fat32 partition of 50 Go ... but I 'mkfsed' it under linux |
Interesting -- I would've thought that Windows XP and the likes limited the partition size for a reason, other than reveal how horribly FAT32 scales...  |
|
Back to top |
|
 |
K-Dawg Apprentice

Joined: 06 Jan 2004 Posts: 186 Location: Denver, Colorado
|
Posted: Tue May 04, 2004 10:04 am Post subject: |
|
|
AWESOME INFO GUYS ! Yeah I thought I had researched and found that the main reason that linux did not work w/ ntfs is because ntfs is like a database that it does not play nice w/ and the whole dll subsystem thing as well. I knew that the Samba server uses the SMB (server message block) protocol (kinda like the CIFS in windows iirc) but still how is it able to safely write to an ntfs partition? Does it have te ability to interact w/ ntfs's database like file storage system? Or am i still missing something here?
Also can someone please tell me why on my 3.0.2 (i think) Samba server i can view my Windows shares through xsmbrowser like I can on my 2.2.8 Samba server? On the Samba ver 3 I can still go over to my XP box and see shares I have made in smb.conf file? And I dont think it is a permission problem Please help solve this issue as I still need to send files from my gentoo linux box to my XP box occasionally and like to do this w/ the upload feature in xsmbrowser while I'm browsing into my Xp shares.
Last edited by K-Dawg on Tue May 04, 2004 11:40 am; edited 1 time in total |
|
Back to top |
|
 |
ynef n00b


Joined: 14 Jan 2004 Posts: 69 Location: Lund, Sweden
|
Posted: Tue May 04, 2004 11:03 am Post subject: |
|
|
K-Dawg wrote: | AWESOME INFO GUYS ! Yeah I thought I had researched and found that the main reason that linux did not work w/ ntfs is because ntfs is like a database that it does not play nice w/ and the whole dll subsystem thing as well. I knew that the Samba server uses the SMB (server message block) protocol (kinda like the CIFS in windows iirc) but still how is it able to safely write to an ntfs partition? Does it have te ability to interact w/ ntfs's database like file storage system? Or am i still missing something here? |
Like I said, Samba doesn't write to NTFS. Samba instructs the host computer to do it. Think of it this way:
Linux with Samba: Hey, Windows, I want to write a file to your hard drive.
Windows: Sure.
LwS: Here's all the data -- call it "hello.jpg" when you're done.
Windows: Sure. *accepts incoming data and writes it to hard drive*
The Samba computer does not write the information itself.
Edited to add: Checkout this info on CIFS and what it does. |
|
Back to top |
|
 |
iGMAS Tux's lil' helper

Joined: 09 May 2004 Posts: 83
|
Posted: Wed Aug 04, 2004 5:13 pm Post subject: |
|
|
EDIT ....
Last edited by iGMAS on Thu Aug 05, 2004 3:27 am; edited 1 time in total |
|
Back to top |
|
 |
r4d1x Apprentice


Joined: 25 Nov 2003 Posts: 157 Location: Japan
|
Posted: Thu Aug 05, 2004 1:15 am Post subject: |
|
|
actually, fat32 will support partitions up to 120 gig. however, the max file size that can be handled is 3.85 gig. Not to be an advocate of the windows partitions (id love to see ms start supporting ext2/3) but 32 gig? Where did you hear that?
As for the rw on ntfs, if your mounting a local drive its pretty safe. I have a removable ntfs drive that i use to bring stuff from home to work with, havent had any problems yet. Back when it was in testing though, lost lots of info because of it. |
|
Back to top |
|
 |
appetitus Apprentice

Joined: 28 Sep 2003 Posts: 210
|
Posted: Fri Aug 06, 2004 4:09 am Post subject: Re: NTFS mounting and writing questions |
|
|
K-Dawg wrote: | Secondly I would like to know of a good solution for this 120 gig hd as storage? Do you think I should just strip needed data of to other hd and wipe and format to ext3 or fat32 for data storage? What in some of your opinions is the best bet here? |
If you only use gentoo on this computer, just format it to ext3 or reiserfs or xfs.
I wouldn't use XFS. Every system here that has run XFS has lost files during crashes. Ext3 is flawless (still), even under fancy RAID setups. _________________ Being a Gentoo user means living in a house inhabited by a family of crazed carpenters. When you wake up, the house is different. Maybe there is a new turret, or some walls have moved, or perhaps someone has removed the floor under your bed. |
|
Back to top |
|
 |
iGMAS Tux's lil' helper

Joined: 09 May 2004 Posts: 83
|
Posted: Mon Aug 09, 2004 6:05 pm Post subject: |
|
|
....
Last edited by iGMAS on Tue Aug 10, 2004 10:01 am; edited 1 time in total |
|
Back to top |
|
 |
nobspangle Veteran


Joined: 23 Mar 2004 Posts: 1318 Location: Manchester, UK
|
Posted: Mon Aug 09, 2004 9:39 pm Post subject: |
|
|
The problems with large fat and fat32 partitions are to do with the size of the fat (file allocation table) this table is loaded into memory, the bigger the drive the larger the fat needs to be. To make the fat smaller the cluster size is increased.
The FAT cannot be larger than 16MB, using 32k clusters (you can have up to 64k) and the maximum 268,435,445 (2^2 clusters that gives you around 8 terabytes of space. So I suppose the maximum size for a FAT32 partition is 16 terabytes (using 64k clusters).
The 32GB limit is impossed by the format programs in 2000/XP although the OS's can deal with FAT32 up to it's limits.
NTFS on the other hand can have 2^64 64k clusters which is about 10^12 terabytes |
|
Back to top |
|
 |
|