#7407 closed enhancement (wontfix)
diskdev_cmds package
Reported by: | jake1981 <oskari.rauta@…> | Owned by: | nico |
---|---|---|---|
Priority: | normal | Milestone: | Barrier Breaker 14.07 |
Component: | packages | Version: | Trunk |
Keywords: | hfs hfsplus fsck diskdev_cmds | Cc: |
Description
Here's package diskdev_cmds which contains fsck for hfs and hfs+ volumes. I personally use a Mac, and I have a disk shared through my router (with netatalk and few other protocols) - although, whenever I want to put some large files to the disk, easiest way is to disconnect it from the router and connect it directly to USB port in my computer, this way transfer happens with highest available speed. OS X does support numerous filesystems, and with 3rd party drivers it supports even more- but I decided to stick with non-journaled hfs+ format, as openwrt/linux also supports it just fine with read/write capability (when I enabled journaling, I lacked writing capability). Also, hfs+ is a nice format.
Anyway, I live in a area where power outs are common, and when power gets back on- disk is in read only mode until fsck has been executed. It's just that openwrt does not have fsck.hfs - until now.
This is originally from opendarwin project, it was ported to linux by gentoo - and now I have ported it to openwrt. Originally this project also had mkfs.hfs but it didn't want to compile correctly and I became to think that fsck is a very good start, usually partitioning after all is done on a computer running bigger distribution than openwrt..
Here's a diff to packages..
Attachments (1)
Change History (9)
Changed 8 years ago by jake1981 <oskari.rauta@…>
comment:1 Changed 8 years ago by nico
- Milestone changed from Backfire 10.03.1 to Kamikaze
- Owner changed from developers to nico
- Status changed from new to accepted
- Version changed from Backfire 10.03 to Trunk
comment:2 follow-up: ↓ 3 Changed 6 years ago by Oskari Rauta <oskari.rauta@…>
Why isn't this included in packages???
comment:3 in reply to: ↑ 2 Changed 6 years ago by anonymous
comment:4 Changed 5 years ago by anonymous
This works good Oskari! For latest Backfire, you'll also need a file in /lib/functions/fsck/ called hfs.sh or something (chmod it 755) that contains something like this; otherwise you'll be unable to set enabled_fsck to 1 in /etc/config/fstab for hfsplus (or ancient hfs) filesystems. It's not in the diff, also not sure why this package is not in the Backfire packages repository.
#!/bin/sh
fsck_it() {
/sbin/fsck_hfs -p "$device" 2>&1 | logger -t "fstab: fsck_hfs ($device)"
local status="$?"
case "$status" in
0|1) ;; #success
2) reboot;;
4) echo "fsck_hfs ($device): Warning! Uncorrected errors."| logger -t fstab
return 1
;;
*) echo "fsck_hfs ($device): Error $status. Check not complete."| logger -t fstab;;
esac
return 0
}
fsck_hfsplus() {
fsck_it "$0"
}
append libmount_known_fsck "hfsplus"
fsck_hfs() {
fsck_it "$0"
}
append libmount_known_fsck "hfs"
comment:5 Changed 5 years ago by Oskari Rauta <oskari.rauta@…>
For some reason - it ain't on trunk either. Been using this for years..
comment:6 Changed 5 years ago by shinton@…
How do I use this patch? Where do I apply it?
comment:7 Changed 4 years ago by florian
- Resolution set to wontfix
- Status changed from accepted to closed
comment:8 Changed 4 years ago by jow
- Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07
Milestone Attitude Adjustment 12.09 deleted
diskdev_cmds.diff