just lost an HFS+ partition during rm, not sure why
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
just lost an HFS+ partition during rm, not sure why
I have a triple-boot MacBook Pro (booted with rEFIt) with GPT partitions for OS X 10.4, Slackware 13.37, HFS+ (case-sensitive, non-journaled), and a few others. This last partition provides a shared file system between Linux and OS X.
To make a long story short, I decided to enable Time Machine in OS X, after having to reinstall OS X today, so that next time I won't have to reinstall every package. I made the mistake of setting my backup volume to the shared partition; this is the partition I lost.
For those of you who aren't familiar, Time Machine does some sort of periodic incremental backup, probably like the old System Restore stuff for that other OS. It enabled journaling on the partition being backed up to without asking. I changed my mind while it was in the middle of the initial backup, and when I realized journaling had been turned on I "turned it off" from the command line with diskutil disableJournal /Volumes/volume.
OS X wouldn't let me delete the backup directory it created (or maybe I didn't try hard enough), so I did sudo rm -rvfstuff from Slackware. Partway through I got what I think was a kernel message about an invalid instruction, followed by a hardware hang. In retrospect, I should have copied the entire screen with GPM, but I didn't. I hung 3 more terminals trying to ls, umount, and reboot; I ended up doing a hard shutdown. OS X was unable to do anything to repair the file system.
I'm wondering if either rm or the driver choked on the filenames for the backup files since some of them had non-ASCII characters, or if something was left behind when I removed journaling (the .journal* files were gone, however.)
In any case, I erased the partition and restored the data from my own backup. I can't say I want to do this again, though! Should I not be relying on the Linux HFS+ driver? I actually rarely touch OS X; therefore, I rarely touch this partition with OS X.
I actually rarely touch OS X; therefore, I rarely touch this partition with OS X.
Q 1: Do you really need a shared HFS+ partition at all? Maybe you could format it ext3/4 and just use a USB key for the odd file transfer?
Q 2: If you do need it, could you not use rsync for backups and forget about Time Machine?
Thanks for the ideas. The main point of having the HFS+ partition is to make it as little work as possible to restart in OS X to check something, e.g. how a word-processor file opens or if I can compile something that I wrote to be portable. I also want to be able to open any of my files for reference while I'm in OS X.
I had to reinstall OS X because a certain proprietary program I need for work wouldn't install on a case-sensitive filesystem. Because of that I also have to reinstall all of the applications, but there weren't that many. I probably won't back up my OS X because I don't really care about it.
There might be a problem with directory modification in Slackware. I used mkdir, install -d, and svn ci, which resulted in some directory changes, some just date changes. The filesystem was clean before that, but when I checked the filesystem in OS X afterward I got several lines like
Code:
HasFolderCount flag needs to be set (id = 2911)
(It should be 0x10 instead of 0)
I looked up the files by inode (17 of them) and all were directories related to the commands I mentioned above.
I've been using this partition in Kubuntu for over a year without problems, but I have the hfsprogs package installed (HFS+ tools ported from OS X); I don't have those tools in Slackware. I wonder if the default HFS+ support for Slackware is just unstable. I haven't been able to find a Slackware version of hfsprogs and the Debian source package for it looks like it needs to be built on Debian. Of course, the Slackware installer has only supported GPT installs for a little over a year so I'm sure there aren't a lot of Slackers using HFS+.
update: I verified that the same directory error happens when using Kubuntu, so I'm sure that error is just the Linux driver.
I never figured out what happened to my filesystem, but I downloaded the source and build script for hfsprogs from http://slackware.org.uk/salix/i486/1...ce/a/hfsprogs/ so now my Slackware64 13.37 has HFS+ and not just HFS. I had to install libbsd, which is available using slackpkg.
Kevin Barry
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.