[QUESTION] Custom partitioning

Interested in our products? Post your questions here. Let us answer before you buy.
User avatar
McMagnus
Getting the hang of things
Posts: 86
Joined: Fri Jan 25, 2008 9:06 pm

[QUESTION] Custom partitioning

Post by McMagnus »

Hi

I'm in the market for a NAS and the TS-209 is starting to look like a winner.

However, I'm wondering if it's possible to partition the drives into a mix of RAID1 and JBOD. I don't think I have the need to mirror the whole 1TB into another 1TB drive, but perhaps half of that. So if I could partition the two 1TB drives into 2 partitions each, like D1part0, D1part1, D2part0 and D2part1, and then mirror the part0 of each drive in a RAID1 config and use part1 of each drive in a JBOD (or RAID0) config, that would be quite optimal.

Is something like this possible? From what I understand from the manual it's *not* possible using the standard UI, but can it be done with some manual hands-on setup?

/Magnus
TS-209 3.1.0, TS-219 Debian HDDs: 2x 1TB WD GP, 2x 2TB WD External: Seagate 3TB USB2 LAN: 1GBit
User avatar
QNAPIvan
Experience counts
Posts: 1020
Joined: Mon Jul 02, 2007 4:03 pm

Re: [QUESTION] Custom partitioning

Post by QNAPIvan »

Dear TMagnus
The TS-209 cannot support that. It will use two conplete hard drive for the RAID 1.

Cheers,
________________________________________
Product Marketing Director
USA Online Support: http://www.qnap.com/i/useng/before_buy/ ... wone&cid=2
Support email: q_supportus@qnap.com
USA Technical Support: +1 909 595 2782
dJeyL
Starting out
Posts: 27
Joined: Fri Jan 25, 2008 7:27 pm
Location: Paris, France
Contact:

Re: [QUESTION] Custom partitioning

Post by dJeyL »

Hi,

I'm coming from here, where I asked the very same question.

Is there absolutely no way to do this, manually? I understand the standard web interface doesn't allow it, but couldn't we cheat? Edit /etc/config/raidtab manually, build the RAID volumes by ourselves, and let the standard daemons behave with the first volume as if it was the only one?

I don't think it would be really difficult to make your firmwares support such configurations, can't it be a feature your engineers could try to add in future firmwares?

Thanks!
TS-209 Pro, fw 1.1.5[list][*]# 2 x WD10EACS (Western Digital, 1TB)[/*][*]# 2 RAID arrays[/*][*]# NTFS write support[/*][*]# Upcoming: dm_crypt and TrueCrypt encryption[/*][/list]
User avatar
AndyChuo
Experience counts
Posts: 2388
Joined: Thu Sep 13, 2007 11:56 am
Location: Taipei, Taiwan

Re: [QUESTION] Custom partitioning

Post by AndyChuo »

Hi dJeyL,

I think you might be able to do that but you really need to do a bit more research on how
it really works and yes we don't support this feature but we can take it into our considerations
in the future.

Andy
=============================================================>>>
TS-659-Pro [RAID6] rtorrent+SABnzbdplus+SickBeard+Couchpotato [Best PVR] Plex+PMS [Ultimate Streamer]
Apple iPad [Best Tablet] HTC One M8 [Mobile Phone] Samsung UA46ES6100 [My Screen] KRK Rokit 6 [Audio Speakers]
Chrome Cast [Screen Casting] Philips Hue [Personal Lighing]
Buffalo WZR-1750DHP [My Wifi Hub] D-Link DGS-1005D [Gbit Network]
=============================================================>>>
dJeyL
Starting out
Posts: 27
Joined: Fri Jan 25, 2008 7:27 pm
Location: Paris, France
Contact:

Re: [QUESTION] Custom partitioning

Post by dJeyL »

Hi,

Thanks for your answer.
QNAPAndy wrote:I think you might be able to do that but you really need to do a bit more research on how
it really works
What do you mean? Dealing with the 4 RAID1 volumes created on the NAS by the system? I think it could be done by removing the last (big, main, storage) partition on each disk (after removing the RAID1 volume they're used by), and recreating two smaller ones and their RAID1 + RAID0 volumes.
QNAPAndy wrote:and yes we don't support this feature but we can take it into our considerations
in the future.
Great :)

