tomwaters
2010-Feb-25 01:44 UTC
[zfs-discuss] Oops, ran zfs destroy after renaming a folder and deleted my file system.
Ok, I know NOW that I should have used zfs rename...but just for the record, and to give you folks a laugh, this is the mistake I made... I created a zfs file system, cloud/movies and shared it. I then filled it with movies and music. I then decided to rename it, so I used rename in the Gnome to change the folder name to media...ie cloud/media. <---- MISTAKE I then noticed the zfs share was pointing to /cloud/movies which no longer exists. So, I removed cloud/movies with zfs destroy <--- BIGGER MISTAKE So, now I am restoring my media from backup. -- This message posted from opensolaris.org
tomwaters
2010-Feb-25 01:46 UTC
[zfs-discuss] Oops, ran zfs destroy after renaming a folder and deleted my file system.
Ok, I know NOW that I should have used zfs rename...but just for the record, and to give you folks a laugh, this is the mistake I made... I created a zfs file system, cloud/movies and shared it. I then filled it with movies and music. I then decided to rename it, so I used rename in the Gnome to change the folder name to media...ie cloud/media. <---- MISTAKE I then noticed the zfs share was pointing to /cloud/movies which no longer exists. So, I removed cloud/movies with zfs destroy <--- BIGGER MISTAKE So, now I am restoring my media from backup. -- This message posted from opensolaris.org
Ed Jobs
2010-Feb-25 02:00 UTC
[zfs-discuss] Oops, ran zfs destroy after renaming a folder and deleted my file system.
On Thursday 25 of February 2010 03:46, tomwaters wrote:> Ok, I know NOW that I should have used zfs rename...but just for the > record, and to give you folks a laugh, this is the mistake I made... > > I created a zfs file system, cloud/movies and shared it. > I then filled it with movies and music. > I then decided to rename it, so I used rename in the Gnome to change the > folder name to media...ie cloud/media. <---- MISTAKE I then noticed the > zfs share was pointing to /cloud/movies which no longer exists. So, I > removed cloud/movies with zfs destroy <--- BIGGER MISTAKE > > So, now I am restoring my media from backup.just for the record: did you want to rename the mountpoint or the dataset? -- Real programmers don''t document. If it was hard to write, it should be hard to understand. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100225/dedecc0e/attachment.bin>
tomwaters
2010-Feb-25 03:24 UTC
[zfs-discuss] Oops, ran zfs destroy after renaming a folder and deleted my file system.
well, both I guess... I thought the dataset name was based upon the file system...so I was assuming that if i renamed the zfs filesystem (with zfs rename) it would also rename the dataset... ie... #zfs create tank/fred gives... NAME USED AVAIL REFER MOUNTPOINT tank/fred 26.0K 4.81G 10.0K /tank/fred and then #zfs rename tank/fred tank/mary will give... NAME USED AVAIL REFER MOUNTPOINT tank/mary 26.0K 4.81G 10.0K /tank/mary It''s all rather confusing to a newbit like me I must admit...so please post examples so I can understand it. -- This message posted from opensolaris.org
David Dyer-Bennet
2010-Feb-25 03:42 UTC
[zfs-discuss] Oops, ran zfs destroy after renaming a folder and deleted my file system.
On 2/24/2010 7:46 PM, tomwaters wrote:> Ok, I know NOW that I should have used zfs rename...but just for the record, and to give you folks a laugh, this is the mistake I made... > > I created a zfs file system, cloud/movies and shared it. > I then filled it with movies and music. > I then decided to rename it, so I used rename in the Gnome to change the folder name to media...ie cloud/media.<---- MISTAKE > I then noticed the zfs share was pointing to /cloud/movies which no longer exists. > So, I removed cloud/movies with zfs destroy<--- BIGGER MISTAKE > > So, now I am restoring my media from backup. >And THAT is one of the reasons why backups are important even with redundant safe fileservers. (Software bugs, physical destruction, and user error!) -- David Dyer-Bennet, dd-b at dd-b.net; http://dd-b.net/ Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/ Photos: http://dd-b.net/photography/gallery/ Dragaera: http://dragaera.info
Kjetil Torgrim Homme
2010-Feb-25 11:29 UTC
[zfs-discuss] Oops, ran zfs destroy after renaming a folder and deleted my file system.
tomwaters <tomwaters at chadmail.com> writes:> I created a zfs file system, cloud/movies and shared it. > I then filled it with movies and music. > I then decided to rename it, so I used rename in the Gnome to change > the folder name to media...ie cloud/media. <---- MISTAKE > I then noticed the zfs share was pointing to /cloud/movies which no > longer exists.I think you should file a bug against Nautilus (the GNOME file manager). When you rename a directory, it should check for it being a mountpoint and warn appropriately. (adding ZFS specific code to DTRT is perhaps asking for a bit too much.) evidently it got an error for the rename(2) and instead started to copy/delete the original. *inside* some filesystems, this is probably correct behaviour, but when the object is a filesystem, I don''t think anyone want this behaviour. if they want to move data off the filesystem, they should go inside, mark all files, and drag (or ^X ^V) the files wherever they should go.> So, I removed cloud/movies with zfs destroy <--- BIGGER MISTAKEI see the reasoning behind this, but as you''ve learnt the hard way: always double-check before using zfs destroy. -- Kjetil T. Homme Redpill Linpro AS - Changing the game
tomwaters
2010-Feb-25 11:59 UTC
[zfs-discuss] Oops, ran zfs destroy after renaming a folder and deleted my file system.
Yes, I am glad that I learned this lesson now, rather than in 6 months when I have re-purposed the exiting drives...makes me all the more committed to maintaining an up to date remote backup. The reality is that I can not afford to mirror the 8TB in the zpool, so I''ll balance the risk and just backup the important items like music, document and photo''s. ISO''s and DVD''s I can always recreate. Thanks guys for the support. I''ll do alot more reading on ZFS/datasets etc. befor I mess with the server again!...hmmm, actually, I just had a thought, I will also create a playpool when I can try out things before using them on the main pool. -- This message posted from opensolaris.org
Francois Dion
2010-Feb-25 13:31 UTC
[zfs-discuss] Oops, ran zfs destroy after renaming a folder and deleted my file system.
On Thu, Feb 25, 2010 at 6:59 AM, tomwaters <tomwaters at chadmail.com> wrote:> Yes, I am glad that I learned this lesson now, rather than in 6 months when I have re-purposed the exiting drives...makes me all the more committed to maintaining an up to date remote backup. > > The reality is that I can not afford to mirror the 8TB in the zpool, so I''ll balance the risk and just backup the important items like music, document and photo''s. > > ISO''s and DVD''s I can always recreate. > > Thanks guys for the support. I''ll do alot more reading on ZFS/datasets etc. befor I mess with the server again!...hmmm, actually, I just had a thought, I will also create a playpool when I can try out things before using them on the main pool.In that regard, you can use a file based zpool, no need to slice your disks that way. Francois