Home NAS

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read how to get help
User avatar
MurphCID
Level 5
Level 5
Posts: 639
Joined: Fri Sep 25, 2015 10:29 pm

Re: Home NAS

Post by MurphCID » Wed Oct 31, 2018 9:15 pm

Man, you guys are great, so many good ideas, I want to preserve the DVDs especially the older Disney stuff for the kids, and I figure putting them on a NAS would really allow us to save the wear and tear on the dvds. Plus it would also eliminate the constant fighting over who had the DVD in her room, when the other one (or their mother) wanted to watch it.

rene
Level 8
Level 8
Posts: 2324
Joined: Sun Mar 27, 2016 6:58 pm

Re: Home NAS

Post by rene » Thu Nov 01, 2018 9:50 am

If you'd like to check actual size of some of your discs; save the following as say ~/bin/dvdcopy (after mkdir ~/bin if that directory doesn't yet exist), make it executable with chmod +x ~/bin/dvdcopy, and check (volume ID and) size of an in /dev/sr0 inserted disc with dvdcopy -i or in fact copy the disc as iso to the current directory with simply dvdcopy. dvdcopy -h produces a small usage screen.

Code: Select all

#!/usr/bin/env python3
#
# dvdcopy (public domain, 2018)

import argparse
import subprocess


def isoinfo(device):
    def val(tag, line):
        try:
            n = line.index(':')
            if line[:n].strip() == tag:
                return line[n + 1:].strip()
        except ValueError:
            return ''

    id, bs, vs = '', '', ''
    p = subprocess.run(['isoinfo', '-d', '-i', device], stdout=subprocess.PIPE, universal_newlines=True, check=True)
    for line in p.stdout.splitlines():
        if vs and bs and id:
            break
        if not id:
            id = val('Volume id', line)
            if id:
                continue
        if not bs:
            bs = val('Logical block size is', line)
            if bs:
                continue
        if not vs:
            vs = val('Volume size is', line)
    return id, int(bs), int(vs)


