Hello folks, I have strange and unusual request... I have two 300gig drives mirrored: [11:33:22] root at chrysek: /d/d2 > zpool status pool: mypool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM mypool ONLINE 0 0 0 mirror ONLINE 0 0 0 c1t2d0 ONLINE 0 0 0 c1t3d0 ONLINE 0 0 0 errors: No known data errors it does give me total of [11:32:55] root at chrysek: /d/d2 > zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT mypool 278G 271G 6.75G 97% ONLINE - I am using around 150 gig of that 278 gig that I have and disk is 99% full [11:33:58] root at chrysek: /d/d2 > df -k . Filesystem 1k-blocks Used Available Use% Mounted on mypool/d 152348400 149829144 2519256 99% /d/d2 I am taking snaps so I have it since last year. I removed month 11 already because did not have any space left. [11:32:52] root at chrysek: /d/d2 > zfs list NAME USED AVAIL REFER MOUNTPOINT mypool 271G 2.40G 24.5K /mypool mypool/d 271G 2.40G 143G /d/d2 mypool/d at month_10 3.72G - 123G - mypool/d at month_12 22.3G - 156G - mypool/d at month_01 23.3G - 161G - mypool/d at month_02 16.1G - 172G - mypool/d at month_03 13.8G - 168G - mypool/d at month_04 15.7G - 168G - mypool/d at day_14 185M - 143G - Anyway in snaps that I have I do have certain files in those snaps that are few gig''s in sizes. I did go to snaps and I did try to remove them but I got message: [11:42:50] root at chrysek: /d/d2/.zfs/snapshot/month_01 > rm studio11-sol-sparc.tar rm: remove write-protected file `studio11-sol-sparc.tar''? y rm: cannot unlink `studio11-sol-sparc.tar'': Read-only file system [11:43:01] root at chrysek: /d/d2/.zfs/snapshot/month_01 > [11:43:03] root at chrysek: /d/d2/.zfs/snapshot/month_01 > ls -la studio11-sol-sparc.tar -rw-rw-r-- 1 root root 1123425280 Jan 25 2006 studio11-sol-sparc.tar [11:43:16] root at chrysek: /d/d2/.zfs/snapshot/month_01 > Is there a way to mount file system as read/write and be able to remove those big files that I dont need there? I would love to keep those snaps for months... I know, easy suggestion would be to add more disk space and never worry about it but yet again in my situation I have two internal disks that are 300gb and I cannot add more internal drives to that system so I rather use what I can... Thanks for any help. Chris
Krzys wrote:> > Is there a way to mount file system as read/write and be able to > remove those big files that I dont need there? >My understanding is that shapshots are read/only by design, so I don''t think you are going to be able to remove files from them. One thing to remember is that if those big files are not changing on a regular basis, they are not taking up additional space for each snapshot. There is essentially only one copy of the data that is "shared" in each snapshot. Only when the file actually changes is when extra space is consumed. So if you are not changing those files, you''ll have to look else where to find where you space is going. Obviously one alternative is to create another filesystem for holding these big files, one that you don''t snapshot, or snapshot even less often.
Yes, I certainly agree. but what I wanted to do is remove those big files completly from my system, so I would make sure its gone from each snap. I certainly do understand the design of zfs file system and I was just wondering if what I wanted is possible... so just on that one file example that I had, if I could just go and remove that particular file from every snap like that file would never existed... If I dont do that and I remove it from my file system those references will stay in all snaps except for the last one and that is all great... but my issue at this moment is that I have 300gb drive and only 150gb of disk space used and my file system is at almost 100% Soon I will not be able to take any snaps unless I remove some old ones or add another mirror to it... Anyway just wanted to know if any of that woul dbe possible in any way... Regards, Chris On Sat, 14 Apr 2007, Joseph Mocker wrote:> > > Krzys wrote: >> >> Is there a way to mount file system as read/write and be able to remove >> those big files that I dont need there? >> > My understanding is that shapshots are read/only by design, so I don''t think > you are going to be able to remove files from them. > > One thing to remember is that if those big files are not changing on a > regular basis, they are not taking up additional space for each snapshot. > There is essentially only one copy of the data that is "shared" in each > snapshot. Only when the file actually changes is when extra space is > consumed. > > So if you are not changing those files, you''ll have to look else where to > find where you space is going. > > Obviously one alternative is to create another filesystem for holding these > big files, one that you don''t snapshot, or snapshot even less often. > > > !DSPAM:122,4620fda18180148481500! >
On 4/14/07, Krzys <krzys at perfekt.net> wrote:> Yes, I certainly agree. but what I wanted to do is remove those big files > completly from my system, so I would make sure its gone from each snap. I > certainly do understand the design of zfs file system and I was just wondering > if what I wanted is possible... so just on that one file example that I had, if > I could just go and remove that particular file from every snap like that file > would never existed... If I dont do that and I remove it from my file system > those references will stay in all snaps except for the last one and that is all > great... but my issue at this moment is that I have 300gb drive and only 150gb > of disk space used and my file system is at almost 100% Soon I will not be able > to take any snaps unless I remove some old ones or add another mirror to it... > > Anyway just wanted to know if any of that woul dbe possible in any way...Chris, you may want to try cloning these snapshots, removing these big files from the clone and then zfs send/recv these clones, instead of original snapshots. -- Regards, Cyril