7.8beta2 adds new package ROSE-storage

Did someone already try to mount an iscsci disk from his NAS (Synology) on a Mikrotik device (CHR) or is this not possible?

When I try to do this the add command hangs.
And when I try to reboot the CHR I see below message in the console:

Rebooting
Failed to stop diskd: std failure: timeout (13)
could not umount system: Resource busy

Hello,

ho do I remove or edit existing nfs?

https://help.mikrotik.com/docs/display/ROS/Command+Line+Interface

@zandhaas I figured out how to get my hAP AX3 to mount a share off my TrueNAS. This assumes an iSCSI share on the NAS has been created/exported.

/disk add iscsi-address=192.168.x.x iscsi-iqn=iqn.2005-10.org.freenas.ctl:rose-iscsi slot=rose-iscsi type=iscsi

The first part of the IQN is configured on/provided by the NAS itself; the name of the share you created comes after the colon. The slot is the name you want the router to assign that particular disk.

Once it’s connected, it looks like this (mine was 128GB):

[admin@lab-hap-ax3] /disk> print
Flags: B - BLOCK-DEVICE; M, F - FORMATTING
Columns: SLOT, MODEL, SERIAL, INTERFACE, SIZE, FREE, FS, RAID-MASTER, ISCSI-STATE
#    SLOT        MODEL                                  SERIAL           INTERFA             SIZE             FREE  FS    RAID  ISCSI-STA
0  M nfs1        nfs://192.168.xx.xx/pcie1-sata1-part1                   network  235 152 605 184  235 006 853 120  nfs   none           
1 BM rose-iscsi  iSCSI Disk                             0050569aa261004  network  137 438 969 856  134 145 351 680  ext4  none  connected

This router now has an NFS share from the CCR2116 and the iSCSI share from the TrueNAS box.

Since it’s block level, unless it’s already been formatted, you’ll have to format it once connected.

At /disk, you’ll type print, which will show you the disks, then you’ll type remove and the number to the left of the bad NFS share.

thank you very much…worked

Feel free to suggest other protocols and features that should be supported.

please make ROS compatible with Hikvision cameras, NOTHING is working…not ROS 7.7 with old SAMBA v1 not even ROS 7.8 with rose is not working NFS either,I just tried,milions peple are using Hikvision cameras…

None – great work here. You’ve given a whole new life to the RB1100s we have. Just the RAID options alone is super useful. And y’all have multiple protocol for containers to use a remote disk…

So perhaps better docs on what you have help more :wink:. e.g. “F1” at CLI on ROSE doesn’t have command descriptions:

[user@mt] /disk> /console/inspect request=syntax path=disk
Columns: TYPE, SYMBOL, SYMBOL-TYPE, NESTED, NONORM, TEXT
TYPE    SYMBOL           SYMBOL-TYPE  NESTED  NONORM  TEXT                                                                    
syntax                   collection        0  yes                                                                             
syntax  ..               explanation       1  no      go up to root                                                           
syntax  add              explanation       1  no      Create a new item                                                       
syntax  comment          explanation       1  no      Set comment for items                                                   
syntax  copy             explanation       1  no                                                                              
syntax  disable          explanation       1  no      Disable items                                                           
syntax  edit             explanation       1  no                                                                              
syntax  eject-drive      explanation       1  no                                                                              
syntax  enable           explanation       1  no      Enable items                                                            
syntax  export           explanation       1  no      Print or save an export script that can be used to restore configuration
syntax  find             explanation       1  no      Find items by value                                                     
syntax  format-drive     explanation       1  no                                                                              
syntax  get              explanation       1  no      Gets value of item's property                                           
syntax  monitor-traffic  explanation       1  no                                                                              
syntax  nvme-discover    explanation       1  no                                                                              
syntax  print            explanation       1  no      Print values of item properties                                         
syntax  raid-scrub       explanation       1  no                                                                              
syntax  remove           explanation       1  no      Remove item                                                             
syntax  reset            explanation       1  no                                                                              
syntax  reset-counters   explanation       1  no                                                                              
syntax  set              explanation       1  no      Change item properties                                                  
syntax  unset            explanation       1  no                                                                              

