Fedora Linux Support Community & Resources Center
  #1  
Old 22nd March 2012, 10:18 PM
joe.pelayo Offline
An ape descendant
 
Join Date: Dec 2006
Location: Mexico City
Age: 30
Posts: 3,105
macossafari
Question Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

Hello everybody.

I write to ask for advice on how to share an external hard drive between a Fedora (16) machine and a PowerMac G5 (Mac OSX "Leopard").

A couple of weeks ago I assigned for work purposes an external USB 2.0 desktop drive (Seagate FreeAgent Desktop, 750GB Seagate Barracuda @ 7200RPM, 32MB). The idea is to have a place to store and keep backups of the simulations and data I get during my PhD. Since at my office I have a Mac and at home I use Fedora, I need to format the drive with a suitable "common" filesystem which would allow me to read & write from both operating systems. Needless to say, this drive has to be reliable enough.

My first choice was to format it as HFS+, but then I learnt that even though Linux can read the drive, it can not write to it unless journaling is off (which, as I have already experienced, decreases the reliability of the drive, since just yesterday the drive kinda suffered from amnesia because Linux HFS+ writing is not that reliable and hung tonight). Now, despite the fact the Mac recognizes the drive it can not mount it!). So apparently HFS+ is not a reliable solution.

The second choice was to make the Mac read ext(2/3/4) and so installed MacFuse along with another utility and the Mac could read the drive without issue (for writing it required some obscure command, which worked). The problem that while copying data to the drive, it managed to crash the Mac forcing it to reboot, so ext4 on Mac is even more problematic than HFS in Linux.

Given the size of both the drive and the data I will be handling, FAT32 is not an option either, and I find it kind of bizarre to use NTFS (a format neither operating system uses natively).

The aforementioned external drive was purchased back in 2009 and was given reasonable use (just backup), the reason I dumped it to my office was because a new 1TB drive had replaced it as my main "repository". However, from the very beginning, Palimpsest complained it had a couple of bad sectors, but nevertheless it worked very well (it was never filled up to capacity). In Linux I had it with two partitions: one NTFS and one ext4. With the Mac I've been able to format it but has given me some problems because if I use MBR for the partition table the partitioner fails.

Another question is: which is more likely to be responsible for the instability of the drive: the supposedly defective hard drive, or the experimental drivers for reading & writing "alien" filesystems on either machine?

Thanks,
Joe.
__________________
Notebook: Acer Aspire 5536-5112.
AMD Athlon X2 QL64 @ 2.1GHz, 4GB DDR2 PC2-5300, ATI Radeon HD3200 (256MB), 250GB Toshiba HDD, HL-DT-ST DVDRAM GT20N
Windows 7 Professional, Fedora 20 x86_64
Reply With Quote
  #2  
Old 10th April 2012, 04:01 AM
mdlowry Offline
Registered User
 
Join Date: Jun 2010
Location: New Hampshire, USA
Posts: 36
linuxfirefox
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

I seem to recall that Linux support of HFS (not +) was decent. Older version of a filesystem, but may work for you.
Reply With Quote
  #3  
Old 10th April 2012, 04:14 AM
Finalzone Offline
Community Manager
 
Join Date: Mar 2004
Location: Vancouver, Canada
Posts: 2,487
linuxfirefox
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

Have you considered to use Ext2 or Ext3 for the partition?
__________________
Desktop CPU: AMD Phenom II(tm) X4 Processor 940 AM2+ - Memory: 8GB DDR2-RAM - GPU: Nvidia Geforce GTX 460 v2 - OS: Fedora 21 Workstation Alpha x86-64 and Windows 7 Ultimate SP1 64-bit
Laptop Sony VAIO N250E - OS: Fedora 21 Alpha Design Suite i386.
Reply With Quote
  #4  
Old 10th April 2012, 10:46 AM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

Quote:
Originally Posted by mdlowry View Post
I seem to recall that Linux support of HFS (not +) was decent. Older version of a filesystem, but may work for you.
HFS maximum volume size is 2GB. It's useless.

HFS+ itself is 14 years old.

Original poster should consider NTFS. Both OS's can do read/write of NTFS, although it's not enabled by default on Mac OS X.

Another option is exFAT support for Linux. It is natively supported on OS X for several years now (I think as of 10.6.6 or later). It's functionally FAT64 but less redundant than FAT32. There is no journaling.

http://code.google.com/p/exfat/

