Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| docs:user-guide:storage:storage:usb-drives-quickstart [2018/02/17 16:45] – ↷ Page moved from docs:user-guide:storage:usb-drives-quickstart to docs:user-guide:storage:storage:usb-drives-quickstart bobafetthotmail | docs:guide-user:storage:usb-drives-quickstart [2024/11/21 18:29] (current) – Link to samba and ksmbd docs palebloodsky | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | =====Quick Start for Adding a USB drive===== | + | ====== Quick Start for Adding a USB drive ====== |
| - | Many useful LEDE utilities and packages rely on external storage to hold data files. | + | This page describes how to add a USB drive to your OpenWrt |
| - | This guide describes how to add a single | + | |
| - | **Requirements:** | + | ===== Requirements |
| - | * Your LEDE device | + | * USB drive (HDD, SSD, Flash, etc.) of any capacity. |
| - | * This procedure will work for the //first// USB device installed in the router. To add more drives, see the [[docs/ | + | * OpenWrt |
| - | * This procedure **WILL ERASE THE USB DRIVE**. Copy any data you care about to another destination. | + | * Computer on the same network |
| - | * This quickstart requires you to [[docs: | + | * This procedure |
| - | **Procedure:** | + | ===== Procedure |
| - | - Connect the USB stick/disk to the router. | + | USB drives can be installed using either LuCI or the command |
| - | - [[docs: | + | |
| - | - Enter the following commands by copying and pasting //each separate | + | |
| - | # Copy/paste each line below, then press Return | + | ==== LuCI ==== |
| - | opkg update && opkg install block-mount e2fsprogs kmod-fs-ext4 kmod-usb3 kmod-usb2 kmod-usb-storage | + | |
| - | mkfs.ext4 /dev/sda1 | + | |
| - | block detect > / | + | |
| - | uci set fstab.@mount[0].enabled=' | + | |
| - | service fstab start && service fstab enable | + | |
| - | The drive will be mounted at **/ | + | 1. On the Software page, click update, then install |
| - | If you want more information | + | '' |
| - | or you want to add or configure | + | |
| - | see the [[docs/user-guide/usb-drives | full USB Drive tutorial ]]. | + | 2. Plug in your USB drive, it will be detected automatically as **/ |
| + | |||
| + | 3. Go to the **System -> Mount Points** page, click on the drive to mount, click Save & Apply. | ||
| + | |||
| + | 4. Go to the **Services -> HDD Idle** page, enable to idle the drive to save power and lifespan, click Save & Apply. | ||
| + | |||
| + | Done! The drive is ready to read/write data. | ||
| + | |||
| + | |||
| + | ==== Command Line ==== | ||
| + | |||
| + | 1. Use a computer to format your USB drive using the default options. This prepares the drive for the process below, which will erase those settings. //Warning: This initial formatting will erase the entire USB drive.// | ||
| + | |||
| + | 2. SSH into your device to enter the following steps. ++More...| The [[docs: | ||
| + | |||
| + | 3. Install the required packages. Below uses ext4 filesystem, | ||
| + | < | ||
| + | |||
| + | 4. Enter '' | ||
| + | |||
| + | 5. Plug the USB drive into your router. Enter '' | ||
| + | |||
| + | < | ||
| + | root@OpenWrt: | ||
| + | brw------- | ||
| + | brw------- | ||
| + | </ | ||
| + | |||
| + | 6. Make an ext4 filesystem on the USB device using the device name you just discovered. **Note**: Be certain you enter the proper device name - this step will completely erase the device. ++More...|This command creates an ext4 file system on the first partition of the first USB device - / | ||
| + | < | ||
| + | |||
| + | 7. Create the fstab config file based on all the block devices found. ++More...|This command writes the current state of all block devices, including USB drives, into the '' | ||
| + | < | ||
| + | |||
| + | 8. Update the fstab config file to mount all drives at startup. ++More...|**/ | ||
| + | < | ||
| + | |||
| + | 9. Mount the device. ++More...|Automount is enabled on boot.++ | ||
| + | < | ||
| + | |||
| + | Done! The drive is ready to read/write data. | ||
| + | |||
| + | ==== Network Shares ==== | ||
| + | To share the drives (or even specific folders) on your network see [[:docs:guide-user: | ||
| + | |||
| + | ===== More Details ===== | ||
| + | * For NTFS filesystem refer to [[docs:guide-user: | ||
| + | * The full [[docs: | ||
| + | * Look at the [[docs/ | ||
| + | * To temporarily mount the drive (say, for testing), you can enter: '' | ||