[user@mt] /disk> /console/inspect request=syntax path=disk,set
Columns: TYPE, SYMBOL, SYMBOL-TYPE, NESTED, NONORM, TEXT
TYPE    SYMBOL                    SYMBOL-TYPE  NESTED  NONORM  TEXT                                   
syntax                            collection        0  yes                                            
syntax  <numbers>                 explanation       1  no      List of item numbers                   
syntax  comment                   explanation       1  no      Short description of the item          
syntax  crypted-backend           explanation       1  no                                             
syntax  disabled                  explanation       1  no      Defines whether item is ignored or used
syntax  encryption-key            explanation       1  no                                             
syntax  iscsi-address             explanation       1  no                                             
syntax  iscsi-export              explanation       1  no                                             
syntax  iscsi-iqn                 explanation       1  no                                             
syntax  iscsi-port                explanation       1  no                                             
syntax  nfs-address               explanation       1  no                                             
syntax  nfs-export                explanation       1  no                                             
syntax  nfs-share                 explanation       1  no                                             
syntax  nvme-tcp-address          explanation       1  no                                             
syntax  nvme-tcp-export           explanation       1  no                                             
syntax  nvme-tcp-name             explanation       1  no                                             
syntax  nvme-tcp-port             explanation       1  no                                             
syntax  parent                    explanation       1  no                                             
syntax  partition-offset          explanation       1  no                                             
syntax  partition-size            explanation       1  no                                             
syntax  raid-chunk-size           explanation       1  no                                             
syntax  raid-device-count         explanation       1  no                                             
syntax  raid-master               explanation       1  no                                             
syntax  raid-max-component-size   explanation       1  no                                             
syntax  raid-member-failed        explanation       1  no                                             
syntax  raid-role                 explanation       1  no                                             
syntax  raid-type                 explanation       1  no                                             
syntax  ramdisk-size              explanation       1  no                                             
syntax  self-encryption-password  explanation       1  no                                             
syntax  slot                      explanation       1  no                                             
syntax  smb-address               explanation       1  no                                             
syntax  smb-export                explanation       1  no                                             
syntax  smb-password              explanation       1  no                                             
syntax  smb-share                 explanation       1  no                                             
syntax  smb-user                  explanation       1  no                                             
syntax  tmpfs-max-size            explanation       1  no                                             
syntax  type                      explanation       1  no

Can it only sync between path and network? Real rsync can also sync between two pathnames, so I tried:
/file/sync/add local-path=/ramdisk remote-path=/nfs
(I have a ramdisk and nfs mount configured)
hoping that it would sync everything I put in ramdisk to the nfs-mounted filesystem, but it does not work.
Also, what can I expect when mountpoints are crossed? When I sync / will it also sync the ramdisk and nfs mounts? (it should not)

Bit of a long shot, but how about RDMA protocols such as RoCE or iWARP?

One use case I’m picturing is a router with a large NVMe/MSATA store serving small partitions to end-user routers for containers like Pi Hole and Uptime Kuma, to avoid tons of USB sticks out in the field.

To make that happen, the following would be useful (in order of priority):

  • The ability to create multiple partitions (and subsequently unique shares for individual remote devices)
  • Basic NFS “/etc/exports” support (i.e. define shares and restrict per-share access by IP address, subnet, etc.)
  • Authentication for outgoing SMB shares (tied to on-router users or RADIUS would be nice) [does this eventually replace stock SMB server?]
  • CHAP authentication for iSCSI (not very resilient over a WAN, but less susceptible to permissions problems, unlike NFS & SMB)

I do recognize that some of this could easily be done from within a container (specifically a custom SMB server with a GUI).

Hello,

