Replication question/problem

Status
Not open for further replies.

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
My original pool (Pool1, two striped six-disk RAIDZ2 vdevs) suffered a major meltdown (three disk faults in one of the vdevs) when I fired the system up again after a six-week vacation, and many files obviously did go missing in action: they still appeared in the directory, but any attempt to copy them to another drive failed. But I have copied to external drives what I can copy and the GUI shows Pool1 with 9.7TiB used. I don't recall what the "used" report was before the meltdown.

I have created another pool (Pool2, five-disk RAIDZ2), and set up a replication task to Pool2/Replicas with the intention of destroying Pool1, recreating it as an 11-disk RAIDZ3 vdev, and restoring everything from Pool2, BUT Pool2 shows only 2.7TiB used. So should I assume that the indicated 9.7TiB for the space used on Pool1 is bogus and that there is really only 2.7TiB of files there?
 
Last edited:

Z300M

Guru
Joined
Sep 9, 2011
Messages
882

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
That could account for at least some of the difference.
I ran

# du -ch /mnt/Pool1 | grep total

and got

9.0T total

but that presumably includes the snapshots, yes?

Any command that would tell me the total EXcluding the snapshots?
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
That could account for at least some of the difference.
I ran

/mnt/Pool1# du -ch --exclude=/.zfs/snapshot/* * | grep total

and still got

9.0T total

then

/.zfs/snapshot# du -ch * | grep total

gave

20G total
 
Last edited:

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
It looks like the zfs command might be more useful than du. The man page talks about various subcommands that begin with "used" that look relevant.
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
It looks like the zfs command might be more useful than du. The man page talks about various subcommands that begin with "used" that look relevant.
I realized that I had not checked the "recursive" box. I had executed ls on Pool2/Replicas, seen the subdirectories, and assumed that they were populated -- but I assume that without the "recursive" parameter it would have created the subdirectories but not their contents.

I created a one-time snapshot and did a zfs send | zfs receive operation. All seems to be well.

BTW, I couldn't figure out how to use

zfs list

with the usedbysnapshots parameter, but

zfs list all

includes the usedbysnapshots report.
 

Z300M

Guru
Joined
Sep 9, 2011
Messages
882
Status
Not open for further replies.
Top