eSATA Drive in QNAP

If you want to use a eSATA drive in a QNAP device without plug and play, read the following.

Attach drive to eSATA drive.
ssh admin@yourip

Check for:

[11936.459226] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl F310)
[11936.499252] ata5.00: ATA-8: WDC …., 04.05G09, max UDMA/133
[11936.499295] ata5.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[11936.539268] ata5.00: configured for UDMA/133
[11936.539323] ata5: EH complete
[11936.539646] scsi 4:0:0:0: Direct-Access WDC WD…. 04.0 PQ: 0 ANSI: 5
[11936.549494] Check proc_name[sata_mv].
[11936.559626] sd 4:0:0:0: [sdza] 3907…. 512-byte logical blocks: (2.00 TB/1.81 TiB)
[11936.559899] sd 4:0:0:0: [sdza] Write Protect is off

Important is sdza

Format the drive:

mke2fs -t ext3 /dev/sdza

Mount the device

mount /dev/sdza1 esata/

Be happy

QNAP NAS: File System not clean. Examination failed (Cannot unmount disk)

If you receive the following error message from your QNAP NAS:

The file system is not clean. It is suggested that you run „check disk“

and a disk check is failed with that message:

[Mirror Disk Volume: Drive 2 3 4 1] Examination failed (Cannot unmount disk).

ssh your qnap and do the following:

/etc/init.d/ stop && /etc/init.d/ stop && /etc/init.d/ stop
umount /dev/md0
e2fsck -f -v -C 0 /dev/md0
mount /dev/md0

If you receive the following error while trying to unmount the device:
umount: /share/MD0_DATA: device is busy

try to figure out which process is still using the device:

# lsof +f -- /dev/md0
sh 10721 admin cwd DIR 9,0 4096 16252936 /share/MD0_DATA/
lsof 29119 admin cwd DIR 9,0 4096 16252936 /share/MD0_DATA/
lsof 29120 admin cwd DIR 9,0 4096 16252936 /share/MD0_DATA/

Which indicates that your current shell is trying to use the device, simply use: cd / and umount again.

That should help