bROTHER
Regular Contributor
Now seems straightforward, but I tried many, many ways to finally get here.
Well, you just bought a 4TB disk which as you may know is the max size the router can handle (https://event.asus.com/2009/networks/disksupport/).
You do want to use the bigger partition you may get to simply use.
You want ext4 and journaling to get max performance.
You use a friendly enclosure for the router (WD Passport Elements).
The main problem is that if you partition the disk outside the router (Mini Tool, Linux live CD, etc) you'll probably end with file system extensions the router would not understand and would refuse to use. The error you get in syslog is something like "unsupported optional features".
To be on the safe & easy side you need to do the formatting inside the router.
But fdisk does not understands GPT so this seems to be a no way out road.
This is not a step by step guide. These are some of my notes from that days I was struggling with this. Command outputs may appear incoherent among them because of many changes I made. Just read to the end and then make your own plan of action.
What you need: Your new BIG disk, your Merlin-powered router (AC68U here), a flash drive, patience.
What you should at least have heard of: Entware environment, Swaping, basics from partitioning and formatting, devices in Linux. You'll find plenty of info in this forum about these subjects. Also, you may have clear at this point the right choices for you (FS type, Swap type, Use intended, etc.)
Let's go!
Entware does have a fdisk cousin that handles GPT: gdisk
So:
1. Ready first your flash drive with two partitions, one for Entware and one for swap . Or use a swap file, whichever you prefer. Feel free to search around on how to set and use swap.
2. Install Entware. I you use Optware you need to uninstall it or eject the drive hosting it first.
3. Install gdisk from Entware repo. This will install to a mounted disk (the flash drive). It will create scripts that run every time you re-mount that disk. That's why you cannot have Entware and Optware at the same time.
4. Connect your BIG new disk and partition it with gdisk. You may need to check in the syslog the path assigned (/dev/sd?)
4.1. First partition. I leave here a 1 GB for a future swap. "L" shows the available FS types (not shown here). "8200" is the code for swap partition.
4.2. Check what you have done
4.3. Second partition. Data for Torrents.
4.4. Check what you have done
4.5. Rename partitions & check again
4.6. Check for problems. Here I got several issues due to my multiple attempts to format this device before. I solved all of them
4.7. Don't be afraid of messing here. You can always start over. After several options fiddling with the expert menu I got a clean partition table. Then write changes to disk:
Limitation of 10000 chars --> Go on with next post reply.
Well, you just bought a 4TB disk which as you may know is the max size the router can handle (https://event.asus.com/2009/networks/disksupport/).
You do want to use the bigger partition you may get to simply use.
You want ext4 and journaling to get max performance.
You use a friendly enclosure for the router (WD Passport Elements).
The main problem is that if you partition the disk outside the router (Mini Tool, Linux live CD, etc) you'll probably end with file system extensions the router would not understand and would refuse to use. The error you get in syslog is something like "unsupported optional features".
To be on the safe & easy side you need to do the formatting inside the router.
But fdisk does not understands GPT so this seems to be a no way out road.
This is not a step by step guide. These are some of my notes from that days I was struggling with this. Command outputs may appear incoherent among them because of many changes I made. Just read to the end and then make your own plan of action.
What you need: Your new BIG disk, your Merlin-powered router (AC68U here), a flash drive, patience.
What you should at least have heard of: Entware environment, Swaping, basics from partitioning and formatting, devices in Linux. You'll find plenty of info in this forum about these subjects. Also, you may have clear at this point the right choices for you (FS type, Swap type, Use intended, etc.)
Let's go!
Entware does have a fdisk cousin that handles GPT: gdisk
So:
1. Ready first your flash drive with two partitions, one for Entware and one for swap . Or use a swap file, whichever you prefer. Feel free to search around on how to set and use swap.
2. Install Entware. I you use Optware you need to uninstall it or eject the drive hosting it first.
Code:
admin@AC68U-Torrent:/tmp/home/root# entware-setup.sh
Info: This script will guide you through the Entware installation.
Info: Script modifies "entware" folder only on the chosen drive,
Info: no other data will be changed. Existing installation will be
Info: replaced with this one. Also some start scripts will be installed,
Info: the old ones will be saved on Entware partition with name
Info: like /tmp/mnt/sda1/jffs_scripts_backup.tgz
…
Code:
admin@AC68U-Torrent:/tmp/home/root# opkg install gdisk
Installing gdisk (1.0.4-1) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/gdisk_1.0.4-1_armv7-2.6.ipk
Installing libuuid (2.32.1-1) to root...
Downloading http://bin.entware.net/armv7sf-k2.6/libuuid_2.32.1-1_armv7-2.6.ipk
Configuring libuuid.
Configuring gdisk.
Code:
admin@AC68U-Torrent:/tmp/home/root# gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.4
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): ?
b back up GPT data to a file
c change a partition's name
d delete a partition
i show detailed information on a partition
l list known partition types
n add a new partition
o create a new empty GUID partition table (GPT)
p print the partition table
q quit without saving changes
r recovery and transformation options (experts only)
s sort partitions
t change a partition's type code
v verify disk
w write table to disk and exit
x extra functionality (experts only)
? print this menu
Command (? for help): p
Disk /dev/sdb: 7813969920 sectors, 3.6 TiB
Model: Elements 25A1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 49C52300-56CF-03A9-C048-71D2B355EA00
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 7813969886
Partitions will be aligned on 2048-sector boundaries
Total free space is 7813969853 sectors (3.6 TiB)
Number Start (sector) End (sector) Size Code Name
Code:
Command (? for help): n
Partition number (1-128, default 1):
First sector (34-7813969886, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-7813969886, default = 7813969886) or {+-}size{KMGTP}: +1G
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 8200
Changed type of partition to 'Linux swap'
Code:
Command (? for help): p
Disk /dev/sdb: 7813969920 sectors, 3.6 TiB
Model: Elements 25A1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 49C52300-56CF-03A9-C048-71D2B355EA00
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 7813969886
Partitions will be aligned on 2048-sector boundaries
Total free space is 7811872701 sectors (3.6 TiB)
Number Start (sector) End (sector) Size Code Name
1 2048 2099199 1024.0 MiB 8200 Linux swap
Code:
Command (? for help): n
Partition number (2-128, default 2):
First sector (34-7813969886, default = 2099200) or {+-}size{KMGTP}:
Last sector (2099200-7813969886, default = 7813969886) or {+-}size{KMGTP}:
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'
Code:
Command (? for help): p
Disk /dev/sdb: 7813969920 sectors, 3.6 TiB
Model: Elements 25A1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 49C52300-56CF-03A9-C048-71D2B355EA00
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 7813969886
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 2099199 1024.0 MiB 8200 Linux swap
2 2099200 7813969886 3.6 TiB 8300 Linux filesystem
Code:
Command (? for help): c
Partition number (1-2): 1
Enter name: SWAP
Command (? for help): c
Partition number (1-2): 2
Enter name: Data
Command (? for help): p
Disk /dev/sdb: 7813969920 sectors, 3.6 TiB
Model: Elements 25A1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): 49C52300-56CF-03A9-C048-71D2B355EA00
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 7813969886
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 2099199 1024.0 MiB 8200 SWAP
2 2099200 7813969886 3.6 TiB 8300 Data
Code:
Command (? for help): v
Problem: The secondary header's self-pointer indicates that it doesn't reside
at the end of the disk. If you've added a disk to a RAID array, use the 'e'
option on the experts' menu to adjust the secondary header's and partition
table's locations.
Problem: main GPT header's current LBA pointer (1) doesn't
match the backup GPT header's alternate LBA pointer(7813969919).
Problem: main GPT header's backup LBA pointer (7813969919) doesn't
match the backup GPT header's current LBA pointer (1).
The 'e' option on the experts' menu may fix this problem.
Problem: The backup partition table overlaps the backup header.
Using 'e' on the experts' menu may fix this problem.
Identified 4 problems!
Code:
Recovery/transformation command (? for help): v
No problems found. 2014 free sectors (1007.0 KiB) available in 1
segments, the largest of which is 2014 (1007.0 KiB) in size.
Recovery/transformation command (? for help): x
Expert command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /de
v/sdb.
The operation has completed successfully.
Limitation of 10000 chars --> Go on with next post reply.
Last edited: