Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > uk.comp.sys.mac > #119579 > unrolled thread
| Started by | richard@cogsci.ed.ac.uk (Richard Tobin) |
|---|---|
| First post | 2017-09-27 15:05 +0000 |
| Last post | 2017-09-30 11:32 +0100 |
| Articles | 20 — 7 participants |
Back to article view | Back to uk.comp.sys.mac
df richard@cogsci.ed.ac.uk (Richard Tobin) - 2017-09-27 15:05 +0000
Re: df dempson@actrix.gen.nz (David Empson) - 2017-09-28 13:59 +1300
Re: df nmassello@yahoo.com (Neill Massello) - 2017-09-28 04:29 -0600
Re: df dempson@actrix.gen.nz (David Empson) - 2017-09-29 00:40 +1300
Re: df richard@cogsci.ed.ac.uk (Richard Tobin) - 2017-09-28 10:39 +0000
Re: df dempson@actrix.gen.nz (David Empson) - 2017-09-29 00:40 +1300
Re: df richard@cogsci.ed.ac.uk (Richard Tobin) - 2017-09-28 15:44 +0000
Re: df Jaimie Vandenbergh <jaimie@sometimes.sessile.org> - 2017-09-29 20:13 +0100
Re: df Jaimie Vandenbergh <jaimie@sometimes.sessile.org> - 2017-09-29 21:54 +0100
Re: df richard@cogsci.ed.ac.uk (Richard Tobin) - 2017-09-29 23:48 +0000
Re: df dempson@actrix.gen.nz (David Empson) - 2017-09-30 15:23 +1300
Re: df Theo <theom+news@chiark.greenend.org.uk> - 2017-10-02 21:01 +0100
Re: df Jaimie Vandenbergh <jaimie@sometimes.sessile.org> - 2017-10-02 21:24 +0100
Re: df dempson@actrix.gen.nz (David Empson) - 2017-10-03 12:07 +1300
Re: df Jaimie Vandenbergh <jaimie@sometimes.sessile.org> - 2017-09-30 09:54 +0100
Re: df Paul Sture <nospam@sture.ch> - 2017-09-30 22:33 +0200
Re: df Jaimie Vandenbergh <jaimie@sometimes.sessile.org> - 2017-09-30 22:12 +0100
Re: df Paul Sture <nospam@sture.ch> - 2017-09-30 22:24 +0200
Re: df Jaimie Vandenbergh <jaimie@sometimes.sessile.org> - 2017-09-30 22:14 +0100
Re: df me32@privacy.net (R) - 2017-09-30 11:32 +0100
| From | richard@cogsci.ed.ac.uk (Richard Tobin) |
|---|---|
| Date | 2017-09-27 15:05 +0000 |
| Subject | df |
| Message-ID | <oqgene$1kfs$1@macpro.inf.ed.ac.uk> |
Apple need to do something about the output of df in High Sierra. The "ifree" number makes the lines too long: Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1s1 477Gi 382Gi 92Gi 81% 2699967 9223372036852075840 0% / And while I'm here, what's with this: /dev/disk1s4 477Gi 2.0Gi 92Gi 3% 2 9223372036854775805 0% /private/var/vm Have they turned swap into a separate whatever-apfs-calls-its-subpartitions? -- Richard
[toc] | [next] | [standalone]
| From | dempson@actrix.gen.nz (David Empson) |
|---|---|
| Date | 2017-09-28 13:59 +1300 |
| Message-ID | <1nd2dfp.s7bmvim8egq7N%dempson@actrix.gen.nz> |
| In reply to | #119579 |
Richard Tobin <richard@cogsci.ed.ac.uk> wrote: > Apple need to do something about the output of df in High Sierra. The > "ifree" number makes the lines too long: > > Filesystem Size Used Avail Capacity iused ifree %iused > Mounted on > /dev/disk1s1 477Gi 382Gi 92Gi 81% 2699967 9223372036852075840 0% > / Thats a lot of inodes. 9.2x10^18 = 9.2 "exainodes" (ick). > And while I'm here, what's with this: > > /dev/disk1s4 477Gi 2.0Gi 92Gi 3% 2 9223372036854775805 0% > /private/var/vm > > Have they turned swap into a separate whatever-apfs-calls-its-subpartitions? Yes. The APFS term you are looking for is "volume". APFS volumes live inside a "container" which corresponds to a partition (except in special cases like Fusion drives, which I haven't looked at in detail yet). A bootable APFS partition/container has at least four volumes: - The main one, visible and named by the user. - Preboot, for early boot code - VM, for virtual memory swap. - Recovery, our old friend, no longer a separate partition. All of them are dynamically sized and don't need to be contiguous. Free space in the container is shared between volumes. The user can create additional volumes inside the container. As far as I know you can't have two bootable volumes in the same container - you would still need two partitions for that (each with their own container). Since the volumes can be scattered around the container (and share data with other volumes) this should make enlarging a partition/container easy, but shrinking one will require moving any data out of the area about to be released. -- David Empson dempson@actrix.gen.nz
[toc] | [prev] | [next] | [standalone]
| From | nmassello@yahoo.com (Neill Massello) |
|---|---|
| Date | 2017-09-28 04:29 -0600 |
| Message-ID | <1nd1nsp.envfdi1khfndfN%nmassello@yahoo.com> |
| In reply to | #119587 |
David Empson <dempson@actrix.gen.nz> wrote: > A bootable APFS partition/container has at least four volumes: > > - The main one, visible and named by the user. > - Preboot, for early boot code > - VM, for virtual memory swap. > - Recovery, our old friend, no longer a separate partition. > > All of them are dynamically sized and don't need to be contiguous. Free > space in the container is shared between volumes. What is the advantage of having swap on a separate volume instead of as a file on the boot volume, assuming that both volumes are on the same physical storage system? I'm guessing that the swap volume will be entirely on the SSD portion of a Fusion boot drive.
[toc] | [prev] | [next] | [standalone]
| From | dempson@actrix.gen.nz (David Empson) |
|---|---|
| Date | 2017-09-29 00:40 +1300 |
| Message-ID | <1nd385q.l4d2q3f2nibkN%dempson@actrix.gen.nz> |
| In reply to | #119596 |
Neill Massello <nmassello@yahoo.com> wrote: > David Empson <dempson@actrix.gen.nz> wrote: > > > A bootable APFS partition/container has at least four volumes: > > > > - The main one, visible and named by the user. > > - Preboot, for early boot code > > - VM, for virtual memory swap. > > - Recovery, our old friend, no longer a separate partition. > > > > All of them are dynamically sized and don't need to be contiguous. Free > > space in the container is shared between volumes. > > What is the advantage of having swap on a separate volume instead of as > a file on the boot volume, assuming that both volumes are on the same > physical storage system? I'm guessing that the swap volume will be > entirely on the SSD portion of a Fusion boot drive. Fusion drives are probably one reason the VM volume is separate, so it can be identified easily and kept entirely on the SSD. The main volume can be partly on the SSD and partly on the hard drive. If it is best to implement it that way for one drive type, it is easier if the same method is used on all drive types. There is no particular disadvantage to VM being a separate volume other than a trivial amount of overhead. It can be mounted in the usual /private/var/vm. There could be other technical reasons, e.g. if the VM volume is able to have a rule saying it isn't allowed to grow above a certain size, or if having it separate helps with security and encryption. It also keeps it logically separate from the main volume for things like backups and other utilities which traverse the file system but don't look at other mounted volumes. -- David Empson dempson@actrix.gen.nz
[toc] | [prev] | [next] | [standalone]
| From | richard@cogsci.ed.ac.uk (Richard Tobin) |
|---|---|
| Date | 2017-09-28 10:39 +0000 |
| Message-ID | <oqijhf$2p6i$2@macpro.inf.ed.ac.uk> |
| In reply to | #119587 |
In article <1nd2dfp.s7bmvim8egq7N%dempson@actrix.gen.nz>, David Empson <dempson@actrix.gen.nz> wrote: >> Apple need to do something about the output of df in High Sierra. The >> "ifree" number makes the lines too long: >> >> Filesystem Size Used Avail Capacity iused ifree %iused >> Mounted on >> /dev/disk1s1 477Gi 382Gi 92Gi 81% 2699967 9223372036852075840 0% >> / >Thats a lot of inodes. 9.2x10^18 = 9.2 "exainodes" (ick). Just under 2^63 in fact. Thanks for the info about APFS volumes. df output is also interesting during Time Machine backups: //richard@macmini._afpovertcp._tcp.local/iMac on /Volumes/iMac (afpfs, nobrowse) /dev/disk2s2 on /Volumes/Time Machine Backups (hfs, local, nodev, nosuid, journaled, nobrowse) com.apple.TimeMachine.2017-09-28-112302@/dev/disk1s1 on /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/Big iMac/2017-09-28-112302/Macintosh HD (apfs, local, read-only, journaled, nobrowse) com.apple.TimeMachine.2017-09-27-230437@/dev/disk1s1 on /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/Big iMac/2017-09-27-230437/Macintosh HD (apfs, local, read-only, journaled, nobrowse) I'm not sure why there are two snapshots mounted. Presumably one is the snapshot at the previous backup - does it use that to find what's changed instead of the event log? And how long are these snapshots kept? Do they prevent space being freed when files are deleted? -- Richard
[toc] | [prev] | [next] | [standalone]
| From | dempson@actrix.gen.nz (David Empson) |
|---|---|
| Date | 2017-09-29 00:40 +1300 |
| Message-ID | <1nd37kf.1a5dmdj3nswgoN%dempson@actrix.gen.nz> |
| In reply to | #119598 |
Richard Tobin <richard@cogsci.ed.ac.uk> wrote: > In article <1nd2dfp.s7bmvim8egq7N%dempson@actrix.gen.nz>, > David Empson <dempson@actrix.gen.nz> wrote: > > >> Apple need to do something about the output of df in High Sierra. The > >> "ifree" number makes the lines too long: > >> > >> Filesystem Size Used Avail Capacity iused ifree > >> %iused Mounted on > >> /dev/disk1s1 477Gi 382Gi 92Gi 81% 2699967 9223372036852075840 > >> 0% / > > >Thats a lot of inodes. 9.2x10^18 = 9.2 "exainodes" (ick). > > Just under 2^63 in fact. > > Thanks for the info about APFS volumes. > > df output is also interesting during Time Machine backups: > > //richard@macmini._afpovertcp._tcp.local/iMac on /Volumes/iMac (afpfs, > nobrowse) > /dev/disk2s2 on /Volumes/Time Machine Backups (hfs, local, nodev, nosuid, > journaled, nobrowse) > com.apple.TimeMachine.2017-09-28-112302@/dev/disk1s1 on > /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/Big > iMac/2017-09-28-112302/Macintosh HD (apfs, local, read-only, journaled, > nobrowse) > com.apple.TimeMachine.2017-09-27-230437@/dev/disk1s1 on > /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/Big > iMac/2017-09-27-230437/Macintosh HD (apfs, local, read-only, journaled, > nobrowse) > > I'm not sure why there are two snapshots mounted. Presumably one is > the snapshot at the previous backup - does it use that to find what's > changed instead of the event log? That would make sense and is a much smarter solution, assuming Apple has a private API to efficiently compare snapshots to locate changes. > And how long are these snapshots kept? Do they prevent space being > freed when files are deleted? They would if they were kept indefinitely. There is probably an automatic pruning mechanism to delete old snapshots when the APFS container is getting full. For TM backups it only needs to retain one snapshot per backup drive: the one corresponding to the latest backup on that drive. TM would need a new snapshot while doing a backup, but after the backup finished it could discard the previous snapshot and retain the new one as the "last backup" snapshot. If the last backup snapshot had to be deleted for space reasons, there might still be a file system event log as a fallback method, otherwise it drops back to a deep traversal and worst case assumptions about the potential maximum size of the backup. -- David Empson dempson@actrix.gen.nz
[toc] | [prev] | [next] | [standalone]
| From | richard@cogsci.ed.ac.uk (Richard Tobin) |
|---|---|
| Date | 2017-09-28 15:44 +0000 |
| Message-ID | <oqj5c9$1hj$1@macpro.inf.ed.ac.uk> |
| In reply to | #119600 |
In article <1nd37kf.1a5dmdj3nswgoN%dempson@actrix.gen.nz>, David Empson <dempson@actrix.gen.nz> wrote: >> And how long are these snapshots kept? Do they prevent space being >> freed when files are deleted? >They would if they were kept indefinitely. > >There is probably an automatic pruning mechanism to delete old snapshots >when the APFS container is getting full. For TM backups it only needs to >retain one snapshot per backup drive: the one corresponding to the >latest backup on that drive. Is there a way to ask what snapshots exist? -- Richard
[toc] | [prev] | [next] | [standalone]
| From | Jaimie Vandenbergh <jaimie@sometimes.sessile.org> |
|---|---|
| Date | 2017-09-29 20:13 +0100 |
| Message-ID | <nn6tsc9fuql7la13h27kvtvgfejhh40395@4ax.com> |
| In reply to | #119605 |
On Thu, 28 Sep 2017 15:44:10 +0000 (UTC), richard@cogsci.ed.ac.uk (Richard Tobin) wrote: >In article <1nd37kf.1a5dmdj3nswgoN%dempson@actrix.gen.nz>, >David Empson <dempson@actrix.gen.nz> wrote: > >>> And how long are these snapshots kept? Do they prevent space being >>> freed when files are deleted? > >>They would if they were kept indefinitely. >> >>There is probably an automatic pruning mechanism to delete old snapshots >>when the APFS container is getting full. For TM backups it only needs to >>retain one snapshot per backup drive: the one corresponding to the >>latest backup on that drive. > >Is there a way to ask what snapshots exist? Not one that I've found. I went through an exciting period with the beta where the / filled up, and I had something like 60 mounted snapshots. Which was obviously broken and got fixed. 'deleted' as in delete daemon looks after reaping/pruning. It can take 24 hours or more. Which isn't super useful when your / is full... I haven't tested whether this is fixed in 10.13.0, because it's a real grind while / is full and I haven't got the energy tbh. Cheers - Jaimie -- "You know how dumb the average person is? Well, by definition, half of 'em are dumber than THAT." - J.R. "Bob" Dobbs
[toc] | [prev] | [next] | [standalone]
| From | Jaimie Vandenbergh <jaimie@sometimes.sessile.org> |
|---|---|
| Date | 2017-09-29 21:54 +0100 |
| Message-ID | <flctsc9j2gncp66d5bft3i9opo25fttd7u@4ax.com> |
| In reply to | #119643 |
On Fri, 29 Sep 2017 20:13:59 +0100, Jaimie Vandenbergh
<jaimie@sometimes.sessile.org> wrote:
>On Thu, 28 Sep 2017 15:44:10 +0000 (UTC), richard@cogsci.ed.ac.uk
>(Richard Tobin) wrote:
>
>>In article <1nd37kf.1a5dmdj3nswgoN%dempson@actrix.gen.nz>,
>>David Empson <dempson@actrix.gen.nz> wrote:
>>
>>>> And how long are these snapshots kept? Do they prevent space being
>>>> freed when files are deleted?
>>
>>>They would if they were kept indefinitely.
>>>
>>>There is probably an automatic pruning mechanism to delete old snapshots
>>>when the APFS container is getting full. For TM backups it only needs to
>>>retain one snapshot per backup drive: the one corresponding to the
>>>latest backup on that drive.
>>
>>Is there a way to ask what snapshots exist?
>
>Not one that I've found.
Found one!
tmutil listlocalsnapshots /
tmutil snapshot
tmutil deletesnapshot {datestring}
and various other tmutil verbs.
Cheers - Jaimie
--
Tomorrow (noun) - A mystical land where 99 per cent of all human
productivity, motivation and achievement is stored.
-- http://thedoghousediaries.com/3474
[toc] | [prev] | [next] | [standalone]
| From | richard@cogsci.ed.ac.uk (Richard Tobin) |
|---|---|
| Date | 2017-09-29 23:48 +0000 |
| Message-ID | <oqmm48$1uu3$1@macpro.inf.ed.ac.uk> |
| In reply to | #119645 |
In article <flctsc9j2gncp66d5bft3i9opo25fttd7u@4ax.com>,
Jaimie Vandenbergh <jaimie@sometimes.sessile.org> wrote:
>>>Is there a way to ask what snapshots exist?
>>Not one that I've found.
>Found one!
>
>tmutil listlocalsnapshots /
>tmutil snapshot
>tmutil deletesnapshot {datestring}
>
>and various other tmutil verbs.
I'm confused now. Are these snapshots in the APFS sense? Time
Machine already called local backups snapshots and had "tumtil
snapshot". I was expecting there to be a generic APFS snapshot
listing program, unrelated to Time Machine.
Is it that Time Machine local snapshots are either APFS snapshots or
conventional backups, depending on whether the filesystem is APFS?
I notice that the snapshot names only contain the date, not an
indication of the backup disk they correspond to. Presumably TM looks
for one matching the time of the last backup present on the backup
disk.
I see there are several programs in
/System/Library/Filesystems/apfs.fs/Contents/Resources/
and the apfs.util program there has this option:
-R SNAPSHOT : set the volume to revert to the snapshot named by SNAPSHOT on next mount.
Diskutil has an "ap" verb for various APFS functions, but not listing
snapshots. But there is a function called fs_snapshot_list in
/System/Library/PrivateFrameworks/DiskManagement.framework/Versions/A/DiskManagement
-- Richard
[toc] | [prev] | [next] | [standalone]
| From | dempson@actrix.gen.nz (David Empson) |
|---|---|
| Date | 2017-09-30 15:23 +1300 |
| Message-ID | <1nd67a3.1fjuzum1rww1lcN%dempson@actrix.gen.nz> |
| In reply to | #119646 |
Richard Tobin <richard@cogsci.ed.ac.uk> wrote:
> In article <flctsc9j2gncp66d5bft3i9opo25fttd7u@4ax.com>,
> Jaimie Vandenbergh <jaimie@sometimes.sessile.org> wrote:
>
> >>>Is there a way to ask what snapshots exist?
>
> >>Not one that I've found.
>
> >Found one!
> >
> >tmutil listlocalsnapshots /
> >tmutil snapshot
> >tmutil deletesnapshot {datestring}
> >
> >and various other tmutil verbs.
>
> I'm confused now. Are these snapshots in the APFS sense?
Yes.
> Time Machine already called local backups snapshots and had "tumtil
> snapshot". I was expecting there to be a generic APFS snapshot listing
> program, unrelated to Time Machine.
Those are probably just the snapshots maintained by TM. If the system
maintains any other ones, they wouldn't be listed by tmutil.
> Is it that Time Machine local snapshots are either APFS snapshots or
> conventional backups, depending on whether the filesystem is APFS?
Yes.
On APFS, TM does local snapshots by doing a periodic snapshot. That
means it covers changes on the entire volume.
On HFS+, TM uses a rather more limited mechanism which needs to take
copies of documents in order to be able to restore older versions, which
it does on no identifiable schedule. This only covers user documents,
not other things like applications or the OS.
> I notice that the snapshot names only contain the date, not an
> indication of the backup disk they correspond to. Presumably TM looks
> for one matching the time of the last backup present on the backup
> disk.
I forgot about local snapshots in my earlier post.
With them in mind, I expect it works like this:
Every TM backup to an external drive needs to create a snapshot on the
source drive. That is compared to a previous snapshot, hopefully one
corresponding to the previous backup on the same backup drive.
After the backup is finished, the snapshot can be retained as a local
snapshot. At least the latest one needs to be retained for comparison
purposes for the next backup on the same drive, but earlier ones can
also be retained if there is plenty of disk space.
In earlier OS versions, TM already retained some backup history details
on the source drive, and this includes enough infomration to track which
snapshots are needed for each active backup drive.
If no backup drive is available when TM is scheduled to do another
backup, it probably takes a local snapshot anyway.
Older local snapshots can be purged at a slow pace as long as there is
plenty of free disk space, but if free space is getting low I expect
they are purged more aggressively, similarly to how local snapshot
copies of files are purged on HFS+ volumes.
> I see there are several programs in
>
> /System/Library/Filesystems/apfs.fs/Contents/Resources/
>
> and the apfs.util program there has this option:
>
> -R SNAPSHOT : set the volume to revert to the snapshot named by SNAPSHOT
> on next mount.
Probably not intended for end users at this stage.
> Diskutil has an "ap" verb for various APFS functions, but not listing
> snapshots. But there is a function called fs_snapshot_list in
>
> /System/Library/PrivateFrameworks/DiskManagement.framework/Versions/A/
> DiskManagement
I think Apple is keeping snapshot APIs private for the moment as the
mechanism is somewhat likely to vary. They are making it available to
selected developers who submit special requests to get the right
entitlements (similar to the mechanism needed to get permission to
create signed kernel extensions in recent macOS versions).
--
David Empson
dempson@actrix.gen.nz
[toc] | [prev] | [next] | [standalone]
| From | Theo <theom+news@chiark.greenend.org.uk> |
|---|---|
| Date | 2017-10-02 21:01 +0100 |
| Message-ID | <A5u*eBkDw@news.chiark.greenend.org.uk> |
| In reply to | #119648 |
David Empson <dempson@actrix.gen.nz> wrote: > On APFS, TM does local snapshots by doing a periodic snapshot. That > means it covers changes on the entire volume. > > On HFS+, TM uses a rather more limited mechanism which needs to take > copies of documents in order to be able to restore older versions, which > it does on no identifiable schedule. This only covers user documents, > not other things like applications or the OS. So on APFS as they're configured it the entire system sits on one volume, rather than being broken up into a tree of recursive volumes as is common with ZFS? > I forgot about local snapshots in my earlier post. > > With them in mind, I expect it works like this: > > Every TM backup to an external drive needs to create a snapshot on the > source drive. That is compared to a previous snapshot, hopefully one > corresponding to the previous backup on the same backup drive. What does the external drive data structure look like? Is it still a sparsebundle, or some other format? Theo
[toc] | [prev] | [next] | [standalone]
| From | Jaimie Vandenbergh <jaimie@sometimes.sessile.org> |
|---|---|
| Date | 2017-10-02 21:24 +0100 |
| Message-ID | <8k75tc912kcu80mlfgirtlbk668tb334u5@4ax.com> |
| In reply to | #119688 |
On 02 Oct 2017 21:01:22 +0100 (BST), Theo <theom+news@chiark.greenend.org.uk> wrote: >David Empson <dempson@actrix.gen.nz> wrote: >> On APFS, TM does local snapshots by doing a periodic snapshot. That >> means it covers changes on the entire volume. >> >> On HFS+, TM uses a rather more limited mechanism which needs to take >> copies of documents in order to be able to restore older versions, which >> it does on no identifiable schedule. This only covers user documents, >> not other things like applications or the OS. > >So on APFS as they're configured it the entire system sits on one volume, >rather than being broken up into a tree of recursive volumes as is common >with ZFS? Disks are GUID format. There's an organisational unit of an APFS Container, which takes one partition of your disk. It can be all available space or split it around other classic partitions. Multiple Containers on one disk are also possible. Inside the Container you can have as many volumes as you fancy, they share the total dataspace. Each may have optional max quota and minimum set capacity. As far as I know that's the full depth of the heirarchy - Disk, Container, Volume. There's no equivalent of nested datasets. ZFS is not a useful model for thinking about APFS, it trips you up with dubious equivalencies. >> Every TM backup to an external drive needs to create a snapshot on the >> source drive. That is compared to a previous snapshot, hopefully one >> corresponding to the previous backup on the same backup drive. > >What does the external drive data structure look like? Is it still a >sparsebundle, or some other format? Same as always, no change yet. You can't even have a TM destination on an APFS container. Cheers - Jaimie -- "If this crazy idealistic 'dont-eat-people' idea of yours was to catch on, I just don't know where we would all be. Fortunately, I suppose it catching on isn't really very likely -- why, you might just as well go around saying 'Don't fight people'..." -- Flanders & Swann
[toc] | [prev] | [next] | [standalone]
| From | dempson@actrix.gen.nz (David Empson) |
|---|---|
| Date | 2017-10-03 12:07 +1300 |
| Message-ID | <1ndbii7.1c4xcaj1dn8vcbN%dempson@actrix.gen.nz> |
| In reply to | #119648 |
David Empson <dempson@actrix.gen.nz> wrote:
> Richard Tobin <richard@cogsci.ed.ac.uk> wrote:
>
> > In article <flctsc9j2gncp66d5bft3i9opo25fttd7u@4ax.com>,
> > Jaimie Vandenbergh <jaimie@sometimes.sessile.org> wrote:
> >
> > >>>Is there a way to ask what snapshots exist?
> >
> > >>Not one that I've found.
> >
> > >Found one!
> > >
> > >tmutil listlocalsnapshots /
> > >tmutil snapshot
> > >tmutil deletesnapshot {datestring}
> > >
> > >and various other tmutil verbs.
> >
> > I'm confused now. Are these snapshots in the APFS sense?
>
> Yes.
>
> > Time Machine already called local backups snapshots and had "tumtil
> > snapshot". I was expecting there to be a generic APFS snapshot listing
> > program, unrelated to Time Machine.
>
> Those are probably just the snapshots maintained by TM. If the system
> maintains any other ones, they wouldn't be listed by tmutil.
>
> > Is it that Time Machine local snapshots are either APFS snapshots or
> > conventional backups, depending on whether the filesystem is APFS?
>
> Yes.
>
> On APFS, TM does local snapshots by doing a periodic snapshot. That
> means it covers changes on the entire volume.
>
> On HFS+, TM uses a rather more limited mechanism which needs to take
> copies of documents in order to be able to restore older versions, which
> it does on no identifiable schedule. This only covers user documents,
> not other things like applications or the OS.
>
> > I notice that the snapshot names only contain the date, not an
> > indication of the backup disk they correspond to. Presumably TM looks
> > for one matching the time of the last backup present on the backup
> > disk.
>
> I forgot about local snapshots in my earlier post.
>
> With them in mind, I expect it works like this:
>
> Every TM backup to an external drive needs to create a snapshot on the
> source drive. That is compared to a previous snapshot, hopefully one
> corresponding to the previous backup on the same backup drive.
>
> After the backup is finished, the snapshot can be retained as a local
> snapshot. At least the latest one needs to be retained for comparison
> purposes for the next backup on the same drive, but earlier ones can
> also be retained if there is plenty of disk space.
Mostly confirmed by this Apple article:
https://support.apple.com/en-us/guide/mac-help/back-up-your-files-mh35860
"When you use Time Machine on a computer using Apple File System (APFS),
Time Machine not only keeps a copy of everything on your backup disk, it
also saves local snapshots of files that have changed on your internal
disk, so you can recover previous versions. These local snapshots are
saved hourly (unless you deselect Back Up Automatically) and they're
stored on your computer's internal disk."
The article doesn't go into details about the retention policy for local
snapshots, nor how the local snapshots are used to assist in creating
the next TM backup on an external drive.
--
David Empson
dempson@actrix.gen.nz
[toc] | [prev] | [next] | [standalone]
| From | Jaimie Vandenbergh <jaimie@sometimes.sessile.org> |
|---|---|
| Date | 2017-09-30 09:54 +0100 |
| Message-ID | <tplusc5jg6sbe3940511shrgo0svf7ijic@4ax.com> |
| In reply to | #119646 |
On Fri, 29 Sep 2017 23:48:24 +0000 (UTC), richard@cogsci.ed.ac.uk
(Richard Tobin) wrote:
>In article <flctsc9j2gncp66d5bft3i9opo25fttd7u@4ax.com>,
>Jaimie Vandenbergh <jaimie@sometimes.sessile.org> wrote:
>
>>>>Is there a way to ask what snapshots exist?
>
>>>Not one that I've found.
>
>>Found one!
>>
>>tmutil listlocalsnapshots /
>>tmutil snapshot
>>tmutil deletesnapshot {datestring}
>>
>>and various other tmutil verbs.
>
>I'm confused now. Are these snapshots in the APFS sense? Time
>Machine already called local backups snapshots and had "tumtil
>snapshot". I was expecting there to be a generic APFS snapshot
>listing program, unrelated to Time Machine.
As was I, which is why it took so long to find.
>Is it that Time Machine local snapshots are either APFS snapshots or
>conventional backups, depending on whether the filesystem is APFS?
Yeah, seems to be. On APFS a snapshot is a snapshot, its only
interesting feature is the date it was taken. APFS snapshots are not
touted as atomic, which is interesting.
https://developer.apple.com/library/content/documentation/FileManagement/Conceptual/APFS_Guide/Features/Features.html
>I notice that the snapshot names only contain the date, not an
>indication of the backup disk they correspond to. Presumably TM looks
>for one matching the time of the last backup present on the backup
>disk.
For write, TM appears to make a local APFS snapshot, and if the external
TM destination is available writes a normal backup same as always.
For restore, it includes APFS snapshots from the fs you're browsing and
also includes the backups from the external TM destination, sorted by
date in the usual way.
No colour indicator on the ticks any more, but on the head of the TM
'Finder' window in the UI it erratically shows either the usual path or
a /Volumes/com.Apple.TimeMachine.localsnapshots/ path or a /Volumes/Time
Machine Backups/ path. Which is probably a bit of debugging code left
in, given how it's erratic.
I notice TM is also truckloads faster than it used to be for firing up
and browsing, which is no doubt down to those local snapshots.
>I see there are several programs in
>
> /System/Library/Filesystems/apfs.fs/Contents/Resources/
>
>and the apfs.util program there has this option:
>
> -R SNAPSHOT : set the volume to revert to the snapshot named by SNAPSHOT on next mount.
Yum, point-in-time consistent filesystem reversion :)
Cheers - Jaimie
--
I love children, especially when they cry, for then someone takes them away.
-- Nancy Mitford
[toc] | [prev] | [next] | [standalone]
| From | Paul Sture <nospam@sture.ch> |
|---|---|
| Date | 2017-09-30 22:33 +0200 |
| Message-ID | <nmb5ae-frn1.ln1@news2.chingola.ch> |
| In reply to | #119649 |
On 2017-09-30, Jaimie Vandenbergh <jaimie@sometimes.sessile.org> wrote: > > I notice TM is also truckloads faster than it used to be for firing up > and browsing, which is no doubt down to those local snapshots. > It's truckloads faster on my spinning disk only system with everything still on HFS. It looks like they've rewritten it, for it was painfully slow before. -- Everybody has a testing environment. Some people are lucky enough to have a totally separate environment to run production in.
[toc] | [prev] | [next] | [standalone]
| From | Jaimie Vandenbergh <jaimie@sometimes.sessile.org> |
|---|---|
| Date | 2017-09-30 22:12 +0100 |
| Message-ID | <4520tc1oiu08si4s079meovqs2psagj9g1@4ax.com> |
| In reply to | #119658 |
On Sat, 30 Sep 2017 22:33:59 +0200, Paul Sture <nospam@sture.ch> wrote: >On 2017-09-30, Jaimie Vandenbergh <jaimie@sometimes.sessile.org> wrote: >> >> I notice TM is also truckloads faster than it used to be for firing up >> and browsing, which is no doubt down to those local snapshots. >> > >It's truckloads faster on my spinning disk only system with everything >still on HFS. It looks like they've rewritten it, for it was painfully >slow before. Hurrah! It needed it. Cheers - Jaimie -- "On two occasions I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."
[toc] | [prev] | [next] | [standalone]
| From | Paul Sture <nospam@sture.ch> |
|---|---|
| Date | 2017-09-30 22:24 +0200 |
| Message-ID | <f4b5ae-frn1.ln1@news2.chingola.ch> |
| In reply to | #119643 |
On 2017-09-29, Jaimie Vandenbergh <jaimie@sometimes.sessile.org> wrote: > On Thu, 28 Sep 2017 15:44:10 +0000 (UTC), richard@cogsci.ed.ac.uk > (Richard Tobin) wrote: >> >>Is there a way to ask what snapshots exist? > > Not one that I've found. > > I went through an exciting period with the beta where the / filled up, > and I had something like 60 mounted snapshots. Which was obviously > broken and got fixed. > > 'deleted' as in delete daemon looks after reaping/pruning. It can take > 24 hours or more. Which isn't super useful when your / is full... > > I haven't tested whether this is fixed in 10.13.0, because it's a real > grind while / is full and I haven't got the energy tbh. > If you really want to test for this, creating relatively small disk images and operating on those is one way to go. It's much faster to fill these up than using whole disks. -- Everybody has a testing environment. Some people are lucky enough to have a totally separate environment to run production in.
[toc] | [prev] | [next] | [standalone]
| From | Jaimie Vandenbergh <jaimie@sometimes.sessile.org> |
|---|---|
| Date | 2017-09-30 22:14 +0100 |
| Message-ID | <p520tc59kp55jls7vhp4v8p3le26m9ied1@4ax.com> |
| In reply to | #119657 |
On Sat, 30 Sep 2017 22:24:15 +0200, Paul Sture <nospam@sture.ch> wrote:
>On 2017-09-29, Jaimie Vandenbergh <jaimie@sometimes.sessile.org> wrote:
>> On Thu, 28 Sep 2017 15:44:10 +0000 (UTC), richard@cogsci.ed.ac.uk
>> (Richard Tobin) wrote:
>>>
>>>Is there a way to ask what snapshots exist?
>>
>> Not one that I've found.
>>
>> I went through an exciting period with the beta where the / filled up,
>> and I had something like 60 mounted snapshots. Which was obviously
>> broken and got fixed.
>>
>> 'deleted' as in delete daemon looks after reaping/pruning. It can take
>> 24 hours or more. Which isn't super useful when your / is full...
>>
>> I haven't tested whether this is fixed in 10.13.0, because it's a real
>> grind while / is full and I haven't got the energy tbh.
>>
>
>If you really want to test for this, creating relatively small disk
>images and operating on those is one way to go. It's much faster to fill
>these up than using whole disks.
I don't trust data-only disks to be treated the same as the booted /, to
be honest.
Anyway, now I know 'tmutil listlocalsnapshots /' and 'tmutil
deletelocalsnapshot {date}' exist I can fix the damn thing myself next
time.
Cheers - Jaimie
--
"On two occasions I have been asked [by members of Parliament],
'Pray, Mr. Babbage, if you put into the machine wrong figures, will
the right answers come out?' I am not able rightly to apprehend the
kind of confusion of ideas that could provoke such a question."
[toc] | [prev] | [next] | [standalone]
| From | me32@privacy.net (R) |
|---|---|
| Date | 2017-09-30 11:32 +0100 |
| Message-ID | <1nd5x91.1d3ctx733znd2N%me32@privacy.net> |
| In reply to | #119587 |
David Empson <dempson@actrix.gen.nz> wrote: > Thats a lot of inodes. 9.2x10^18 = 9.2 "exainodes" (ick). Uselessish fact: Its prime factors are 2, 5 and 28823037615162737.
[toc] | [prev] | [standalone]
Back to top | Article view | uk.comp.sys.mac
csiph-web