Re: btrfs subvolume snapshot syntax too "smart"

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

 



On 04/04/2011 09:09 PM, krzf83@xxxxxxxxx wrote:
> I understand btrfs intent but same command run twice should not give
> diffrent results. This really makes snapshot automation hard
> 
> 
> root@sv12 [/ssd]# btrfs subvolume snapshot /ssd/sub1 /ssd/5
> Create a snapshot of '/ssd/sub1' in '/ssd/5'
> root@sv12 [/ssd]# btrfs subvolume snapshot /ssd/sub1 /ssd/5
> Create a snapshot of '/ssd/sub1' in '/ssd/5/sub1'
> root@sv12 [/ssd]# btrfs subvolume snapshot /ssd/sub1 /ssd/5
> Create a snapshot of '/ssd/sub1' in '/ssd/5/sub1'
> ERROR: cannot snapshot '/ssd/sub1'

The same is true for cp:

# cp -rf /ssd/sub1 /ssd/5	-> copy "sub1" as "5"
# cp -rf /ssd/sub1 /ssd/5	-> copy "sub1" in "5"

However you are right. It could be fixed easily adding a switch like
"--script", which force to handle the last part of the destination as
the name of the subvolume, raising an error if it already exists.

"subvolume snapshot" is the only command which suffers of this kind of
problem ?

Regards
G.Baroncelli

> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> .
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux