Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Dec 2013 10:19:15 +0100 (CET)
From:      krichy@tvnetwork.hu
To:        =?ISO-8859-15?Q?Gerrit_K=FChn?= <gerrit.kuehn@aei.mpg.de>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: ZFS snapshot renames failing after upgrade to 9.2
Message-ID:  <alpine.DEB.2.10.1312201010350.12244@krichy.tvnetwork.hu>
In-Reply-To: <20131220100522.382a39ac.gerrit.kuehn@aei.mpg.de>
References:  <0C9FD4E1-0549-4849-BFC5-D8C5D4A34D64@msqr.us> <54D3B3C002184A52BEC9B1543854B87F@multiplay.co.uk> <333D57C6A4544067880D9CFC04F02312@multiplay.co.uk> <26053_1387447492_52B2C4C4_26053_331_1_20131219105503.3a8d1df3.gerrit.kuehn@aei.mpg.de> <20131219165549.9f2ca709.gerrit.kuehn@aei.mpg.de> <alpine.DEB.2.10.1312191718330.12885@krichy.tvnetwork.hu> <20131219174054.91ac617a.gerrit.kuehn@aei.mpg.de> <alpine.DEB.2.10.1312192007100.30378@krichy.tvnetwork.hu> <20131220100522.382a39ac.gerrit.kuehn@aei.mpg.de>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--1030603365-785960615-1387531155=:12244
Content-Type: TEXT/PLAIN; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8BIT

Dear Gerrit,

It is not a solution, but I use different snapshot handling mechanisms. I 
wrote a simple script which handles that, and the snapshots are named by 
its creation timestamp. I think it is more usable to see that when that 
snapshot was exactly taken, and the script thus only does snapshot 
creation, and deletion, no renames.

That scripts only limitation is that it is planned to run hourly, creating 
hourly snapshots, and when run again, it queries the existing one's list, 
and decides which to keep or remove. Thus you have to run it hourly in 
cron like:
# crontab -l
0 *     * * *   /usr/local/sbin/zfs-snapshot

Regards,


Kojedzinszky Richard
Euronet Magyarorszag Informatikai Zrt.

On Fri, 20 Dec 2013, Gerrit Kühn wrote:

