3.md 4.2 KB

["外置儲存裝置"]

外置儲存裝置

ArOZ Online系統社群版本預設支援兩個外置儲存裝置, 而支援上限則為作業系統可容許之上限。 他們的位置分別位於系統內的

/media/storage1/media/storage2

系統只支援 NTFS 格式的 USB 儲存媒介如 USB隨身碟及便攜式硬碟等。你亦可以使用SATA 轉 USB 轉接器把 2.5寸 或 3.5寸硬盤連接到裝置上, 但是請注意此做法有可能會因供電不足而造成系統不穩。 除非使用附有外接供電的 SATA 轉 USB 轉接器或使用附帶外接供電功能的 USB 分線器,否則我們只建議在 Raspberry Pi 上使用 USB 隨身碟或便攜式固態硬硬作為外接儲存裝置。

全新隨身碟格式化

如果你的隨身碟是新買的,我們建議你先進行一次完整 NTFS 格式化。因為大部份全新的隨身碟出廠時都會使用 exFAT 或 FAT32 格式。然而,ArOZ Online系統的自動掛載功能並不支援非 NTFS 格式。

你可以使用 Windows 內置的格式化工具對隨身碟如下圖設定進行格式化。

image

請注意:此功能會清除所有資料,如果你購買的隨身碟附有加密分區、曾用作安裝系統映像(Bootable USB Drive) 或二手隨身碟,這裡請不要選擇快速格式化。

使用外置硬碟作啟動碟

有一些用家會選擇使用外接硬碟作啟動而非內置的 Micro SD 卡。由於系統盤將會使用 /dev/sda* 作為掛載點,你將會需要改動 /etc/fstab 以更改外接儲存裝置的掛載點。請在 /etc/fstab 內找到並更改以下兩行:

/dev/sda1 /media/storage1 ntfs defaults,nofail,noatime,x-systemd.device-timeout=1 0 0
/dev/sdb1 /media/storage2 ntfs defaults,nofail,noatime,x-systemd.device-timeout=1 0 0

至以下兩行:

/dev/sdb1 /media/storage1 ntfs defaults,nofail,noatime,x-systemd.device-timeout=1 0 0
/dev/sdc1 /media/storage2 ntfs defaults,nofail,noatime,x-systemd.device-timeout=1 0 0

增加儲存裝置支援

在一般情況之下你不會用到兩個以上的儲存裝置,但是若需要的話可以透過 ssh 後台連進 Raspberry Pi 並使用以下指令增加掛載點。以下為新增第三個掛載點的指令:

再一個例子,新增第四個掛載點的指令:
```mkdir /media/storage4```
如此類推。

注意,手動新增的掛載點並不會在系統啟動時自動掛載,你需要按照自己的需要改動 <code> /etc/fstab </code> 詳情請見 [這裡](https://wiki.debian.org/fstab) 。

## Unmount USB for Windows / Linux
ArOZ Online System uses Um-file Naming Method for the file system bridge in order to support unicode on non-unicode host machines. Hence, if you need to unmount the external storage devices from the ArOZ Online System and mount it to Windows devices, you can use the build in fsconv tool to convert all the filenames inside the external storage devices into human readable format. 
Here is an example showing how to convert all files, directories and sub-directories in storage1 (by default /dev/sda1) into UTF-8 filename. 

#Assume ArOZ Online System Root is located at /var/www/html/AOB/ cd /media/storage1 /var/www/html/AOB/SystemAOB/functions/file_system/fsconv

If you need to mount the USB storage device from Windows back into ArOZ Online System, you can also do the same things with the following command. Assume the F:\ is the USB drive mount point on your Windows device.
1. Download and move the fsconv into F:\
2. Open CMD in F:\
3. Enter the following command

fsconv.exe -r -um ```

ArUSB2Win

ArUSB2Win is an offical program designed to perform encoding and decoding of ArOZ Online System filenames for Windows with graphical user interface. The image below is a simple preview of the program. image To perform the conversion process above, simply select the mount point of the USB drive and press encode (convert Windows filenames to ArOZ Umfilename) or decode (Convert ArOZ Umfilename to Windows filename)

Download ArUSBWin

Click here