As of GNU coreutils 7.5 released in August 2009, sort
allows a -h
parameter, which allows numeric suffixes of the kind produced by du -h
:
du -hs * | sort -h
If you are using a sort that does not support -h
, you can install GNU Coreutils. E.g. on an older Mac OS X:
brew install coreutils
du -hs * | gsort -h
From sort
manual:
-h, --human-numeric-sort compare human readable numbers (e.g., 2K 1G)
i don't think it's possible just like you put it.
iSCSI is a block-level protocol. if several hosts access the same block device, they have to somehow arbitrate the use of the data stored there. Usually that means using a cluster-aware filesystem (GFS, OCFS2, CXFS, etc).
SMB/CIFS is a file-level protocol. it shares files with several clients, doing all the arbitration needed, and relying on the underlying filesystem.
Solution B should work, as long as you use a cluster-aware filesystem on this partition. oterwise, as soon as you use that block device from two hosts, you'll totally corrupt it.
It's not a 'rube goldberg'-like solution at all, since any fileserver works on top of a filesystem, you would just use a cluster-aware one. in fact, one of the most common use of cluster filesytems is as shared storage for several (smb/nfs) fileservers, distributing the processing and bandwidth load of file serving the same files.
in short: if you want block-level sharing, you have to use a cluster filesystem. if you also have non-cluster clients, you can add a fileserver on top of that filesystem.
Best Answer
Linux should be able to mount UFS easily as read-only. Try modprobe ufs2 if it has trouble mounting it.
What distro are you using?