User(s) browsing this thread: 1 Guest(s)
[200] Local disc name in NMT browser
|
|
04-18-2012, 08:38 PM
(This post was last modified: 04-18-2012 08:39 PM by xray.)
|
|||
|
|||
|
Local disc name in NMT browser
Hello Guys,
I'm trying to find out how popcorn C-200 is naming the hard disks in the NMT hard disk file browser. I have a disk mounted /dev/md0 on /opt/sybhttpd/localhost.drives/SATA_DISK_MD0 But if i list the devices http://nmt_ip:8008/system?arg0=list_devices I'm getting no "name" variable. Code: <device>and not like this: Code: <device>What should i do to have valid "name" recognized by syb_framework? |
|||
|
04-18-2012, 08:41 PM
(This post was last modified: 04-18-2012 08:42 PM by accident.)
|
|||
|
|||
|
RE: Local disc name in NMT browser
that's because the mounts are made from the settings, not the settings made from the mounts... Your also on a 200, there is a slight disconnect in the area of drives and shares between the gaya ui and the api so it may not always line up exactly no matter how hard you try. physically attached drives are usually pretty good though.
change the volume label of the drive itself and you don't need to do anything fancy to make it work and a path of file:///name of drive/ will be there. |
|||
|
04-18-2012, 08:44 PM
|
|||
|
|||
RE: Local disc name in NMT browser
(04-18-2012 08:41 PM)accident Wrote: that's because the mounts are made from the settings, not the settings made from the mounts... Your also on a 200, there is a slight disconnect in the area of drives and shares between the gaya ui and the api so it may not always line up exactly no matter how hard you try. physically attached drives are usually pretty good though. i did already a tune2fs -L "SATA_DISK_RAID" /dev/md0 but still the same issue ![]() /dev/md0 contains an ext3 fs. |
|||
|
04-18-2012, 08:46 PM
(This post was last modified: 04-18-2012 08:46 PM by accident.)
|
|||
|
|||
|
RE: Local disc name in NMT browser
you may need to reboot the hardware for the api to pick that up.
then I would skip your mount and you should find the drive mounted to /name of drive (if you ls / you'll see it) |
|||
|
04-18-2012, 08:49 PM
(This post was last modified: 04-18-2012 08:49 PM by xray.)
|
|||
|
|||
|
RE: Local disc name in NMT browser
well this FS is mounted by a script created by me. The script is executed as a part of nmt applications. So the FS label i assume will not be recognized by the firmware itself during the boot. Because the md0 device is assembled/created after the hw booted and starting the nmt apps. Maybe i need to reload some base service after mounted the fs?
|
|||
|
04-18-2012, 08:52 PM
|
|||
|
|||
|
RE: Local disc name in NMT browser
ah.. so it can't be discovered by the pch and automounted? not sure what you need to do to fix it, never really heard of anyone dealing with needing to mount a drive on their own.. best recommendation here is wander around the drive and try to find the normal mount script for a drive to see what your missing.
|
|||
|
04-18-2012, 08:58 PM
(This post was last modified: 04-18-2012 09:02 PM by xray.)
|
|||
|
|||
|
RE: Local disc name in NMT browser
Well let me explain what i did
![]() I have installed the NMT apps on an internally attached USB drive. I have two physical disks installed into the PCH. I have compiled kernel modules and mdadm to support RAID on the PCH. The script which is started by the nmt app "local" is loading the kernel raid modules, assembling the array and mounting it. Thats why it is mounted the "disk" after the normal startup of the PCH. |
|||
|
04-18-2012, 09:05 PM
|
|||
|
|||
|
RE: Local disc name in NMT browser
I would look and find the normal scripts the framework calls to mount/detect the drives then.. it's probably something minor you can easily add to your script
|
|||
|
04-19-2012, 09:20 PM
|
|||
|
|||
|
RE: Local disc name in NMT browser
After a little reverse engineering i found out how it is working.
There is a file called /tmp/usb_name.txt where you have to add your mount point name from dir /opt/sybhttpd/localhost.drives/ Example: If /dev/md0 is mounted to /opt/sybhttpd/localhost.drives/SATA_DISK_MD0 You have to append the line "SATA_DISK_MD0|SATA_DISK_MD0" to /tmp/usb_name.txt like: C200[~]# cat /tmp/usb_name.txt SATA_DISK_B4|SATA_DISK_B4 USB_DRIVE_C-1|USB_DRIVE_C-1 USB_DRIVE|USB_DRIVE SATA_DISK_MD0|SATA_DISK_MD0 Where the first string before the pipe (|) is the mountpoint name and the second is the label which will be displayed on the NMT GUI browser. I simply add the same string as name if the md device has no label. If it has a label then i will apeend the label as second param: "SATA_DISK_MD0|Disk_Label_what_the_disk_has" to /tmp/usb_name.txt Like C200[~]# cat /tmp/usb_name.txt SATA_DISK_B4|SATA_DISK_B4 USB_DRIVE_C-1|USB_DRIVE_C-1 USB_DRIVE|USB_DRIVE SATA_DISK_MD0|Disk_Label_what_the_disk_has When i umount the device it will remove the line from /tmp/usb_name.txt aswell. |
|||
|
« Next Oldest | Next Newest »
|

Twitter
Facebook
NMT Wiki
Search
Member List
Help
A-400 [13 May 2013]

[200] Local disc name in NMT browser





![[+]](images/collapse_collapsed.gif)


