Hammer ghost slave PFS

2010-04-11 Thread Steve O'Hara-Smith
Hi,

I have a ~1TB hammer filesystem with two slave PFSs on it that
seems to be using more space than I can account for. I was looking into it
when I noticed this in hammer info


PFS ID  ModeSnaps  Mounted on
 0  MASTER  3  /data
 1  SLAVE   3  not mounted
 2  SLAVE   3  not mounted
 4  SLAVE   3  not mounted

Three slave PFSs listed - but there are only two (unless I'm going
crazy). How can I find out which ones are the two I know about and how can
I get rid of the extra one ?

Would I be best to simply rebuild the filesystem and start again ?
This filesystem started life as a version 1 and has been upgraded to
version 4 over time so it's seen quite a few versions of DFly since it was
first built.

-- 
Steve O'Hara-Smith  |   Directable Mirror Arrays
C:WIN  | A better way to focus the sun
The computer obeys and wins.|licences available see
You lose and Bill collects. |http://www.sohara.org/


Re: Hammer ghost slave PFS

2010-04-11 Thread Antonio Huete Jimenez
Hi Steve,

What is it listed in /pfs dir?

Cheers,
Antonio Huete

2010/4/11 Steve O'Hara-Smith st...@sohara.org:
        Hi,

        I have a ~1TB hammer filesystem with two slave PFSs on it that
 seems to be using more space than I can account for. I was looking into it
 when I noticed this in hammer info


        PFS ID  Mode    Snaps  Mounted on
             0  MASTER      3  /data
             1  SLAVE       3  not mounted
             2  SLAVE       3  not mounted
             4  SLAVE       3  not mounted

        Three slave PFSs listed - but there are only two (unless I'm going
 crazy). How can I find out which ones are the two I know about and how can
 I get rid of the extra one ?

        Would I be best to simply rebuild the filesystem and start again ?
 This filesystem started life as a version 1 and has been upgraded to
 version 4 over time so it's seen quite a few versions of DFly since it was
 first built.

 --
 Steve O'Hara-Smith                          |   Directable Mirror Arrays
 C:WIN                                      | A better way to focus the sun
 The computer obeys and wins.                |    licences available see
 You lose and Bill collects.                 |    http://www.sohara.org/




Re: Hammer ghost slave PFS

2010-04-11 Thread Steve O'Hara-Smith
Hi Antonio,

There is no /pfs dir - the two slaves were created by hammer
mirror-copy and live in fs/backup/ which looks like this:

ls -l /data/backup/
total 0
lrwxr-xr-x  1 root  wheel  10 Dec 12 06:45 df1.marelmo.com-home -
@@0x000878898420:2 
lrwxr-xr-x  1 root  wheel  10 Feb  4 13:12
steve.marelmo.com-home - @@0x00010af0e2e0:4


On Sun, 11 Apr 2010 10:40:12 +0200
Antonio Huete Jimenez ahuete.de...@gmail.com wrote:

 Hi Steve,
 
 What is it listed in /pfs dir?
 
 Cheers,
 Antonio Huete
 
 2010/4/11 Steve O'Hara-Smith st...@sohara.org:
         Hi,
 
         I have a ~1TB hammer filesystem with two slave PFSs on it that
  seems to be using more space than I can account for. I was looking into
  it when I noticed this in hammer info
 
 
         PFS ID  Mode    Snaps  Mounted on
              0  MASTER      3  /data
              1  SLAVE       3  not mounted
              2  SLAVE       3  not mounted
              4  SLAVE       3  not mounted
 
         Three slave PFSs listed - but there are only two (unless I'm
  going crazy). How can I find out which ones are the two I know about
  and how can I get rid of the extra one ?
 
         Would I be best to simply rebuild the filesystem and start
  again ? This filesystem started life as a version 1 and has been
  upgraded to version 4 over time so it's seen quite a few versions of
  DFly since it was first built.
 
  --
  Steve O'Hara-Smith                          |   Directable Mirror Arrays
  C:WIN                                      | A better way to focus the
  sun The computer obeys and wins.                |    licences available
  see You lose and Bill collects.                 |
   http://www.sohara.org/
 


-- 
Steve O'Hara-Smith  |   Directable Mirror Arrays
C:WIN  | A better way to focus the sun
The computer obeys and wins.|licences available see
You lose and Bill collects. |http://www.sohara.org/


Re: Hammer ghost slave PFS

2010-04-11 Thread Antonio Huete Jimenez
Steve,

Can you please try this patch?

diff --git a/sbin/hammer/cmd_info.c b/sbin/hammer/cmd_info.c
index 946d3c8..12e5246 100644
--- a/sbin/hammer/cmd_info.c
+++ b/sbin/hammer/cmd_info.c
@@ -160,7 +160,7 @@ show_info(char *path)

/* Pseudo-filesystem information */
fprintf(stdout, PFS information\n);
-   fprintf(stdout, \tPFS ID  ModeSnaps  Mounted on\n);
+   fprintf(stdout, \tPFS ID  ModeSnaps  End TID
Mounted on\n);