The best option would be a NAS. Even a baby FreeNAS is workable for what's being talked about. It can natively do NFS for Linux, and AFP for Mac OS. Plus it's sharable concurrently, unlike a block level device.

---------- Post added at 02:46 AM ---------- Previous post was at 02:37 AM ----------

Quote:
Originally Posted by joe.pelayo View Post
Another question is: which is more likely to be responsible for the instability of the drive: the supposedly defective hard drive, or the experimental drivers for reading & writing "alien" filesystems on either machine?
Asks for speculation.

Boot linux, and use smartmontools (included, although there is a MacPorts version) to run offline and extended tests on the drive. Realize that most external bridge chipsets (Firewire and USB) suck donkey balls, and don't fully pass through ATA commands for SMART or ATA Secure Erase. So you'll almost certainly need it direct connected to a SATA or eSATA port.

Something like
Code:
smartctl -a /dev/sdb
will produce some passively collected data about the disk, if there are an unusual number of read errors, or uncorrected errors, CRC errors, or sector related errors. Better is to do a long extended test:
Code:
smartctl -t long /dev/sdb
Then wait for the prescribed time. Then do another -a to see the results and if the test completed or not, and if not what LBA it failed on. These are non-destructive tests, BTW.

Bad sectors develop over time. It's a good idea to zero the drive periodically. The fastest way to do this is with the ATA Secure Erase feature, using hdparm.

http://mackonsti.wordpress.com/2011/...e-ata-command/



* I assume the disk in question is /dev/sdb, which may be an incorrect assumption.
Reply With Quote
  #5  
Old 10th April 2012, 04:22 PM
srs5694 Offline
Registered User
 
Join Date: Jan 2011
Location: Woonsocket, RI
Posts: 521
linuxfirefox
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

Quote:
Originally Posted by joe.pelayo View Post
A couple of weeks ago I assigned for work purposes an external USB 2.0 desktop drive (Seagate FreeAgent Desktop, 750GB Seagate Barracuda @ 7200RPM, 32MB).
...
My first choice was to format it as HFS+, but ... apparently HFS+ is not a reliable solution.

The second choice was to make the Mac read ext(2/3/4) ... while copying data to the drive, it managed to crash the Mac
...
Given the size of both the drive and the data I will be handling, FAT32 is not an option either, and I find it kind of bizarre to use NTFS (a format neither operating system uses natively).
FAT32 is perfectly capable of handling a 750 GB drive. According to Wikipedia, FAT32's volume size limit is 2 TB (I suspect they really mean 2 TiB), which is well over your drive's size. That said, FAT does have limits on individual file size (4 GiB - 1 for FAT32), which can be problematic if you're storing big files on the disk. If this isn't an issue for you, though, my recommendation is to take another look at FAT.

