wblock@ said:Excellent! As far as I know, only drives 1T or larger use 4K blocks, meaning partitions on the smaller drive do not need any special alignment.
wblock@ said:To be aligned, the data partition must start at an even multiple of 4K. Drives usually pretend to have 512-byte partitions even when they are really 4K. The primary GPT table takes 34 512-byte blocks. The next aligned spot is at block 40. I suggest starting the first data partition at 1M, or block 2048, for compatibility with other operating systems.
4 K = 8 512-byte blocks
40 / 8 = 5
[-a alignment]
option work?wblock@ said:Not even, even multiple:
40 * 512 = 20480
20480 / 4096 = 5, an integer (no fraction)
So block 40 (20480 bytes) is an even multiple of 4096, or 4K.
All that the -a option in gpart(8) does is round the partition starting location and size up to the nearest multiple of the value given.
./.sujournal: (inode 4) not found on tape
pietrasm said:I have repartitioned the disk and restored a backup. I got a message like this during restore(8):
Should I worry about this?Code:./.sujournal: (inode 4) not found on tape
It seems like system is working just fine after restoring. However, df(1) shows that there is -776M of available space. That's weird taking into account that the new partition is bigger than the previous one. Is there any way to reclaim missing disk space?
du -k -d1
in various directories can be used to track down what is taking space.wblock@ said:That sounds wrong, but it's hard to guess what is happening.du -k -d1
in various directories can be used to track down what is taking space.
wblock@ said:A file called restoresymtable is left in the root directory of each filesystem. Deleting those will save a little space.
wblock@ said:bsdinstall(8) may use a higher number of inodes, there were problems with running out of them on earlier versions. And partition size may have been rounded down to the nearest full gigabyte.
wblock@ said:Spread over a single big filesystem, it's probably okay. You didn't run out when doing the restore, for instance. If you did run out, it would just be a matter of backup, newfs(1) with a higher number of inodes, and then a restore.
root@mfsbsd:/mnt2 # dump -C16 -b64 -0aL -h0 -f - /mnt/usr/home | restore -ruf -
dump: /mnt/usr/home: unknown file system
Tape is not a dump tape
root@mfsbsd:/mnt2 #
rsync -axHAXS --delete --fileflags --force-change source/ dest/
wblock@ said:Right, dump(8) only deals with full filesystems.
cp(1) can be used to recursively copy directories, but net/rsync is better at it. (There's also sysutils/clone). For rsync(1), build the port with the FLAGS option enabled and use these options to make an exact duplicate of of the source directory in the dest directory:
rsync -axHAXS --delete --fileflags --force-change source/ dest/
The trailing slashes on the source and dest directories are important.
May I thow sysutils/gdmap in here to solve this? That tool can help a lot to find out where the disk space ends up.wblock@ said:du -k -d1
in various directories can be used to track down what is taking space.