History log of /dragonfly/sbin/hammer/cmd_strip.c (Results 1 – 13 of 13)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3, v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1
# 005a4da7 14-Apr-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/*hammer: Use consistent static/inline/returntype format for functions

Change them to HAMMER2 style which has much more stable code style
than HAMMER1. HAMMER1 is basically a mix of every possib

sbin/*hammer: Use consistent static/inline/returntype format for functions

Change them to HAMMER2 style which has much more stable code style
than HAMMER1. HAMMER1 is basically a mix of every possible pattern
(even in the code originally written only by dillon@).

show more ...


# 1ee016ee 13-Apr-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Add missing fflush(stdout) in 8b6688a4


# 8b6688a4 13-Apr-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Allow any volume to be stripped by strip command

hammer strip should be able to strip each volume independently whether
all volumes that consist filesystem are available or not. It make

sbin/hammer: Allow any volume to be stripped by strip command

hammer strip should be able to strip each volume independently whether
all volumes that consist filesystem are available or not. It makes no
sense to require all volumes when the purpose of command is to destroy
them, even though that's necessary to go through the whole process.

If root volume is missing or root volume has incomplete offset format,
layer1/2 won't be erased, but just header part.

show more ...


# c17fa600 12-Apr-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/*hammer: Use typedef'd for struct buffer_info*

This is a part of series of commits started from 21e9e7d5ff in 2016.
This is for userspace.


# 2dba5fa7 12-Apr-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/*hammer: Use typedef'd for struct volume_info*

This is a part of series of commits started from 21e9e7d5ff in 2016.
This is for userspace.


# 73cca638 12-Apr-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Add /* not reached */ (missing ones in 052fd72b)

Some comments for errx(3) were missing in 052fd72b which was intended
to do this for all err(3)/errx(3) in sbin/hammer/*.c.


# f254e677 10-Apr-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Partly bring back removed braces from 52e2f1b5

based on comments from dillon@.

(dillon) three types, yah. (1) multi-line condition in if(), (2) if TRUE or FALSE body spans more than o

sbin/hammer: Partly bring back removed braces from 52e2f1b5

based on comments from dillon@.

(dillon) three types, yah. (1) multi-line condition in if(), (2) if TRUE or FALSE body spans more than one line, put braces around both
(dillon) (including if a comment is part of the body)

show more ...


# 52e2f1b5 09-Apr-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Cleanup blocks with a single statement

This commit basically does the same as what Linux kernel's coding
style mentions for braces, which is basically the same with BSDs.
https://github

sbin/hammer: Cleanup blocks with a single statement

This commit basically does the same as what Linux kernel's coding
style mentions for braces, which is basically the same with BSDs.
https://github.com/torvalds/linux/blob/master/Documentation/process/coding-style.rst#3-placing-braces-and-spaces

No diff in sbin/hammer/hammer binary when assert(3) is disabled.

show more ...


Revision tags: v4.8.0, v4.6.2
# 4c09d9c4 17-Mar-2017 Matthew Dillon <dillon@apollo.backplane.com>

hammer - HAMMER Version 7

* Add support for version 7 which changes the CRC mechanic from the
old slow CRC code to the faster ISCSI CRC code. We don't use the CRC
instruction yet but ths base I

hammer - HAMMER Version 7

* Add support for version 7 which changes the CRC mechanic from the
old slow CRC code to the faster ISCSI CRC code. We don't use the CRC
instruction yet but ths base ISCSI CRC from FreeBSD is 6x faster than
the CRC code we were using before.

* Change newfs_hammer default to version 7 (for master).

show more ...


Revision tags: v4.9.0, v4.8.0rc
# 5ebff42a 09-Mar-2017 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Have consistent naming for volume variables

Use *volume.
Userspace is mix of *vol and *volume for no reason.
sys/vfs/hammer is always *volume.


# f6d29b27 17-Dec-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sys/vfs/hammer: Rename misleading macro hammer_is_zone2_mapped_index()

All zones are mapped to zone2 (whether directly or indirectly),
so hammer_is_zone2_mapped_index() is a misleading name.
It shou

sys/vfs/hammer: Rename misleading macro hammer_is_zone2_mapped_index()

All zones are mapped to zone2 (whether directly or indirectly),
so hammer_is_zone2_mapped_index() is a misleading name.
It should have indicated it's for B-Tree records related zones.

show more ...


# 02318f07 15-Dec-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Change fprintf/exit to err variants [2/2]

Change
fprintf(stderr, ...); exit(1);
and
perror(...); exit(1);
to
err(1, ...) or errx(1, ...);
where possible for consistency.

This commit is

sbin/hammer: Change fprintf/exit to err variants [2/2]

Change
fprintf(stderr, ...); exit(1);
and
perror(...); exit(1);
to
err(1, ...) or errx(1, ...);
where possible for consistency.

This commit is just conversion to err(3) variants.
Messages themselves are not changed, except for removing
strerror(errno) for err(3), and removing trailing \n,
though err variants add program name in the messages.

err(3) and variants are non standard BSD functions, but HAMMER
userspace has been using BSD stuff aside from the existing
err/errx. Also note that err(3) is available in Linux as well.

show more ...


# 2eccaef5 04-Dec-2016 Tomohiro Kusumi <kusumi.tomohiro@gmail.com>

sbin/hammer: Add hammer strip command

This command is inspired by hammer recover command, and does
opposite of what recover command does.

This command zero clears zone-8(B-Tree) big-blocks, zone-9(

sbin/hammer: Add hammer strip command

This command is inspired by hammer recover command, and does
opposite of what recover command does.

This command zero clears zone-8(B-Tree) big-blocks, zone-9(meta)
big-blocks, and then the whole volume header, except that volume
signature field is overwritten with "STRIPPED" instead of zeros.
After running, a filesystem is no longer mountable or recoverable
with hammer recover command. This command is also fast as it only
zero clears good enough ondisk data to make it unmountable and
unrecoverable.

Keep in mind that this command does _not_ zero clear user data.
Users would normally use a software designed to completely shred
a filesystem. This command is not designed to shred a filesystem.
The name "strip" gives better idea of what it really does than
using "shred"/etc.

-- example
# newfs_hammer -L TEST /dev/da1 /dev/da2 /dev/da3 > /dev/null
# mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER
# cd /HAMMER
# dd if=/dev/urandom of=./out bs=1M count=120000
120000+0 records in
120000+0 records out
125829120000 bytes transferred in 1766.417077 secs (71234094 bytes/sec)
# cd
# umount /HAMMER
# hammer -f /dev/da1:/dev/da2:/dev/da3 strip
You have requested that HAMMER filesystem (TEST) be stripped
Do you really want to do this? [y/n] y
Stripping HAMMER filesystem (TEST) in 5 4 3 2 1.. starting destruction pass
8000000021000000
9000000021800000
800000019c000000
800000030c000000
800000047e000000
80000005f7000000
8000000767000000
80000008d8000000
8000000a51800000
8000000bc5000000
8000000d37800000
8000000ead000000
800000101e800000
8000001193000000
8000001304000000
8000001478800000
80000015ee000000
8000001760800000
80000018d1800000
8000001a47000000
8000001bb6000000
801000013c000000
/dev/da1
/dev/da2
/dev/da3
# mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER
mount: Invalid argument
mount_hammer: /dev/da1: Invalid volume signature 4445505049525453

show more ...