> Date: Fri, 20 Dec 2013 10:05:22 +0100
> From: Gerrit Kühn <gerrit.kuehn@aei.mpg.de>
> To: krichy@tvnetwork.hu
> Cc: freebsd-fs@freebsd.org
> Subject: Re: ZFS snapshot renames failing after upgrade to 9.2
> 
> On Thu, 19 Dec 2013 20:08:22 +0100 (CET) krichy@tvnetwork.hu wrote about
> Re: ZFS snapshot renames failing after upgrade to 9.2:
>
> KH> So a simple renaming can cause your system to hang?
>
> No, it does not hang completely.
> Just the snapshots become unusable. This night, it happened again:
>
> ---
> root@shapeshifter:~ # ll /tank/git/.zfs/snapshot/
> ls: daily.6: Device busy
> total 33
> drwxr-xr-x  12 211   211    25 Dec 19 09:18 daily.0/
> drwxr-xr-x  12 211   211    25 Dec 19 00:00 daily.1/
> drwxr-xr-x  12 211   211    24 Dec 18 00:00 daily.2/
> drwxr-xr-x  12 211   211    24 Dec 17 00:00 daily.3/
> drwxr-xr-x  12 211   211    24 Dec 16 00:00 daily.4/
> drwxr-xr-x  12 211   211    24 Dec 14 00:00 daily.5/
> drwxr-xr-x  12 211   211    24 Dec 15 00:00 weekly.0/
> drwxr-xr-x  12 211   211    24 Dec  8 00:00 weekly.1/
> drwxr-xr-x  12 211   211    24 Dec  1 00:00 weekly.2/
> drwxr-xr-x  12 211   211    24 Nov 17 00:00 weekly.3/
> drwxr-xr-x  12 211   211    24 Nov 10 00:00 weekly.4/
> drwxr-xr-x   2 root  wheel   3 Oct 20 00:00 weekly.5/
> drwxr-xr-x   2 root  wheel   3 Oct  6 00:00 weekly.6/
> ---
>
> root@shapeshifter:~ # zfs list -r -t snapshot -o
> name,creation,used,referenced tank/git NAME
> CREATION                USED  REFER tank/git@weekly.6  Sun Oct  6  0:00
> 2013  42.6K  62.8K tank/git@weekly.5  Sun Oct 20  0:00 2013  42.6K  62.8K
> tank/git@weekly.4  Sun Nov 10  0:00 2013  29.5M   146G
> tank/git@weekly.3  Sun Nov 17  0:00 2013  27.1M   146G
> tank/git@weekly.2  Sun Dec  1  0:00 2013  26.3M   146G
> tank/git@weekly.1  Sun Dec  8  0:00 2013  27.3M   146G
> tank/git@daily.6   Sat Dec 14  0:00 2013  26.5M   147G
> tank/git@weekly.0  Sun Dec 15  0:00 2013  25.2M   147G
> tank/git@daily.5   Mon Dec 16  0:00 2013  24.7M   147G
> tank/git@daily.4   Tue Dec 17  0:00 2013  24.9M   147G
> tank/git@daily.3   Wed Dec 18  0:00 2013  25.7M   147G
> tank/git@daily.2   Thu Dec 19  0:00 2013  25.8M   147G
> tank/git@daily.1   Thu Dec 19  9:19 2013  25.0M   147G
> tank/git@daily.0   Fri Dec 20  0:00 2013  26.8M   147G
> ---
>
>
> As you can see, the snapshot rotating got stuck somewhere. What is
> displayed under .zfs/snapshot does not reflect what zfs is really seeing:
> daily.6 is inaccessible, and the rotation that happened so far is not
> reflected under .zfs/snapshot, either.
>
>
> cu
>  Gerrit
>
--1030603365-785960615-1387531155=:12244
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=zfs-snapshot
Content-Transfer-Encoding: BASE64
Content-ID: <alpine.DEB.2.10.1312201019150.12244@krichy.tvnetwork.hu>
Content-Description: 
Content-Disposition: attachment; filename=zfs-snapshot

IyEvYmluL3NoDQoNCnVuc2V0IExBTkcNCmV4cG9ydCBQQVRIPS9iaW46L3Ni
aW46L3Vzci9iaW46L3Vzci9zYmluDQoNCiMgY29uZmlndXJhdGlvbg0KDQpk
YXRhc2V0cz0icm9vdC9yb290IHBvb2wvaG9tZSBwb29sL3VzciINCg0KaG91
cmx5X2tlZXA9MTY4DQpkYWlseV9rZWVwPTkwDQp3ZWVrbHlfa2VlcD0xMDYN
Cg0KIyBvdmVycmlkZSBkYXRhc2V0LXNwZWNpZmljIGtlZXAgdGltZXMNCnJv
b3Rfcm9vdF9ob3VybHlfa2VlcD00OA0Kcm9vdF9yb290X2RhaWx5X2tlZXA9
MzANCnJvb3Rfcm9vdF93ZWVrbHlfa2VlcD04DQoNCiMgY29uZmlndXJhdGlv
bi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oKHcgLSAxKSkNCgkJCWtlZXA9MQ0K
CQlmaQ0KCWZpDQoNCglpZiBbICQoZGF0ZSAtaiAkc3RhbXAgKyVIJU0pID0g
MDAwMCBdIDsgdGhlbg0KCQlpZiBbICRkIC1ndCAwIF0gOyB0aGVuDQoJCQlk
PSQoKGQgLSAxKSkNCgkJCWtlZXA9MQ0KCQlmaQ0KCWZpDQoNCglpZiBbICRo
IC1ndCAwIF0gOyB0aGVuDQoJCWg9JCgoaCAtIDEpKQ0KCQlrZWVwPTENCglm
aQ0KDQoJaWYgWyAka2VlcCAtZXEgMCBdOyB0aGVuDQoJCWVlIHpmcyBkZXN0
cm95ICIkbmFtZSINCglmaQ0KZG9uZQ0K

--1030603365-785960615-1387531155=:12244--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.DEB.2.10.1312201010350.12244>