while(pfs_id  HAMMER_MAX_PFS) {
bzero(pfs, sizeof(pfs));
@@ -181,12 +181,15 @@ show_info(char *path)
sc = count_snapshots(fd, info.version, pfs_od.snapshots,
mountedon);

-   fprintf(stdout, \t%6d  %-6s %6d  ,
-   pfs_id, (ismaster ? MASTER : SLAVE), sc);
+   fprintf(stdout, \t%6d  %-6s %6d  0x%016jx  ,
+   pfs_id, (ismaster ? MASTER : SLAVE), sc,
+   pfs.ondisk-sync_end_tid);
+
if (mountedon)
fprintf(stdout, %s, mountedon);
else
fprintf(stdout, not mounted);
+
fprintf(stdout, \n);
}
pfs_id++;


--

This will show the End TID of all PFSs, including your slaves:
 9  SLAVE  50  0x00010a543830  not mounted
10  SLAVE  50  0x0001  not mounted

So you could see the status of the PFS slave 9 with this:

# hammer pfs-status /@@0x00010a543830:9
/@@0x00010a543830:9 PFS #9 {
sync-beg-tid=0x0001
sync-end-tid=0x00010a543830
shared-uuid=9970d0f9-0f10-11df-acc1-9bd6198bd0ab
unique-uuid=91d11477-1009-11df-80a0-9bd6198bd0ab
slave
label=
prune-min=00:00:00
operating as a SLAVE
snapshots directory defaults to /var/hammer/pfs
}

If you want to wipe it out, just do this:

# ln -s @@0x00010a543830:9 /todestroy
# hammer pfs-destroy /todestroy

Probably there are better ways, but well, I hope this may help you :-)

Cheers,
Antonio Huete

2010/4/11 Steve O'Hara-Smith st...@sohara.org:
        Hi Antonio,

        There is no /pfs dir - the two slaves were created by hammer
 mirror-copy and live in fs/backup/ which looks like this:

 ls -l /data/backup/
 total 0
 lrwxr-xr-x  1 root  wheel  10 Dec 12 06:45 df1.marelmo.com-home -
 @@0x000878898420:2
 lrwxr-xr-x  1 root  wheel  10 Feb  4 13:12
 steve.marelmo.com-home - @@0x00010af0e2e0:4


 On Sun, 11 Apr 2010 10:40:12 +0200
 Antonio Huete Jimenez ahuete.de...@gmail.com wrote:

 Hi Steve,

 What is it listed in /pfs dir?

 Cheers,
 Antonio Huete

 2010/4/11 Steve O'Hara-Smith st...@sohara.org:
         Hi,
 
         I have a ~1TB hammer filesystem with two slave PFSs on it that
  seems to be using more space than I can account for. I was looking into
  it when I noticed this in hammer info
 
 
         PFS ID  Mode    Snaps  Mounted on
              0  MASTER      3  /data
              1  SLAVE       3  not mounted
              2  SLAVE       3  not mounted
              4  SLAVE       3  not mounted
 
         Three slave PFSs listed - but there are only two (unless I'm
  going crazy). How can I find out which ones are the two I know about
  and how can I get rid of the extra one ?
 
         Would I be best to simply rebuild the filesystem and start
  again ? This filesystem started life as a version 1 and has been
  upgraded to version 4 over time so it's seen quite a few versions of
  DFly since it was first built.
 
  --
  Steve O'Hara-Smith                          |   Directable Mirror Arrays
  C:WIN                                      | A better way to focus the
  sun The computer obeys and wins.                |    licences available
  see You lose and Bill collects.                 |
   http://www.sohara.org/
 


 --
 Steve O'Hara-Smith                          |   Directable Mirror Arrays
 C:WIN                                      | A better way to focus the sun
 The computer obeys and wins.                |    licences available see
 You lose and Bill collects.                 |    http://www.sohara.org/




Re: Hammer ghost slave PFS

2010-04-11 Thread Antonio Huete Jimenez
In fact you could access any of your slave PFSs with TID -1:

# hammer pfs-status @@-1:00011
@@0x:00011  PFS #11 {
sync-beg-tid=0x0001
sync-end-tid=0x000127fbb1c0
shared-uuid=9970d0f9-0f10-11df-acc1-9bd6198bd0ab
unique-uuid=67b036ac-455a-11df-8910-73e089715096
slave
label=
prune-min=00:00:00
operating as a SLAVE
snapshots directory defaults to /var/hammer/pfs
}

So you wouldn't need the patch.

Cheers,
Antonio Huete


