[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: zfs not detecting drive failure



Hi

On 02/09/13 10:32, Muhammad Yousuf Khan wrote:
> i am using ZFS on debian(ubuntu) for learning ZFS but there is some
> problem that i am facing .
>
> i have create 6 files, size are 2GB each and things are working as
> learned however when i removed one of the file. my "zfs status"
> showing me that file is still online.

Removed? How?
>
> for example here is zpool status.
>
> root@ubuntu-ykhan:/pool1# zpool status -v pool1
>   pool: pool1
>  state: ONLINE
>   scan: scrub repaired 0 in 0h1m with 0 errors on Mon Sep  2 12:31:14 2013
> config:
>
>     NAME                               STATE     READ WRITE CKSUM
>     pool1                              ONLINE       0     0     0
>       raidz2-0                         ONLINE       0     0     0
>         /Personal/zfs/pool1/disk1.img  ONLINE       0     0     0
>         /Personal/zfs/pool1/disk2.img  ONLINE       0     0     0
>         /Personal/zfs/pool1/disk3.img  ONLINE       0     0     0
>         /Personal/zfs/pool1/disk4.img  ONLINE       0     0     0
>         /Personal/zfs/pool1/disk5.img  ONLINE       0     0     0
>         /Personal/zfs/pool1/disk6.img  ONLINE       0     0     0
>
> root@ubuntu-ykhan:/Personal/zfs/pool1# ls
> disk10.img  disk3.img  disk5.img  disk7.img  disk9.img
> disk1.img   disk4.img  disk6.img  disk8.img
>
>
> you might notice that i have deleted the file called "disk2.img"  but
> still it showing online.

Yes: If you removed it simply by using "rm", the file actually still
exists. And it will continue to exist until everybody who has it open
closes it.

All that "rm" does is to remove it from the directory listing. Processes
that have already opened the file can continue to access the file
without problems. Until they close it, and the file can (finally) be
deleted.
>
> i run scrub but didnt help.
If you run "scrub" on an already-deleted file will have little effect...

> i copy and deleted the data in side mounted pool, several time still
> didnt help.
>
> any advice please.
>
> Thanks,
>
> myk
>

I believe that your test case is faulty, as "rm" doesn't actually do
what you think it does...

Hope this helps


Reply to: