Delete volume

Status
Not open for further replies.

geohei

Cadet
Joined
Jun 17, 2012
Messages
2
Hi.

Trivial question, but no answer found in this forum or Google.

I'd like to delete a created volume using the FreeNAS web interface.

Is that possible?

I use 8.0.4-p3.

Thanks,
 

strawdog74

Dabbler
Joined
May 23, 2012
Messages
42
It's a little counter-intuitive, but I think you need to "EXPORT" the volume, selecting the option "MARK THE DISK AS NEW" if you also want to remove the data on there.
 

geohei

Cadet
Joined
Jun 17, 2012
Messages
2
Yes, right .... this worked!
Hidden feature ;)

Something else ... when I include the volume, the disk shows 10.7 GB. When I created an UFS volume, I see size 7.9 and 7.2 available.
Where are the remaining 2.8 GBs?

Thanks,
 

strawdog74

Dabbler
Joined
May 23, 2012
Messages
42
Great!

As for missing space, my guess is the 2.8GB has probably been allocated as swap. Try logging into freenas with PuTTY and entering the following command :-

gpart show

It should give you similar output as follows, and show what has been allocated to each partition. This should (hopefully) tell you what the space has been used for. Here's the output for my RAIDZ1 array :-

[root@freenas] ~# gpart show
=> 34 1953458109 da0 GPT (931G)
34 94 - free - (47K)
128 4194304 1 freebsd-swap (2.0G)
4194432 1949263711 2 freebsd-zfs (929G)

=> 63 8375094 da1 MBR (4.0G)
63 1930257 1 freebsd [active] (943M)
1930320 63 - free - (32K)
1930383 1930257 2 freebsd (943M)
3860640 3024 3 freebsd (1.5M)
3863664 41328 4 freebsd (20M)
3904992 4470165 - free - (2.1G)

=> 34 488397101 ada0 GPT (233G)
34 94 - free - (47K)
128 4194304 1 freebsd-swap (2.0G)
4194432 484202703 2 freebsd-zfs (231G)

=> 34 3907029101 ada1 GPT (1.8T)
34 94 - free - (47K)
128 4194304 1 freebsd-swap (2.0G)
4194432 3902834703 2 freebsd-zfs (1.8T)

=> 34 3907029101 ada2 GPT (1.8T)
34 94 - free - (47K)
128 4194304 1 freebsd-swap (2.0G)
4194432 3902834703 2 freebsd-zfs (1.8T)

=> 34 3907029101 ada3 GPT (1.8T)
34 94 - free - (47K)
128 4194304 1 freebsd-swap (2.0G)
4194432 3902834703 2 freebsd-zfs (1.8T)

=> 0 1930257 da1s1 BSD (943M)
0 16 - free - (8.0K)
16 1930241 1 !0 (943M)

Good luck finding your missing gigs...I am a n00b too so there may be a better way of doing the above.

Cheers // Martin
 

NeilP

Dabbler
Joined
Jul 11, 2012
Messages
28
Trouble with the Export / Mark As New solution is that it takes tiem to Export it..
A simple Delete option would be nice.

Since this is not available, how would this be done from the CLI or SSH
 

strawdog74

Dabbler
Joined
May 23, 2012
Messages
42
Since this is not available, how would this be done from the CLI or SSH

Try the following, but be aware that destroying the volume on SSH will not remove it from FreeNAS GUI (you will need to edit the /data/freenas-v1.db with HeidiSQL (there are other threads explaining how to do this) :-

[root@freenas] /mnt# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
hdd1 5.45T 1.51T 3.94T 27% ONLINE /mnt
[root@freenas] /mnt#zpool destroy hdd1

Here's a list of other useful commands, "dd" commands to be used with caution!!

------------------------------------------------------------------------------------------------
mounting an external ntfs drive
------------------------------------------------------------------------------------------------
mount -ft ntfs /dev/da1p1 /mnt/usb/
umount /mnt/usb

------------------------------------------------------------------------------------------------
exporting a disk after GUI fails
------------------------------------------------------------------------------------------------
zpool export hdd0

------------------------------------------------------------------------------------------------
copy files recursively without overwriting (verbose)
------------------------------------------------------------------------------------------------
cp -nrv * /dest

------------------------------------------------------------------------------------------------
view the process status
------------------------------------------------------------------------------------------------
ps ax

------------------------------------------------------------------------------------------------
display folder size and disk sizes
------------------------------------------------------------------------------------------------
du -sf /dir
df

------------------------------------------------------------------------------------------------
data duplication and formatting tasks
------------------------------------------------------------------------------------------------
dd if=/mnt/hdd1 of=/mnt/usb0 bs=1m
dd if=/dev/zero of=/dev/ada1 bs=512 count=2
dd if=/dev/zero of=/dev/ada1 bs=512 skip=sectors

------------------------------------------------------------------------------------------------
backup hdd1 to usb drive
------------------------------------------------------------------------------------------------
rsync -av --delete /mnt/hdd1/ /mnt/usb/

fsck - check and repair a Linux file system
md5sum

------------------------------------------------------------------------------------------------
determining sector size on hard disk
------------------------------------------------------------------------------------------------
zpool set cachefile=/data/zfs/zpool.cache hdd1
zdb -U /data/zfs/zpool.cache | grep ashift

If the answer = 9, you have 512 byte sectors.
If the answer = 12, you have 4k byte sectors.

------------------------------------------------------------------------------------------------
list all files recursively as .csv to output file
------------------------------------------------------------------------------------------------
ll -Raml >files.txt

------------------------------------------------------------------------------------------------
useful volume management commands
------------------------------------------------------------------------------------------------
gmirror status
gpart show
zpool list
zpool status
camcontrol devlist
zfs list

------------------------------------------------------------------------------------------------
destroy the GPT at beginning and end of drive
------------------------------------------------------------------------------------------------
sysctl kern.geom.debugflags=0x10
dd if=/dev/zero of=/dev/da0 bs=1m count=1
dd if=/dev/zero of=/dev/da0 bs=1m oseek=`diskinfo ada0 | awk '{print int($3 / (1024*1024)) - 4;}'`

------------------------------------------------------------------------------------------------
rename a volume
------------------------------------------------------------------------------------------------
export from GUI
zpool import usb usb2
zpool status -v
zpool import -R /mnt 1462612345814408114 usb
 

NeilP

Dabbler
Joined
Jul 11, 2012
Messages
28
Great, thanks for the good info there.

I am just in the process of doing a fresh instal, and am going to start again.



but I have also just found the continuation of the old FreeNAS0.7, now called NAS4Free, so I am gong to give that a try too, maybe that is better suited to my needs than this version
I install to USB so I will install to a fresh stick and see which I get running successfully. Permissions 8 do not seem anywhere as easy to setup as the old 7 ,and AFP seem not to work well on my system either, so 7 or its successor, may run better. My last box was FreeNAS 0.7.2 and it ran for ..2 years, maybe 3, so may go back to what I know does work and is stable



Bizarre...the fresh install has just crashed just after
Found confign on device =

/cf was not properly dismounted.

And load of cannot find file system superblock
Un known error; help! message

Same error I was getting before on totally different machine..the only [art fo the system that is the same is the power lead that plugs in to the mains power New HDD's new USB sticks, M/board..memory ...f...ing computers
 
Status
Not open for further replies.
Top