Anyway it looks like users will be able to do whatever they want when Debian gets available.
TS-209 Pro, fw 1.1.5[list][*]# 2 x WD10EACS (Western Digital, 1TB)[/*][*]# 2 RAID arrays[/*][*]# NTFS write support[/*][*]# Upcoming: dm_crypt and TrueCrypt encryption[/*][/list]
User avatar
AndyChuo
Experience counts
Posts: 2388
Joined: Thu Sep 13, 2007 11:56 am
Location: Taipei, Taiwan

Re: [QUESTION] Custom partitioning

Post by AndyChuo »

Yes and expect a beta sneak preview in early Feb. 8)
=============================================================>>>
TS-659-Pro [RAID6] rtorrent+SABnzbdplus+SickBeard+Couchpotato [Best PVR] Plex+PMS [Ultimate Streamer]
Apple iPad [Best Tablet] HTC One M8 [Mobile Phone] Samsung UA46ES6100 [My Screen] KRK Rokit 6 [Audio Speakers]
Chrome Cast [Screen Casting] Philips Hue [Personal Lighing]
Buffalo WZR-1750DHP [My Wifi Hub] D-Link DGS-1005D [Gbit Network]
=============================================================>>>
dJeyL
Starting out
Posts: 27
Joined: Fri Jan 25, 2008 7:27 pm
Location: Paris, France
Contact:

Re: [QUESTION] Custom partitioning

Post by dJeyL »

Just so you know: I've just received my TS-209Pro and my 2 WD10EACS 1TB hard drives, and I've successfully hacked the NAS RAID config so that I can have one RAID1 and one RAID0 arrays :)

Code: Select all

[~] # df -h /dev/md0 /dev/md1
Filesystem                Size      Used Available Use% Mounted on
/dev/md0                196.8G     42.6M    186.8G   0% /share/MD0_DATA
/dev/md1                  1.4T      3.8G      1.3T   0% /share/MD1_DATA

Code: Select all

[~] # cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [multipath] [raid6] [raid10]
md1 : active raid0 sda6[0] sdb6[1]
      1531781376 blocks 64k chunks

md5 : active raid1 sdb2[1] sda2[0]
      530048 blocks [2/2] [UU]

md13 : active raid1 sda4[0] sdb4[1]
      80256 blocks [2/2] [UU]

md9 : active raid1 sda1[0] sdb1[1]
      530048 blocks [2/2] [UU]

md0 : active raid1 sda5[0] sdb5[1]
      209720384 blocks [2/2] [UU]

unused devices: <none>

Code: Select all

