I have been spending the last couple of days of my spare time performing a simple operation with my mac, yet slightly more complicated than expected: merge the two partitions of my hard drive into one. This was necessary since I did a mapping, quite usual on Linux, where my system was sitting on the first partition (50 GB) while my user data was on the second one (the rest of 300 GB). But this mapping was not making me happy, since the system partition was always almost full (Mac OS X is not well suited for a multi partition disk drive, I find).
Although you can resize a live partition with Disk Utility (great feature, even if you booted with it), you cannot move the base position of a partition. You can merely resize it, if more space is available. So I had to back my second partition up for later restoring it. I went for Time Machine, since I was already using it for backing up my laptop.
Time Machine Caveats
Unfortunetely I noticed a couple of caveats during the restore operation:
Solution for merging two partitions
I finally found a solution to restore the second partition or to merge them: I had to fiddle directly with the Time Machine backup, copying manually the files I wanted from the second partition to the first, and did a restore of the first partition using Time Machine restore utility.
Here are the details of the steps I took:
sudo -s
fsaclctl -p /Volumes/[backup drive] -d
mv [from] [to]
fsaclctl -p /Volumes/[backup drive] -e
This worked for me. You should now have a merged partition on your drive, the restore utility having removed the ACLs during the operation. Phew! This was not a straight forward action! I still cannot believe that Apple did not take into account that people can have more than 1 partition on their drive (I might still have missed the way to do it, did not find it so far though).
Links/Info
ls -le
For the record, this will yield the following listing when ACLs are present (pay attention to the lines starting with ‘0: ‘ and ‘1: ‘:
drwxrwxr-x@ 138 root admin 4692 Sep 13 2008 Applications
0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown
1: group:everyone deny delete
drwxr-xr-x@ 2 pat staff 68 May 9 22:12 DeveloperSDK3
0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown
drwxr-xr-x@ 5 pat staff 170 Oct 23 2008 VirtualBox
0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown
You can also do that recursively using the following command:
ls -lateR > filelist
-R)chmod -a# 0 [file]where 0 is the ACL entry to remove.
Recent Comments