parser = argparse.ArgumentParser(description='Backup DVD to ISO.', formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-d', dest='device', default='/dev/sr0', help='source')
parser.add_argument('-i', dest='info', action='store_true', help='show iso info')
args = parser.parse_args()

id, bs, vs = isoinfo(args.device)
if args.info:
    print(id, '%.2fGB' % ((bs * vs) / 1000 ** 3))
else:
    n = (4096 * 1024) // bs
    while vs % n:
        n -= 1
    dd = ['dd', 'if=%s' % args.device, 'of=%s.iso' % id.lower(), 'bs=%d' % (bs * n), 'count=%d' % (vs // n), 'status=progress']
    print(*dd)
    subprocess.run(dd, check=True)
It needs the isoinfo program installed. I believe it is standard on Mint, but if not, sudo apt-get install genisoimage.

rene
Level 8
Level 8
Posts: 2324
Joined: Sun Mar 27, 2016 6:58 pm

Re: Home NAS

Post by rene » Fri Nov 02, 2018 2:49 am

Note; I myself have mostly music DVD's, as in bonus discs that came with CD packages and the like, and while I have yet to for those encounter one where the above does not work, things do bomb out with I/O errors on 4 out of the 6 commercial movie DVD's that I own. This appears to be a matter of an explicit copy-protection, with "bad sectors" used to thwart exactly this kind of direct device-level copy. If you're the patient type, ddrescue, sudo apt-get install gddrescue or readom, sudo apt-get install wodim, may be an option but...

I expect my own response will consists of chucking those few copies of ridiculous entertainment-industry rubbish in the garbage bin, but it seems the way around the issue generally is avoiding the bad sectors by copying at filesystem-level after all through e.g. the mentioned dvdbackup program. It as said "unpacks the ISO" but with dvdbackup -M does copy everything, and does not transcode. Pointing your player (vlc, kodi, ...) at the directory it creates will have it play back the backed-up DVD exactly as the original.

User avatar
AndyMH
Level 5
Level 5
Posts: 845
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Home NAS

Post by AndyMH » Fri Nov 02, 2018 4:13 am

things do bomb out with I/O errors on 4 out of the 6 commercial movie DVD's that I own
try makeMKV, hasn't failed me yet.
Homebrew i5-8400+GTX1080 Cinnamon 19, Thinkpad T430 i7-3632 Cinnamon 19, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

rene
Level 8
Level 8
Posts: 2324
Joined: Sun Mar 27, 2016 6:58 pm

Re: Home NAS

Post by rene » Fri Nov 02, 2018 5:27 am

MakeMKV is of completely different nature; is a transcoding solution; transforms the video on the DVD into another and further compressed format and would for example not preserve DVD menu's. Is as such not an archival solution; and does as commented above frankly in this day and age not even make a lot of sense as a convenience solution in the case of DVD: now that larger and better formats than DVD are becoming the norm anyway, might as well leave the say 7GB of a regular DVD be without compromising quality even further.

As said, dvdbackup is a well-working non-transcoding archival solution if as per above a straight device copy isn't.

User avatar
AndyMH
Level 5
Level 5
Posts: 845
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Home NAS

Post by AndyMH » Fri Nov 02, 2018 8:12 am

A synology 216se (2 bay) will set you back about £125/$160 plus the cost of the HDDs, there is a one bay synology but I can't see the point. Also don't see the point of SSDs in a NAS (data transfer speeds are going to be limited by the network), mine were the cheapest HDDs I could get (toshiba). They've been running continuously since Mar 17 (got CCTV running 24/7) with no problems.
Homebrew i5-8400+GTX1080 Cinnamon 19, Thinkpad T430 i7-3632 Cinnamon 19, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

rene
Level 8
Level 8
Posts: 2324
Joined: Sun Mar 27, 2016 6:58 pm

Re: Home NAS

Post by rene » Sun Nov 04, 2018 9:45 am

If anyone was at all interested in my above little dvdcopy Python script... not being all that interested in video I had never looked at things in detail; always assumed CSS, the Content Scrambling System as used on most commercial movie DVD's to in fact live at the level of Content. What's in a name; turns out that it's in part drive based and therefore wants e.g. libdvdcss2 to read the DVD.

Or, well, wants libdvdcss2 to "unlock" the content rather than "read": it's in fact enough to just open the DVD with that library and immediately close it again to have the simple dd work fine. I just posted version 2 of the script which does that in the Tutorial section: viewtopic.php?f=42&t=280910

I have as said only few non-music DVD's but this method of copying works fine with any DVD I have tried it with, on both Mint 18.3 and Mint 19, and over three different drives. It's being useful to me...

User avatar
AndyMH
Level 5
Level 5
Posts: 845
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Home NAS

Post by AndyMH » Sun Nov 04, 2018 11:40 am

If you want to rip DVD movies, makeMKV is the best application I've found, handbrake fails on most copy protected DVDs but makeMKV doesn't. There are a few posts on the forum on how to rip DVDs.
Homebrew i5-8400+GTX1080 Cinnamon 19, Thinkpad T430 i7-3632 Cinnamon 19, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

User avatar
BG405
Level 7
Level 7
Posts: 1557
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: Home NAS

Post by BG405 » Sun Nov 04, 2018 3:21 pm

nakednorman wrote:
Mon Oct 29, 2018 3:04 pm
I had a Seagate 2 disk NAS some while ago (think it was called Black Armour) - I used the disks for something else and jumped up & down on the box and then kicked it against a wall for a long time. It was very slow when it worked but hung frequently (on both Windows & Linux)
Sounds just like my WD NetCenter units (I had 2 of them, think one got chucked after I removed the failing HDD for data recovery); appallingly slow. :x OK for video streaming but for large data transfers & backups you have to be very patient. It currently isn't showing in the file manager but has been behaving itself recently with respect to direct addressing or remote mounting, but has frequently become completely unresponsive right from new, especially when I accessed it with Win7, requiring a hard reboot ...
Dell Inspiron 1525 - LM17.3 CE 64-------------------Acer D255E 2GB - Manjaro KDE, LM17.3 KDE 32
Toshiba NB305 - Manjaro KDE------------------------K7S5A AMD 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Dell PII 350 64MB - Puppy 4.3 & Win98-SE

rene
Level 8
Level 8
Posts: 2324
Joined: Sun Mar 27, 2016 6:58 pm

Re: Home NAS

Post by rene » Sun Nov 04, 2018 4:31 pm

My WD-NetCenter 250G died 3 weeks ago. Still boots and temporarily works after some rest, but will not stay alive on the LAN for more than 1 or 2 days :)

User avatar
BG405
Level 7
Level 7
Posts: 1557
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: Home NAS

Post by BG405 » Sun Nov 04, 2018 6:56 pm

rene wrote:
Sun Nov 04, 2018 4:31 pm
Still boots and temporarily works after some rest, but will not stay alive on the LAN for more than 1 or 2 days
I've been finding that to be the case with mine, right from the outset but, as I said, seemed to be at this severity when accessing using Win7. It usually held up for weeks with xp & seems to be much more reliable now I'm using Linux. Just checked now though & it's seemingly inaccessible, after a couple of weeks or so of inactivity. Not fulfilling its intended purpose ...
Dell Inspiron 1525 - LM17.3 CE 64-------------------Acer D255E 2GB - Manjaro KDE, LM17.3 KDE 32
Toshiba NB305 - Manjaro KDE------------------------K7S5A AMD 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Dell PII 350 64MB - Puppy 4.3 & Win98-SE

rene
Level 8
Level 8
Posts: 2324
Joined: Sun Mar 27, 2016 6:58 pm

Re: Home NAS

Post by rene » Sun Nov 04, 2018 7:26 pm

Which reminds me... until a few years ago I was in fact mostly using the NetCenter + USB printer as a network printer. OP may be interested in that as well: if you now have a USB printer, plugging it into the NAS will allow you to turn it into a network printer. Any NAS really; have never encountered one without printer support (and/but again, your router may also already be capable of this).

User avatar
MurphCID
Level 5
Level 5
Posts: 639
Joined: Fri Sep 25, 2015 10:29 pm

Re: Home NAS

Post by MurphCID » Sun Nov 04, 2018 8:22 pm

AndyMH wrote:
Sun Nov 04, 2018 11:40 am
If you want to rip DVD movies, makeMKV is the best application I've found, handbrake fails on most copy protected DVDs but makeMKV doesn't. There are a few posts on the forum on how to rip DVDs.
Thank you. I am looking to do this probably February/march (I should have enough money saved up by then.)

User avatar
MurphCID
Level 5
Level 5
Posts: 639
Joined: Fri Sep 25, 2015 10:29 pm

Re: Home NAS

Post by MurphCID » Fri Nov 23, 2018 6:30 pm

A rough guestemate on my storage needs for all my movies is 2.204gb of storage. That is a lot less than I anticipated and I could get by with a 4 bay NAS with only 2 drives (10 tb each in RAID).

rene
Level 8
Level 8
Posts: 2324
Joined: Sun Mar 27, 2016 6:58 pm

Re: Home NAS

Post by rene » Fri Nov 23, 2018 9:17 pm

Err. The quoted numbers appear somewhat uncorrelated: 2204GB = 2.2TB. I.e., you could get by with a 1-bay NAS with one 3TB drive. Or a 2-bay one with two 3TB drives in mirroring RAID. Or...

User avatar
MurphCID
Level 5
Level 5
Posts: 639
Joined: Fri Sep 25, 2015 10:29 pm

Re: Home NAS

Post by MurphCID » Sat Nov 24, 2018 6:34 pm

rene wrote:
Fri Nov 23, 2018 9:17 pm
Err. The quoted numbers appear somewhat uncorrelated: 2204GB = 2.2TB. I.e., you could get by with a 1-bay NAS with one 3TB drive. Or a 2-bay one with two 3TB drives in mirroring RAID. Or...
Ooops sorry, I meant 2.204 TB based on 4.77 gb per DVD, and 25 gb per blu-ray. A buddy suggested that the real numbers were more like 8gb per dvd, and 50gb per blu-ray.

rene
Level 8
Level 8
Posts: 2324
Joined: Sun Mar 27, 2016 6:58 pm

Re: Home NAS

Post by rene » Sat Nov 24, 2018 7:00 pm

I already mentioned those numbers in the above. A standard commercial movie DVD is dual-layer and capable of holding up to 8.5G, typically does less than 7G, meaning 1.4T for 200 of them. An also dual-layer Blu-ray disc can hold 50G and will generally hold a lot less; I have no commercial movie BD's around to check but 25G per BD would to me sound about as good a guess as any.

Note the dvdcopy script I posted: grab a what appears to be a representative, small sampling of DVDs and BDs, insert them in your drive and run dvdcopy -i to have their size reported to you.

User avatar
MurphCID
Level 5
Level 5
Posts: 639
Joined: Fri Sep 25, 2015 10:29 pm

Re: Home NAS

Post by MurphCID » Sat Nov 24, 2018 10:05 pm

Thank you.

User avatar
MurphCID
Level 5
Level 5
Posts: 639
Joined: Fri Sep 25, 2015 10:29 pm

Re: Home NAS

Post by MurphCID » Sun Nov 25, 2018 2:32 pm

I saw that some NAS units have space for one or more M.2 drives, or SSDs, what is the purpose of those units? Also most seem to come with 2 gb of RAM, does that need to be increased?

User avatar
AndyMH
Level 5
Level 5
Posts: 845
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Home NAS

Post by AndyMH » Sun Nov 25, 2018 3:18 pm

Mine doesn't (synology 216j) and I can't see the point. I imagine if you fit an M2 or SSD the OS will somehow end up on them. Mine has only 512MB RAM and a 32bit CPU running at 1GHz. Given that it talks to the outside world through its ethernet port doesn't need much RAM or speed.
Homebrew i5-8400+GTX1080 Cinnamon 19, Thinkpad T430 i7-3632 Cinnamon 19, Thinkpad T420 Cinnamon 18.3, Thinkpad T410 Cinnamon 17.3, Thinkpad T60 19.0 Mate

Post Reply

Return to “Other topics”