On my NAS QNAP TS 509 I do have a technical issue. I need to run e2fsck. This works fine for me on md0 (see below), but how can I unmount the busy devices md9 and sda4 in order to do the same. Whenever I try, I fail because the device is busy. [This part is solved, see below]
In order to further track down the issue, I'd need to sort out the physical disk to device relationship. How can I find out this, e.g. md0 is a stripped volume on 2 disk (but I need to find out on what physical disk).
Remark: As you can easily derive from my questions, I am not a Linux expert, but manage to get along.
/dev/ram0 124.0M 94.1M 29.8M 76% /
tmpfs 32.0M 80.0k 31.9M 0% /tmp
/dev/sda4 310.0M 103.9M 206.1M 34% /mnt/ext
/dev/md9 509.5M 39.2M 470.2M 8% /mnt/HDA_ROOT
/dev/md0 1.8T 1.4T 444.7G 76% /share/MD0_DATA
tmpfs 32.0M 0 32.0M 0% /.eaccelerator.tmp
— Added —
QNAP seems to be based on busybox
. I do not find something like init / telinit / runlevel
. At busybox docs it says that I need to run the commands below. But in /var/service
sv
is not available. Approach: I want to go to single user mode to unmount the devices.
# cd /var/service
# sv d *
# sv u getty*
— Added, thanks A4L —
- This QNAP Box runs a special flavor of Linux, so not all SOPs do apply. In my particular case I found a
services.sh
script, stopping all services. After that the drive could be unmounted. - The information passed by A4L is valid and worth reading it, maybe I'll profit from it next time. Links: https://unix.stackexchange.com/questions/19918/umount-device-is-busy and https://unix.stackexchange.com/questions/15024/umount-device-is-busy-why
- So the unmount issue is solved, still looking for the best option to find the physical to volume mapping.
Best Answer
Having a qnap device myself (TS-509Pro) i can tell you the reason why you were unable to unmount the devices etc, below are the reasons.
/dev/md9
This Partition is a RAID1 (Mirrored) array which qnap uses to store the firmware on its flash Drive (This is arranged as a mirrored raid for redundancy). When Firmware is downloaded and renewed this is updated onto both "drives" to enable greater security. (The device used for initial boot is actually a derivative of flash memory which is divided into two separate devices on one chip, which QNAP calls a "DOM", which I think means Disk on Memory.
/dev/sda4
This is where things are a little complex. This is the actual DOM chip mentioned above. The QNAP people have configured things so that although the operating system (In this case linux of course) has to see the "/dev/md9" array, they don't want people to actually see "/dev/sda4". It is possible to gain access to it, but unless the device is incorrectly configured then "/dev/sda4" would be hidden from plain sight.
Beyond this I cannot say as I do not work for QNAP, I just enjoyed taking apart the hardware and software of my own QNAP TS-509 and putting it all back together. If you require specific help then contact Andy who works for QNAP at the official QNAP forums.