do you know any SAMBA server which has web UI and is working in ROS container? I have bought hap AX3 but Hikvision cameras are not able to connect anything from Mirotik. With the cameras is not working SAMBA v1 in ROS 7.7 not even NFS from ROS 7.8 - rose storage is not working.

I haven’t found (or really looked for) any pre-built Samba servers. I built my own using alpine linux and adding the samba package, then created a custom config file. That would be a quick way to do it. But if you have more granular or detailed authentication requirements, you’d have to keep looking or build your own.

While we’re making feature requests…

It would be nice to have one massive underlying volume to take advantage of RAID benefits, then carve it out for sharing via the different technologies, i.e. one or two larger volumes for file shares (NFS/SMB), and a number of smaller volumes for block shares (iSCSI, nVMEof). You could do this with partitions, but then the partition sizes are fixed. With dynamic volume sizing, we could make better use of the backing store.

Two ways I can see implementing this:

  • LVM - probably easiest
  • ZFS - probably more complicated

With LVM, LV’s could be formatted locally and shared (NFS/SMB), or LV’s could become target LUNs for iSCSI/NVMEof.
With ZFS, datasets would be used for shared volumes, and ZVOLs for remote LUNs.

Or anything with journalling so you can do back-in-time restore of a file…

Yeah, both BTRFS and ZFS are great choices but as the latter is a third party add-on (originated from Sun Microsystems) it would likely be harder to maintain.

likely ? Look at for example the ZeroTier package ; MT released it at version 1.6.6 and it was never updated since then … ZT is already at 1.10.x
Same with Wireguard.
If you cannot commit to maintain it, leave it!

I do understand what you mean. However, I tried to emphasize that a standard built-in kernel module like Wireguard is for obvious reasons much easier to maintain than a third party add-on like ZeroTier that requires much more work as part of the porting process. The same goes for ZFS.

not sure if this is purely to CHR related, but I can’t properly list iSCSI on x86 machine:

[admin@lab] /disk> add iscsi-address=192.168.0.100 iscsi-iqn=iqn.2004-04.com.qnap:ts-251:iscsi.lab.f84517 slot=nas type=iscsi 
[admin@lab] /disk> pr

action timed out - try again, if error continues contact MikroTik support and send a supout file (13)

doesn’t look like target issue, as can easily connect from linux box:

root@ubuntu:~# iscsiadm --mode discovery --type sendtargets --portal 192.168.0.100
192.168.0.100:3260,1 iqn.2004-04.com.qnap:ts-251:iscsi.lab.f84517
root@ubuntu:~# iscsiadm --mode node --targetname iqn.2004-04.com.qnap:ts-251:iscsi.lab.f84517 --portal 192.168.0.100 --login
Logging in to [iface: default, target: iqn.2004-04.com.qnap:ts-251:iscsi.lab.f84517, portal: 192.168.0.100,3260]
Login to [iface: default, target: iqn.2004-04.com.qnap:ts-251:iscsi.lab.f84517, portal: 192.168.0.100,3260] successful.
root@ubuntu:~# dmesg |tail
[ 1146.271269] scsi host1: iSCSI Initiator over TCP/IP
[ 1146.304530] scsi 1:0:0:0: Direct-Access     QNAP     iSCSI Storage    4.0  PQ: 0 ANSI: 5
[ 1146.310141] sd 1:0:0:0: Attached scsi generic sg1 type 0
[ 1146.311223] sd 1:0:0:0: [sdb] 10485760 512-byte logical blocks: (5.37 GB/5.00 GiB)
[ 1146.312015] sd 1:0:0:0: [sdb] Write Protect is off
[ 1146.312040] sd 1:0:0:0: [sdb] Mode Sense: 43 00 00 08
[ 1146.313021] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 1146.324904] sd 1:0:0:0: [sdb] Preferred minimum I/O size 512 bytes
[ 1146.324929] sd 1:0:0:0: [sdb] Optimal transfer size 8388608 bytes
[ 1146.365988] sd 1:0:0:0: [sdb] Attached SCSI disk