[OpenIndiana-discuss] rpool defragmentation
Jim Klimov
jimklimov at cos.ru
Fri Jan 16 23:28:16 UTC 2015
On 16 January 2015 16:22:15 CET, Andrew Gabriel <illumos at cucumber.demon.co.uk> wrote:
>On 01/16/15 02:37 PM, Gary Gendel wrote:
>> # zpool list
>> NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH
>> ALTROOT
>> rpool 68G 49.5G 18.5G - 50% 72% 1.00x ONLINE -
>> users 928G 72.4G 856G - 1% 7% 1.00x ONLINE -
>>
>> # zfs list
>> NAME USED AVAIL REFER MOUNTPOINT
>> rpool 48.9G 16.9G 82K /rpool
>> rpool/ROOT 44.9G 16.9G 22K legacy
>> rpool/ROOT/hipster-17 44.9G 16.9G 34.9G /
>> rpool/dump 1.97G 16.9G 1.97G -
>> rpool/export 32K 16.9G 32K /export
>> rpool/swap 2.01G 16.9G 2.01G -
>> users 72.4G 827G 72.3G /export/home
>>
>> How does one defragment this?
>
>I presume you are referring to rpool, and not users?
>
>What makes you think you need to?
>What do you use the root filesystem for?
>
>> I thought about creating a new BE and then sending the current BE to
>> it, but there doesn't seem to be enough room.
>
>Since rpool can only be either a single disk or a mirror, the easiest
>way to defrag it is to attach another mirror side and let it resilver.
>The new mirror side will be defragged. Make sure the new disk is
>bootable (has grub etc on it), and then zpool split off the old disk.
>It
>would be a good opportunity to move to a bigger rpool disk too.
Are you sure about defragging via mirroring? I believe (from practice digging with on-disk allocation) that offsets in vdev's that comprise a mirror are the same for copies of the same block, as well as raidzN offset into the logical tlvdev divided by total number of disks would give the offset into each disk's part of the vdev to find the sector pertaining to that stripe, and remainder from such division would give the disk number formthe particular byte offset. My description may be a bit blurry so late in the night, but you get the point ;)
Jim
--
Typos courtesy of K-9 Mail on my Samsung Android
More information about the openindiana-discuss
mailing list