Hi all, I have a pool called tank/home/foo and I want to rename it to tank/home/bar. What''s the best way to do this (the zfs and zpool man pages don''t have a "rename" option)? One way I can think of is to create a clone of tank/home/foo called tank/home/bar, and then destroy the former. Is that the best (or even only) way? TIA, -- Rich Teer, SCSA, SCNA, SCSECA, OGB member CEO, My Online Home Inventory Voice: +1 (250) 979-1638 URLs: http://www.rite-group.com/rich http://www.myonlinehomeinventory.com
On Tue, 10 Apr 2007, Rich Teer wrote:> I have a pool called tank/home/foo and I want to rename it to > tank/home/bar. What''s the best way to do this (the zfs and zpool man > pages don''t have a "rename" option)?In fact, there is a rename option for zfs: # zfs create tank/home # zfs create tank/home/foo # zfs list NAME USED AVAIL REFER MOUNTPOINT tank 2.73G 5.52G 2.73G /tank tank/home 36K 5.52G 18K /tank/home tank/home/foo 18K 5.52G 18K /tank/home/foo # zfs rename tank/home/foo tank/home/bar # zfs list NAME USED AVAIL REFER MOUNTPOINT tank 2.73G 5.52G 2.73G /tank tank/home 38K 5.52G 20K /tank/home tank/home/bar 18K 5.52G 18K /tank/home/bar # Regards, markm
On Tue, 10 Apr 2007, Mark J Musante wrote:> On Tue, 10 Apr 2007, Rich Teer wrote: > > > I have a pool called tank/home/foo and I want to rename it to > > tank/home/bar. What''s the best way to do this (the zfs and zpool man > > pages don''t have a "rename" option)? > > In fact, there is a rename option for zfs:Doh! That''s what I get for reading the man page too fast... :-/ Many thanks, -- Rich Teer, SCSA, SCNA, SCSECA, OGB member CEO, My Online Home Inventory Voice: +1 (250) 979-1638 URLs: http://www.rite-group.com/rich http://www.myonlinehomeinventory.com
Rich Teer wrote:> Hi all, > > I have a pool called tank/home/foo and I want to rename it to > tank/home/bar. What''s the best way to do this (the zfs and > zpool man pages don''t have a "rename" option)?Are you sure you have a pool with that name not a filesystem in a pool with that name ? See zfs(1) it does have a rename.> One way I can think of is to create a clone of tank/home/foo > called tank/home/bar, and then destroy the former. Is that > the best (or even only) way?zfs rename tank/home/foo tank/home/bar Would be the best and documented way. -- Darren J Moffat