Do you defrag a NAS drive ?

Andy H

Well-known member
Nov 14, 2007
37
0
18,540
As the title says, do you need to defrag a NAS drive?? I'm not having any prob's but I put music on and take it off, so I'm not sure if you need to. Also if you do, how do you do it. When I right click on it, it does not give me the option.[*-)]
 
It's not a local drive so you won't get the option to defrag it, the only way you could do it is if the NAS itself has the option to do so in its software but that'll depend on the NAS in question.
 
If streaming audio, even completely lossless, the I/O performance of modern SATA disks can cope without having to worry about the level of fragmentation. If streaming over a wireless network that will be your potential bottleneck long before your NAS + disks starts to affect performance.
 
Scissor_digits:

If streaming audio, even completely lossless, the I/O performance of modern SATA disks can cope without having to worry about the level of fragmentation. If streaming over a wireless network that will be your potential bottleneck long before your NAS + disks starts to affect performance.

My understanding is similar, though I am playing a litle fast and loose with the word "understanding".

I have read, though, that mdern HDDs are designed to cope with a degree of fragmentation - at least enough for most domestic users not to worry about it.

But I only got this from a little investigation a while ago when I realised defragging was taking a while and oing little noticeable good.
 
Andy H:As the title says, do you need to defrag a NAS drive?? I'm not having any prob's but I put music on and take it off, so I'm not sure if you need to. Also if you do, how do you do it. When I right click on it, it does not give me the option.
emotion-42.gif


What'cha been reading?
 
I'm not a Linux guy, but these boxes often run Linux, and to my knowledge the OS and the File System they use do not need to be defragged manually since the OS does this automatcially.

If there is an option it'll be under the Admin functions of the NAS itself - log in via a web-browser and check.
 
JoelSim:

What'cha been reading?

Not read anything. I was thinking that the NAS is essentially a hard drive so do you need to defrag it occasionally like a comupter hard drive. Curiosity that's all.
 
Neon K:

If there is an option it'll be under the Admin functions of the NAS itself - log in via a web-browser and check.
Cheers Neon
 
If u have a linux based NAS running ext3 then there is no way (or need) to defrag it.

Fragmentation occurs from the constant deleting + writing of files - u dont normally see that sort of behaviour in a NAS - u just slowly fill it up over time.

In addition ext2/ext3 implement a method whereby the all blocks in a file are kept close together even if they cant be consecutive sectors so there is no need to worry about fragmentation.
 
Oh for gods sake don't encourage him!
emotion-8.gif


Back on topic - ReadyNASDuo doesn't have any option to defrag and performance has always been good.
 
brendonw:
Oh for gods sake don't encourage him!
emotion-8.gif


Back on topic - ReadyNASDuo doesn't have any option to defrag and performance has always been good.

Shut yer noise you.

Back on topic if you're really worried about, plug an external drive into the NAS, copy all the contents of the NAS onto the external drive, delete everything on the NAS and then copy everything back to the NAS, that will effectively defrag it as the copy operation will stream the files to the empty disk in one big contiguous block. Back in the old days we used to do that with SunOS 4.1.3 systems if they got really bad, except we'd write it off to tape and then stream it back on using tar.

It'll take quite a while for the size of disks you get now mind...
 
Most Unix filesystems will try to write files to contiguous blocks on a disk writing smaller files in to gaps created by file removal, fragmentation will eventually cause the filesystem slow down as a file read will require excessive head movement to collect the whole file. To maintain a good performance keep 20% of the disk space free this allows the filesystem room to work. I too have experience with SunOS 3.x and 4.x and now Solaris they still require free space on the filesystem to work properly.

Just used tar to copy my music files from the internal disks on my readynas to an external usb drive this weekend, for backup not defrag it took 20hours to copy 215GB so not fast.....

Best to install the EnableRootSSH addon and do the copy locally, i.e. internal disk to usb disk as apposed to internal disk over the net to pc to usb disk.
 
the_lhc:brendonw:
Oh for gods sake don't encourage him!
emotion-8.gif


Back on topic - ReadyNASDuo doesn't have any option to defrag and performance has always been good.

Back in the old days we used to do that with SunOS 4.1.3 systems if they got really bad, except we'd write it off to tape and then stream it back on using tar.

It'll take quite a while for the size of disks you get now mind...

You mention Sun. That's who my wife works for. Well now their called Oracle but back in the day her company was SCO then Tarantella before Sun bought them out.

Back on topic. Nice bit of info to know all this defragg stuff, as I've just ordered a ReadyNAS in advance of getting a Sonos set up.
 
the_lhc:

Back on topic if you're really worried about, plug an external drive into the NAS, copy all the contents of the NAS onto the external drive, delete everything on the NAS and then copy everything back to the NAS, that will effectively defrag it as the copy operation will stream the files to the empty disk in one big contiguous block. Back in the old days we used to do that with SunOS 4.1.3 systems if they got really bad, except we'd write it off to tape and then stream it back on using tar. It'll take quite a while for the size of disks you get now mind...

Thankyou very much the_lhc, Thats an easy to follow sollution.

Just to expain how this came about, I was doing my computer maintanance defrag, deleting old stuff etc etc and I got thinking about the NAS and wondered if it needed any maintanance. I am not having any prob's but I do put music on and off so I think I'll be following your advice soon.

Thanks once again.
 
Andy H:
the_lhc:

Back on topic if you're really worried about, plug an external drive into the NAS, copy all the contents of the NAS onto the external drive, delete everything on the NAS and then copy everything back to the NAS, that will effectively defrag it as the copy operation will stream the files to the empty disk in one big contiguous block. Back in the old days we used to do that with SunOS 4.1.3 systems if they got really bad, except we'd write it off to tape and then stream it back on using tar. It'll take quite a while for the size of disks you get now mind...

Thankyou very much the_lhc, Thats an easy to follow sollution.

Yes but it's also an unnecessary one, if you're using the NAS to store music it's probably never going to get fragmented, you're taking an empty drive and writing large files to it, probably in one or two sessions initially, which will get written in nice large blocks on the disk. From that point you're not likely to be changing or removing those files, only adding additional large files which will simply get written at the end of the existing block. It's only when you start constantly changing, deleting, updating or growing files that you get fragmentation. For most music library disks it's probably never going to be an issue.
 

TRENDING THREADS

Latest posts