2010/4/11 Antonio Huete Jimenez ahuete.de...@gmail.com:
 Steve,

 Can you please try this patch?

 diff --git a/sbin/hammer/cmd_info.c b/sbin/hammer/cmd_info.c
 index 946d3c8..12e5246 100644
 --- a/sbin/hammer/cmd_info.c
 +++ b/sbin/hammer/cmd_info.c
 @@ -160,7 +160,7 @@ show_info(char *path)

        /* Pseudo-filesystem information */
        fprintf(stdout, PFS information\n);
 -       fprintf(stdout, \tPFS ID  Mode    Snaps  Mounted on\n);
 +       fprintf(stdout, \tPFS ID  Mode    Snaps  End TID
 Mounted on\n);

        while(pfs_id  HAMMER_MAX_PFS) {
                bzero(pfs, sizeof(pfs));
 @@ -181,12 +181,15 @@ show_info(char *path)
                        sc = count_snapshots(fd, info.version, 
 pfs_od.snapshots,
                            mountedon);

 -                       fprintf(stdout, \t%6d  %-6s %6d  ,
 -                           pfs_id, (ismaster ? MASTER : SLAVE), sc);
 +                       fprintf(stdout, \t%6d  %-6s %6d  0x%016jx  ,
 +                           pfs_id, (ismaster ? MASTER : SLAVE), sc,
 +                           pfs.ondisk-sync_end_tid);
 +
                        if (mountedon)
                                fprintf(stdout, %s, mountedon);
                        else
                                fprintf(stdout, not mounted);
 +
                        fprintf(stdout, \n);
                }
                pfs_id++;


 --

 This will show the End TID of all PFSs, including your slaves:
             9  SLAVE      50  0x00010a543830  not mounted
            10  SLAVE      50  0x0001  not mounted

 So you could see the status of the PFS slave 9 with this:

 # hammer pfs-status /@@0x00010a543830:9
 /@@0x00010a543830:9     PFS #9 {
    sync-beg-tid=0x0001
    sync-end-tid=0x00010a543830
    shared-uuid=9970d0f9-0f10-11df-acc1-9bd6198bd0ab
    unique-uuid=91d11477-1009-11df-80a0-9bd6198bd0ab
    slave
    label=
    prune-min=00:00:00
    operating as a SLAVE
    snapshots directory defaults to /var/hammer/pfs
 }

 If you want to wipe it out, just do this:

 # ln -s @@0x00010a543830:9 /todestroy
 # hammer pfs-destroy /todestroy

 Probably there are better ways, but well, I hope this may help you :-)

 Cheers,
 Antonio Huete

 2010/4/11 Steve O'Hara-Smith st...@sohara.org:
        Hi Antonio,

        There is no /pfs dir - the two slaves were created by hammer
 mirror-copy and live in fs/backup/ which looks like this:

 ls -l /data/backup/
 total 0
 lrwxr-xr-x  1 root  wheel  10 Dec 12 06:45 df1.marelmo.com-home -
 @@0x000878898420:2
 lrwxr-xr-x  1 root  wheel  10 Feb  4 13:12
 steve.marelmo.com-home - @@0x00010af0e2e0:4


 On Sun, 11 Apr 2010 10:40:12 +0200
 Antonio Huete Jimenez ahuete.de...@gmail.com wrote:

 Hi Steve,

 What is it listed in /pfs dir?

 Cheers,
 Antonio Huete

 2010/4/11 Steve O'Hara-Smith st...@sohara.org:
         Hi,
 
         I have a ~1TB hammer filesystem with two slave PFSs on it that
  seems to be using more space than I can account for. I was looking into
  it when I noticed this in hammer info
 
 
         PFS ID  Mode    Snaps  Mounted on
              0  MASTER      3  /data
              1  SLAVE       3  not mounted
              2  SLAVE       3  not mounted
              4  SLAVE       3  not mounted
 
         Three slave PFSs listed - but there are only two (unless I'm
  going crazy). How can I find out which ones are the two I know about
  and how can I get rid of the extra one ?
 
         Would I be best to simply rebuild the filesystem and start
  again ? This filesystem started life as a version 1 and has been
  upgraded to version 4 over time so it's seen quite a few versions of
  DFly since it was first built.
 
  --
  Steve O'Hara-Smith                          |   Directable Mirror Arrays
  C:WIN                                      | A better way to focus the
  sun The computer obeys and wins.                |    licences available
  see You lose and Bill collects.                 |
   http://www.sohara.org/
 


 --
 Steve O'Hara-Smith                          |   Directable Mirror Arrays
 C:WIN                                      | A better way to focus the sun
 The computer obeys and wins.                |    licences available see
 You lose and Bill collects.                 |    http://www.sohara.org/





Re: Hammer ghost slave PFS

2010-04-11 Thread Steve O'Hara-Smith
On Sun, 11 Apr 2010 13:12:32 +0200
Antonio Huete Jimenez ahuete.de...@gmail.com wrote:

 In fact you could access any of your slave PFSs with TID -1:
...
 
  If you want to wipe it out, just do this:
 
  # ln -s @@0x00010a543830:9 /todestroy
  # hammer pfs-destroy /todestroy
 
  Probably there are better ways, but well, I hope this may help you :-)

Wonderful that pinned it down and got rid of it. Thank you.

-- 
Steve O'Hara-Smith  |   Directable Mirror Arrays
C:WIN  | A better way to focus the sun
The computer obeys and wins.|licences available see
You lose and Bill collects. |http://www.sohara.org/