Argonne National Laboratory

GM/CA @ APS

User Program

Department of Energy Office of Science
GM/CA @ APS Sponsors:
National Institute of General Medical Sciences (NIGMS) and National Cancer Institute (NCI) of the National Institutes of Health (NIH)
 

User Program - While at the Beamline - Backups to HFS+ Drives

The proprietary MacOSX HFS+ disk format, although popular among many GMCA users, is considered as "probably the worst file-system ever" (Linus Torvalds) and has a restricted support under Linux. For several years we were using a proprietary commercial HFS+ driver for Linux by Paragon Software, but it began crashing the Linux kernel after upgrading from CentOS-6 to CentOS-7. Therefore, at present and until Paragon fixes their CentOS-7 support, we are offering an open-source driver. This driver can read any HFS+ drives, but for writing the HFS+ journaling must be temporarily disabled.

Journal is a log recording the intentions of file system changes before they are committed. Let say, you are copying a file. The file system index is updated once copying is complete while the journal (the log) is updated as soon as the copying starts. It may provide better filesystem recovery in case of unsafe disconnect or sudden power loss. For those who are interested in additional details, please consult the following Wikipedia article.

The journal on an external HFS+ drive can be disabled either under MacOSX or directly under Linux once you connect the drive to the USB port of any GMCA workstation. The precondition is that the drive is not used by Apple's Time Machine software. To disable the journal under MacOSX, hook the drive to any Mac, then start Disk Utility, unmount the volume and click on the "Disable Journaling" button in the File menu.

To disable the HFS+ journal under Linux, hook the drive to available GMCA workstation (ws1 to ws7), open a terminal and run the "mount" command. Look at the command output and find the device corresponding to the HFS+ drive. For example, let it be /dev/sdb1. If the output shows that the drive is mounted read-only (ro), then it means that the driver detected an active HFS+ journal. In this case do "safe disconnect" to unmount the drive and run:

sudo disable_hfsplus_journal /dev/sdb1

If you have any concerns about the health of HFS+ filesystem, we recommend to run the file system check before disabling the journal:

sudo fsck.hfsplus /dev/sdb1

Now remount the drive (unplug it and then plugin back again) and verify that it is mounted read-write by running the "mount" command again. In case of any problem please consult your GMCA host or the GMCA computing support team.

The rest of the operations with the drive, i.e. running rsync, is the same as usually. Once you are done with the backup, unmount the drive using "safe disconnect". Do not forget to turn the journal back on. To do that, hook the drive to any MacOSX computer, then start Disk Utility, select the drive and click on the "Enable Journaling" button.

Note: connecting USB3 drives to USB3 ports is strongly advised. Not all USB ports on the workstations are USB3; look at the labels or ask your host.

Possible Limitations

  1. The drive is being used with the Apple Time Machine. You can disable using an external drive as a Time Machine backup by hooking it to your Mac and launching the Time Machine application.
  2. The drive is larger than 2TB. In the past this could lead to the file system corruption on the drive. We do not know if this problem is solved in the current version of the driver.

Additional Information

For the latest changes with the backup procedures and detailed technical instructions please refer the Backup Manual (PDF).

 

 

 


GM/CA @ APS is an Office of Science User Facility operated for the U.S. Department of Energy Office of Science by Argonne National Laboratory

UChicago Argonne LLC | Privacy & Security Notice | Contact Us | A-Z Index | Search