A few technical items on UFS2 and snapshots...
Joe Schmoe
non_secure at yahoo.com
Fri Jun 25 14:20:59 PDT 2004
--- Oliver Fromme <olli at lurza.secnetix.de> wrote:
> > 1. Is it dangerous to mount all 20 possible
> filesystem snapshots and
> > _leave them mounted_ to use at any time ?
>
> I don't think there is any danger, except that you
> will run
> out of disk space sooner or later.
Every snapshot I have taken so far takes up zero space
on the drive, or at least that is what `df` is telling
me ... when I do an `ls -asl` in the directory with
the snapshots, I can see each snapshot has a filesize
equal to the size of the partition that was
snapshotted, but again, `df` tells me they take up
zero extra space. So where is the disconnect there ?
How much space is the snapshot _really_ taking up, and
how do I determine that ?
> > What about
> > automatically mounting all 20 snapshots at boot
> time ?
>
> Sorry, I fail to see what exactly you're trying to
> achieve.
> Why would you want to do that?
I dunno - just to have all the snapshots mounted so
that if I want to access one, I don't have to take the
time to mount it up. I'm just lazy, I guess ... so
there would be no ill effects of doing this ?
> > 2. Related to the first question, it seems like I
> am getting space
> > out of nowher e ... that is, if I fill up a
> drive, then make a
> > snapshot, then erase the drive and fill it again,
>
> You cannot fill it up again, because the snapshot
> still
> takes up all the space. When you fill the drive and
> make
> a snapshot, erasing the drive will not free any
> space.
Is this really true ? Where did you read this ? (so
I can go read it too...) And this goes back to my
first question above - if the snapshot files all take
up the same amount of space as the filesystem itself,
but `df` does not show an increase in space when I
make a snapshot, how do I tell what is _really_ going
on ?
> > 3. When I mount a snapshot, as described in the
> man page, but then
> > later mount - uw the snapshot ( to make that a
> writeable mount) and,
> > say, touch a file or create a file in the mounted
> snapshot ... what
> > exactly am I doing ?
>
> You're getting EPERM ("operation not permitted"),
> because
> snapshots are always read-only.
No, I'm not. Re-read the question - I am saying that
after I mount the snapshot, I then remount it with
-uw, making it writeable (with `mount -uw`), and then
I can _successfully_ touch files inside that snapshot.
SO what exactly am I doing then ? Have I ruined the
snapshot ? Can it still be used ? What inodes and
space get used when I touch files inside a
write-mounted snapshot ? Should the ability to mount
-uw a snapshot mount be removed (in the same way that
there is an exception in the unlink system call that
allows you to delete schg flagged snapshots) ??
> > write file A
> > write file B
> > crash
> > file A exists, but B does not
> > write file B
> > crash
> > BOTH file A and B _no longer exist_
Anyone else have comments on the above sequence ? Is
that possible to have happen, or did I just dream it ?
thanks.
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
More information about the freebsd-hackers
mailing list