手册 › LynxDrive

1 Data Location and External Disks

Files ultimately land on the device, and external disks extend capacity when needed. This chapter covers where data lives, how an external disk takes over, what unplugging does, and the rules to follow during migration.

Where Data Lives

All files sit under the device's data root directory, defaulting to /home/lynx/lynxdrive. The directory tree in the interface is the real structure on the device; uploads and downloads stay on the intranet with no third-party relay.

Attaching an External Disk

When capacity runs short, attach an external disk. The system watches mount status; once it recognizes one (default mount point /mnt/usb/sda1), it first migrates existing content from the root onto the disk, then points the root at it. The whole process runs in the background: paths stay the same, bookmarks remain valid, and colleagues keep working without re-login. Progress is logged — operators can check with lynxdrive-ctl logs.

Unplugging and Automatic Fallback

When the disk is pulled, the system switches the root back to internal storage and drops a notice file 外置硬盘已断开,使用内部存储.txt in the root. Seeing it means internal storage is active and the disk's contents are temporarily invisible; reinsert the disk and the pointer recovers automatically. The file exists for state detection — don't delete it manually.

Three Rules During Migration

First, no power cuts during migration — an interrupted large migration can leave files incomplete. Second, no bulk writes during migration — writes and migration fight for bandwidth and both slow down. Third, stop writes before unplugging — confirm no upload is in progress on the page, then detach. Underpowered enclosures are a common cause of "files occasionally won't open"; prefer independently powered enclosures or reliable USB ports.