One thing I appreciate in ZFS is the ability to quickly check system limits, or at least 64 bit code completeness, since making sparse volumes or sparse files is pretty easy. As most shells support the bitshift parameter, this is just a couple trivial oneliners:

To make an sickly huge 8EB sparse file (and yes that's 8 exabytes) on a zfs volume:

killer:bigpool jone# mkfile -n $(((1<<63)-512)) /bigpool/sickfile
And now to make a block aligned 8EB sparse volume:
killer:bigpool jone# zfs create -s -V $(((1<<63)-512)) bigpool/sickvol
let's take a look
killer:bigpool jone# ls -lh sickfile
-rw------T   1 root     root        8.0E Feb 29 17:11 sickfile

killer:bigpool root# format -e /dev/zvol/rdsk/bigpool/sickvol
selecting /dev/zvol/rdsk/bigpool/sickvol
No defect list found
[disk formatted, no defect list found]


FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        show       - translate a disk address
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        volname    - set 8-character volume name
        !     - execute , then return
        quit
format> ver

Volume name = <        >
ascii name  = 
bytes/sector    =  512
sectors = 18014398509481855
accessible sectors = 18014398509481855
Part      Tag    Flag     First Sector                 Size                 Last Sector
  0   reserved    wm                34            8388608.00TB                  18014398509481855    

format>
egad! have i just boiled the oceans?? of course to fill a real volume like this is another story since at an unrealistic sustained 10GB/s it'd take you over 27 years .. enjoy!

Comments:

Yes, the less sparse file could be used,
but it's not recommended. See CR #6629546

Posted by robin guo on March 01, 2008 at 10:59 AM EST #

Post a Comment:
Comments are closed for this entry.

This blog copyright 2009 by jone