NTFS is not a good choice because neither of your OSes has decent NTFS check and recovery tools. There is a Linux "ntfsfix" utility, but it does only the most basic checks and then marks the disk as requiring attention by Windows. Thus, using NTFS means that when a problem occurs, neither OS will be able to use the disk until after it's been checked with Windows. On an external drive, that might not be too onerous if you've got a Windows box handy, but it's still an undesirable extra step. One more point: The last I heard (which was OS X 10.6), OS X's read/write NTFS support was disabled by default because it's extremely dangerous. I've seen several reports of it trashing disks. Thus, if you do decide to go with NTFS, I suggest using the version provided by MacFUSE or some other add-on (I think there's at least one commercial NTFS driver for OS X). OTOH, I've not looked into OS X 10.7's NTFS support; it could be more reliable.

Quote:
Palimpsest complained it had a couple of bad sectors, but nevertheless it worked very well (it was never filled up to capacity). In Linux I had it with two partitions: one NTFS and one ext4. With the Mac I've been able to format it but has given me some problems because if I use MBR for the partition table the partitioner fails.

Another question is: which is more likely to be responsible for the instability of the drive: the supposedly defective hard drive, or the experimental drivers for reading & writing "alien" filesystems on either machine?
Personally, I've not had problems with reading and writing unjournaled HFS+ in Linux, at least not in the last couple of years. I've not done this a lot, though, so it could be I've just been lucky. Still, the fact that Palimpsest claimed you had bad sectors, and the symptom with OS X being unable to partition the disk using MBR, make me suspicious that you may be running into bad-disk problems. I recommend running a more thorough SMART test, as chrismurphy details. Unfortunately, the results can sometimes be hard to interpret, so you may need to post back with details.
Reply With Quote
  #6  
Old 10th April 2012, 05:01 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,878
linuxfirefox
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

It sort of depends on what you are doing...

One way to use the disk is as a raw drive - and use something like tar to read/write files to it.

Yes, adding files puts them at the end of file.

You could try using "ar", as that has random access, and can delete files.

Not saying this is a good way, just "a" way.
Reply With Quote
  #7  
Old 10th April 2012, 08:20 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

Quote:
Originally Posted by srs5694 View Post
NTFS is not a good choice because neither of your OSes has decent NTFS check and recovery tools.
It's a fair point. But neither have a good FAT check either for that matter. NTFS is at least a journaled file system, but I agree with the later assessment that forcing read/write from either Snow Leopard or Lion default is asking for flaky behavior. There are pretty decent reviews of this add-on for NTFS read/write support:
http://www.paragon-software.com/home/ntfs-mac/

Quote:
Personally, I've not had problems with reading and writing unjournaled HFS+ in Linux, at least not in the last couple of years. I've not done this a lot, though, so it could be I've just been lucky.
Literally any hiccup: disk disconnection before it's unmounted, power failure, kernel panic, unclean shutdowns... have a high degree of likelihood to trash the disk. Even on Mac OS X, the shutdowns are ROUTINELY unclean. If I merely startup, reboot, and then rebuild the directory structure with fsck_hfs, repairs are made. i.e. there is a disconnect between the journal and the directory, and the journal has the correct state of the disk, while the disk catalog does not.

I consider HFS+ to be fragile. JHFS+/X are marginally less fragile.


Quote:
I recommend running a more thorough SMART test, as chrismurphy details. Unfortunately, the results can sometimes be hard to interpret, so you may need to post back with details.
Indeed. Don't forget to format with the CODE flags so it's readable!

Invariably SMART will say the health of the disk is "PASS" even if there are hundreds or thousands of bad sectors. So it is an interpretive process.
Reply With Quote
  #8  
Old 11th April 2012, 02:41 PM
joe.pelayo Offline
An ape descendant
 
Join Date: Dec 2006
Location: Mexico City
Age: 30
Posts: 3,105
macossafari
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

Thanks for your complete and through responses (I'll keep those advises in mind), however I already 'solved' the problem by formatting the drive as ext4 and leaving it at home next to my Linux machine. The Mac with it's newly assigned internal 250GB drive should be good for most of my purposes until 2013 at the very least.

Even though I would have loved to make that work in a reliable efficient fashion (the drive sharing), I decided that since the aforementioned external drive behaved properly for years using ext4 I'd better leave it at that for the time being. Right now the drive is occupied and I don't feel compelled to run the suggested tests because (would have run them if it were empty) I guess its replacement will be here soon enough to pick the slack (with todays technology evolution a hard drive like that [750GB, USB2] soon will be as laughable as an internal WD 3.5 drive I keep with 216MB of total capacity!).

As for the data-keeping purposes the hard drive currently serves to, I discovered that most of the files I need to transfer are hugely compressed as .tar.gz, so I can easily transport them to their "final" destination on smaller drives.

Thanks,
Joe.
__________________
Notebook: Acer Aspire 5536-5112.
AMD Athlon X2 QL64 @ 2.1GHz, 4GB DDR2 PC2-5300, ATI Radeon HD3200 (256MB), 250GB Toshiba HDD, HL-DT-ST DVDRAM GT20N
Windows 7 Professional, Fedora 20 x86_64

Last edited by joe.pelayo; 11th April 2012 at 02:43 PM.
Reply With Quote
  #9  
Old 11th April 2012, 06:18 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

SMART tests do not require the drives be empty. They are non-destructive tests. The logic of not running them when you even remotely think there could be a hardware problem with the disk makes no sense. You should run the tests.
Reply With Quote
  #10  
Old 11th April 2012, 07:01 PM
srs5694 Offline
Registered User
 
Join Date: Jan 2011
Location: Woonsocket, RI
Posts: 521
linuxfirefox
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

Quote:
Originally Posted by chrismurphy View Post
Quote:
Originally Posted by srs5694
NTFS is not a good choice because neither of your OSes has decent NTFS check and recovery tools.
It's a fair point. But neither have a good FAT check either for that matter.
Both Linux and OS X do include FAT filesystem check utilities. I have less experience with this under OS X, but under Linux, the tool (known as dosfsck, fsck.msdos, and various other names) does a number of repairs -- type "man dosfsck" to see the details. I don't know how comprehensive these fixes are compared to what CHKDSK under Windows does, but dosfsck is far better than ntfsfix, so in this respect FAT is a better cross-platform filesystem than NTFS. (As noted in my previous message, though, FAT has its limitations, which are deal-breakers for many purposes.)

Quote:
SMART tests do not require the drives be empty. They are non-destructive tests. The logic of not running them when you even remotely think there could be a hardware problem with the disk makes no sense. You should run the tests.
I definitely agree with this. In fact, I run SMART tests on all my hard disks, even if I have no reason to suspect them, from time to time.
Reply With Quote
  #11  
Old 14th April 2012, 08:28 AM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

I don't know if FAT32 with non-native* repair tools and no journal, is worse off or better off than NTFS with marginally less capable non-native repair tools but with a journal. However FAT32 vs HFS+, you at least have easy access to native repair tools on one platform, even if it's not a journaled file system.

Unless someone demonstrates regular problems with HFS+ writes on Linux in normal use (in which case they need to file a bug so it can get fixed), I would sooner use HFS+ than FAT32. If I had reasonably convenient access to Windows, then I might go with NTFS instead.

However, I will object to characterizing this vessel as a backup. I wouldn't trust any file system to read/write of non-native file systems enough to consider it a backup. It's a fragile copy that can become corrupt at anytime and useless. It's possible, maybe likely, neither platform will give you advanced warning until you start seeing corrupt data or an inability to access it. I just don't think there's the use case and user base really hitting on this kind of cross platform application of any of these filesystems.

Personally I think you're better off with a native file system backup of each platform's data, i.e. two backups. One home, one work. Then use a network to share data across systems, rather than physically transporting a disk which you could drop or submerge or have abducted or lose. You're the one ascribing the qualifier "it has to be reliable enough." I wouldn't characterize the mobile xplatform external disk as that. It's convenient. Sorta. Until it doesn't work.

You could also look at a manual rsync script after you're done working on each platform, to produce a mirror of the dataset on Fedora and Mac OS. Both platforms have ssh and rsync so you could just create a script that you run as you're leaving each location. By the time you get to the other location, good chance the datasets are in sync. Off hand I'm not thinking of a way with rsync or other sync tool, to setup an automatic bidirectional sync between two computers that resolves all of the logical problems that can develop. If it can be done great. But even a manually run script to maintain a mirror is better than physically transporting a drive.

With the mirrored approach, you can pick one platform to backup to the external disk. And use the best offering on that chosen platform for the file system. For Mac OS, JHFSX (case-sensitive, journaled). Or for Linux, ext4 or XFS until btrfs is done (or done enough, I'm actually using it for the third backup set). And don't transport the drive around, just leave it attached and have the computer configured for regular automatic backups to that external disk.

I think your original proposed solutions seems fragile. It might work.

* non-native meaning not provided by the upstream maintainer/creator of the file system.

Last edited by chrismurphy; 14th April 2012 at 08:35 AM.
Reply With Quote
  #12  
Old 14th April 2012, 05:05 PM
srs5694 Offline
Registered User
 
Join Date: Jan 2011
Location: Woonsocket, RI
Posts: 521
linuxfirefox
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

You've made some good suggestions about managing backups; however....

Quote:
Originally Posted by chrismurphy View Post
I don't know if FAT32 with non-native* repair tools and no journal, is worse off or better off than NTFS with marginally less capable non-native repair tools but with a journal.
First, a journal does not improve the reliability of a filesystem. Its purpose is to speed up disk checks in the event that you run a disk checking tool (fsck, CHKDSK, or whatever).

Second, I object to the characterization of NTFS's Linux repair tools as being only "marginally" worse than those of FAT. The Linux ntfsfix utility is next to useless; it does only very basic checks and then marks the filesystem as requiring attention by Windows. At this point, Linux can't use the filesystem at all, so you really haven't gained much by using ntfsfix. Linux's dosfsck, OTOH, performs quite a few checks, can optionally fix quite a few things, and leaves the filesystem in a usable state (assuming the damage wasn't too great for it to handle, of course -- but the same caveat applies to any filesystem check utility). This is much more than a "marginal" difference between these two tools.

Third, even aside from disk-checking tools, the level of Linux's NTFS support is far below the level of Linux's support for FAT or HFS+. IIRC, the Linux kernel provides read-only and very limited read/write capabilities with NTFS. For fuller NTFS write support, you need to use a FUSE driver. I've seen a number of problem reports with this driver, although I use it little enough that I've not had problems with it myself. I have run some simple speed tests, though, and the FUSE NTFS driver is significantly slower than the Linux kernel FAT driver. Thus, from a Linux perspective, unless you need support for files larger than 4 GiB (an admittedly major qualification), there's no contest: FAT is better than NTFS.

Quote:
However FAT32 vs HFS+, you at least have easy access to native repair tools on one platform, even if it's not a journaled file system.
Actually, there are HFS+ repair tools on Linux as well as on OS X. I haven't looked into this in detail, but it appears that Apple's HFS+ utilities are open source, and so have long been included in Linux. That said, I don't know how up to date the Linux tools are or if Apple might be holding back certain features from release in the open source versions.

Quote:
I wouldn't trust any file system to read/write of non-native file systems enough to consider it a backup. It's a fragile copy that can become corrupt at anytime and useless. It's possible, maybe likely, neither platform will give you advanced warning until you start seeing corrupt data or an inability to access it. I just don't think there's the use case and user base really hitting on this kind of cross platform application of any of these filesystems.
IMHO, this is going a bit far. Both Linux and OS X provide very robust and time-tested FAT support. In fact, in the case of Linux, this support is reliable enough that it's used in quite a few commercial devices: many Android cell phones, eBook readers, and tablets use FAT on removable media. Although I can be pretty cynical sometimes, even I am not cynical enough to suggest that the manufacturers of these devices would use something that's as fragile (your word) as you're saying FAT under Linux is.

My personal experience, over the course of more than 15 years, is that Linux's FAT support is quite robust. Of course, any filesystem can become damaged, which is why we keep backups (or should!). FAT is old and klunky and unsuitable for many purposes, but it has the advantage of very widespread and robust cross-platform support.
Reply With Quote
  #13  
Old 14th April 2012, 09:44 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

Fair enough on all points. However, I still say physically transporting a hard drive, which also means vigilantly unmounting the filesystem before its daily disconnects from each system - there is a bug somewhere in Fedora (kernel, or CUPS, not sure yet) where umount isn't unmounting disks. Concerning to say the least.

So I still prefer my last idea. Mirror the two computers using rsync or some other utility if it can automated mirroring. The syncs will be incremental, so unless the data files are particularly large individual files, the syncs should go fairly quickly. And then use the external disk as backup for one of the mirrors. That's pretty straightforward and safe and raises fewer questions or concerns about disk sharing using either FAT32 or HFS Plus.
Reply With Quote
  #14  
Old 14th April 2012, 10:03 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,878
linuxfirefox
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

I have yet to be unable to dismount an idle filesystem.

Try "fuser -c" on the filesystem mount to see what processes are using it and keeping it from being dismounted. Frequently I find that I have set my working directory there and forgot it.
Reply With Quote
  #15  
Old 14th April 2012, 11:10 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: Sharing an external hard drive between Fedora 16 and Mac OSX "Leopard"

It's not a case of 'device busy' it's a case where it appears to be unmounted does not show up in mount or df, but hasn't flushed data to the disk. Or something. I'll see if I can find the thread.

---------- Post added at 02:22 PM ---------- Previous post was at 02:20 PM ----------

Here's one of them.
http://lists.fedoraproject.org/piper...ch/164880.html

---------- Post added at 03:10 PM ---------- Previous post was at 02:22 PM ----------

Another possibility is UDF.

http://unix.stackexchange.com/questi...oming-to-linux
http://forums.fedoraforum.org/showthread.php?t=274145

On 10.6.8 I have an fsck_udf, but not on Fedora. Hmm.
Reply With Quote
Reply

Tags
drive, external, fedora, hard, leopard, mac, osx, sharing

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora 11 doesn't "see" second hard drive scpatterson EOL (End Of Life) Versions 0 7th November 2010 11:48 PM
Mount a network hard drive in an easy way without gnome menu "Connect to server" Perty Servers & Networking 0 16th December 2008 10:34 PM
Can I boot "Fedora Live" from its ISO located on hard drive serge Installation, Upgrades and Live Media 19 17th June 2008 05:48 AM
Can't use "ln" on external hard drive ycai Using Fedora 6 27th June 2007 03:54 AM
Newbie asks "How much space left on my hard-drive?" d_GeNeRiT Using Fedora 6 18th March 2006 04:21 AM


Current GMT-time: 00:23 (Wednesday, 26-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Haldensleben I Instagram Photos - Etawah Instagram Photos - Kuala Belait