[~] # mdadm --detail /dev/md0
/dev/md0:
        Version : 00.90.01
  Creation Time : Thu Feb 14 14:18:29 2008
     Raid Level : raid1
     Array Size : 209720384 (200.00 GiB 214.75 GB)
    Device Size : 209720384 (200.00 GiB 214.75 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Thu Feb 14 16:55:10 2008
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 4e5bca78:5073415a:21ee4201:8c11f4ae
         Events : 0.123

    Number   Major   Minor   RaidDevice State
       0       8        5        0      active sync   /dev/sda3
       1       8       21        1      active sync   /dev/sdb3

Code: Select all

[~] # mdadm --detail /dev/md1
/dev/md1:
        Version : 00.90.01
  Creation Time : Thu Feb 14 15:01:04 2008
     Raid Level : raid0
     Array Size : 1531781376 (1460.82 GiB 1568.54 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Thu Feb 14 15:01:04 2008
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

     Chunk Size : 64K

           UUID : b0c86924:94667e7c:8a470ea1:993835f7
         Events : 0.1

    Number   Major   Minor   RaidDevice State
       0       8        6        0      active sync   /dev/sda6
       1       8       22        1      active sync   /dev/sdb6
I had to repartition my drives (sda3 and sdb3 becoming extended partitions, each containing 2 partitions, one of 200GB for RAID1, and the remaining space, ~1.4TB, for RAID0), cheat a bit with /dev entries, manually create my RAID volumes and format them, update raidtab and mdadm.conf, mount my volumes manually through autorun.sh in /dev/mtdblock5's filesystem, et voilà, it works :)
TS-209 Pro, fw 1.1.5[list][*]# 2 x WD10EACS (Western Digital, 1TB)[/*][*]# 2 RAID arrays[/*][*]# NTFS write support[/*][*]# Upcoming: dm_crypt and TrueCrypt encryption[/*][/list]
User avatar
McMagnus
Getting the hang of things
Posts: 86
Joined: Fri Jan 25, 2008 9:06 pm

Re: [QUESTION] Custom partitioning

Post by McMagnus »

Rats! :?

I'm gonna have to try that now, before it's impossible to fit all my data on the NAS at their original places.

Would you mind posting some other info as well, raidtab, the /dev entries cheats and RAID creation?

Sounds really cool, exactly what I want! :mrgreen:

BTW, what does the RAID info page say in the web UI? And is the RAID0 much faster than the RAID1 part?
TS-209 3.1.0, TS-219 Debian HDDs: 2x 1TB WD GP, 2x 2TB WD External: Seagate 3TB USB2 LAN: 1GBit
dJeyL
Starting out
Posts: 27
Joined: Fri Jan 25, 2008 7:27 pm
Location: Paris, France
Contact:

Re: [QUESTION] Custom partitioning

Post by dJeyL »

Code: Select all

[~] # hdparm -t /dev/sda /dev/sdb /dev/md0 /dev/md1

/dev/sda:
 Timing buffered disk reads:  150 MB in  3.05 seconds =  49.18 MB/sec

/dev/sdb:
 Timing buffered disk reads:  154 MB in  3.00 seconds =  51.33 MB/sec

/dev/md0:
 Timing buffered disk reads:   64 MB in  3.04 seconds =  21.05 MB/sec

/dev/md1:
 Timing buffered disk reads:  132 MB in  3.00 seconds =  44.00 MB/sec
(md0: RAID1, md1: RAID0)

I'll post the details soon ;)
TS-209 Pro, fw 1.1.5[list][*]# 2 x WD10EACS (Western Digital, 1TB)[/*][*]# 2 RAID arrays[/*][*]# NTFS write support[/*][*]# Upcoming: dm_crypt and TrueCrypt encryption[/*][/list]
dJeyL
Starting out
Posts: 27
Joined: Fri Jan 25, 2008 7:27 pm
Location: Paris, France
Contact:

Re: [QUESTION] Custom partitioning

Post by dJeyL »

Oh, and about the web admin, it's a bit lost, see:

Image

And when I want to create a share, I can choose between my two volumes, but if I choose the non-default one, the share is created in a weird directory, that's why I've preferred to bind (mount -o bind) my RAID0 tree into my RAID0 mount point, and type my shares' paths manually.

Image
TS-209 Pro, fw 1.1.5[list][*]# 2 x WD10EACS (Western Digital, 1TB)[/*][*]# 2 RAID arrays[/*][*]# NTFS write support[/*][*]# Upcoming: dm_crypt and TrueCrypt encryption[/*][/list]
symphys
Know my way around
Posts: 105
Joined: Fri Feb 15, 2008 8:41 am

Re: [QUESTION] Custom partitioning

Post by symphys »

Hey dJeyL!

As you seem quite the guy could you please post a detailed How-To on this!
I'm only familiar with BSD and that isn't much help...

Thanks very much!
QNAP TS-209 Pro, RAID1 with Samsung 2Tb HDDs
Firmware features used: FTP, Samba, SSH, Twonky UPnP MediaServer
UPnP Clients: Philips Cineos Flat TV 42PFL9703D, Dell XPS M1710 Windows 7 Ultimate, PlugPlayer with backgrounder on iPhone
Optware features: OpenVPN, Subversion
User avatar
McMagnus
Getting the hang of things
Posts: 86
Joined: Fri Jan 25, 2008 9:06 pm

Re: [QUESTION] Custom partitioning

Post by McMagnus »

Thanks dJeyL for showing it's possible. I include some additional info below about how I did, but make d--- sure you have a backup of all your data before trying it. Just the first step *will* remove every byte on the big data partition. I'm also sure it's very possible to wreck your NAS completely if you don't know what you're doing.

Anyway, I followed your advice and removed the big partition before creating an extended in its place, with two logical partitions inside. Fdisk didn't make any /dev nodes, so as you wrote, I had to make them for myself. I used commands such as:

mknod /dev/sda5 b 8 5

to create sda5, sda6, sdb5 and sdb6.

Then I created two raid arrays using:

Code: Select all

mdadm -v --create /dev/md0 --level=1 --raid-devices=2 /dev/sda5 /dev/sdb5
mdadm -v --create /dev/md1 --level=0 --raid-devices=2 /dev/sda6 /dev/sdb6
My /etc/mdadm.conf looks like:

Code: Select all

ARRAY /dev/md0 devices=/dev/sda5,/dev/sdb5
ARRAY /dev/md1 devices=/dev/sda6,/dev/sdb6
And my /etc/raidtab:

Code: Select all

raiddev /dev/md0
        raid-level      1
        nr-raid-disks   2
        nr-spare-disks  0
        chunk-size      4
        persistent-superblock   1
        device  /dev/sda5
        raid-disk       0
        device  /dev/sdb5
        raid-disk       1

raiddev /dev/md1
        raid-level      0
        nr-raid-disks   2
        nr-spare-disks  0
        chunk-size      4
        persistent-superblock   1
        device  /dev/sda6
        raid-disk       0
        device  /dev/sdb6
        raid-disk       1
But I'm actually not sure either of them are required. It looks better though.

Then I could format the raid partitions with commands such as:

mke2fs -j -O sparse_super /dev/md0

But I should probably have added something like "-m 1", otherwise 5% will be reserved for the super-user and that's a bit much on such large partitions.

Now, my SATA Disk page looks great:

Code: Select all

Striping Disk Volume:  Drive 1 2 	928.54 GB 	881.33 GB 	Ready
Mirroring Disk Volume: Drive 1 2 	451.30 GB 	428.33 GB 	Ready [Resync 76%]
As you see, the resyncing hasn't finished yet. But when it's done, I'll try how it behaves during drive removal/insertion.
TS-209 3.1.0, TS-219 Debian HDDs: 2x 1TB WD GP, 2x 2TB WD External: Seagate 3TB USB2 LAN: 1GBit
dJeyL
Starting out
Posts: 27
Joined: Fri Jan 25, 2008 7:27 pm
Location: Paris, France
Contact:

Re: [QUESTION] Custom partitioning

Post by dJeyL »

Great! Glad to see it also worked for you :)

About the reserved blocks, you can change their amount with tune2fs -m 1 ;)
TS-209 Pro, fw 1.1.5[list][*]# 2 x WD10EACS (Western Digital, 1TB)[/*][*]# 2 RAID arrays[/*][*]# NTFS write support[/*][*]# Upcoming: dm_crypt and TrueCrypt encryption[/*][/list]
User avatar
McMagnus
Getting the hang of things
Posts: 86
Joined: Fri Jan 25, 2008 9:06 pm

Re: [QUESTION] Custom partitioning

Post by McMagnus »

dJeyL wrote:About the reserved blocks, you can change their amount with tune2fs -m 1 ;)
Great, that'll save me an hour or two. Thanks!
TS-209 3.1.0, TS-219 Debian HDDs: 2x 1TB WD GP, 2x 2TB WD External: Seagate 3TB USB2 LAN: 1GBit
User avatar
McMagnus
Getting the hang of things
Posts: 86
Joined: Fri Jan 25, 2008 9:06 pm

Re: [QUESTION] Custom partitioning

Post by McMagnus »

Hmm, after rebooting, the /dev/sd* nodes of the extended partition are gone again. How did you make them stick?
TS-209 3.1.0, TS-219 Debian HDDs: 2x 1TB WD GP, 2x 2TB WD External: Seagate 3TB USB2 LAN: 1GBit
Post Reply

Return to “Presales”