AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-17702

719016's questions

Martin Hope
719016
Asked: 2022-04-29 02:08:20 +0800 CST

无法在 Ubuntu 22.04 上挂载 nfs

  • 1

我已经在一台机器上安装了 Ubuntu 22.04,我正在尝试挂载一个 NFS 共享,它在其他 Linux Ubuntu 机器(21.04、20.04、18.04 等)的阵列上挂载没有问题。

我们使用的命令是:

sudo apt install nfs-common # Only required once for installation
sudo mount -t nfs 10.234.123.11:/bfx_share1 /bfx_share1

如果我这样做:

sudo showmount -e 10.234.123.11

它显示了可能的坐骑列表,因此在这方面一切都是犹太教。

它只是卡在那里,什么也没做。有任何想法吗?我可以做些什么或添加什么来调试情况?没有其他客户nfs-common吗?

我已经安装nfstrace并在尝试挂载 nfs 文件夹时,我在另一个终端中启动了它,以获得以下提示:

## On one terminal
(base) user@LS6-MS-7D04:~$ ping 10.234.123.11
PING 10.234.123.11 (10.234.123.11) 56(84) bytes of data.
64 bytes from 10.234.123.11: icmp_seq=1 ttl=64 time=0.202 ms
64 bytes from 10.234.123.11: icmp_seq=2 ttl=64 time=0.122 ms
64 bytes from 10.234.123.11: icmp_seq=3 ttl=64 time=0.172 ms
^C
--- 10.234.123.11 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2027ms
rtt min/avg/max/mdev = 0.122/0.165/0.202/0.033 ms
(base) user@LS6-MS-7D04:~$ sudo mount 10.234.123.11:/bfx_share1 /bfx_share1


## In the other terminal with nfstrace running

root@LS6-MS-7D04:/home/user# nfstrace -Z user
Log file: nfstrace.log
Read from interface: enp111s0
  BPF filter  : port 2049 or port 445
  snapshot len: 65535 bytes
  read timeout: 100 ms
  buffer size : 20971520 bytes
  promiscuous mode: on
  capture traffic : inout
Processing packets. Press CTRL-C to quit and view results.
Detect session 10.234.123.8:902 --> 10.234.123.11:2049 [TCP]
Detect session 10.234.123.8:772 --> 10.234.123.11:2049 [TCP]
10.234.123.8:772 --> 10.234.123.11:2049 [TCP]NULL
        CALL  []
        REPLY []
Detect session 10.234.123.8:947 --> 10.234.123.11:2049 [TCP]
10.234.123.8:947 --> 10.234.123.11:2049 [TCP]NULL
        CALL  []
        REPLY []

查看 Ubuntu 22.04 的发行说明(Jammy Jellyfish 发行说明): https ://discourse.ubuntu.com/t/jammy-jellyfish-release-notes/24668?_ga=2.137381111.630065420.1651222708-2033241278.1650531954

有一段:

UDP disabled for NFS mounts
Since Ubuntu 20.10 (“Groovy Gorilla”), the kernel option CONFIG_NFS_DISABLE_UDP_SUPPORT=y is set and this disables using UDP as the transport for NFS mounts, regardless of NFS version.

In practice, if you try to use udp, you will get this error:

$ sudo mount f1:/storage /mnt -o udp
mount.nfs: an incorrect mount option was specified

###

NFS server
The NFS server and client packages have finally been updated to the latest upstream version.

All NFS services now read their configuration from /etc/nfs.conf and /etc/nfs.conf.d/*.conf, which is an INI-style configuration file, where each section is about one daemon or aspect of the NFS service. The old /etc/defaults/nfs-* configuration files are still left around, but are unused.

During upgrade, a conversion script is run if the package detects that the /etc/default/nfs-* files have been changed. This script is /usr/share/nfs-common/nfsconvert.py and it will read the options from /etc/defaults/nfs-* and generate /etc/nfs.conf.d/local.conf, which overrides the defaults in /etc/nfs.conf.

If the conversion script fails for some reason, the package installation or upgrade will fail, and the issue will have to be resolved. Please file a bug against nfs-utils in Launchpad 2 if you encounter such a scenario.

A new tool called nfsconf(8) can be used to query the configuration settings of /etc/nfs.conf and /etc/nfs.conf.d/*.conf.

##

the CTDB package was adjusted to work with the new NFS server version shipped in this Ubuntu 22.04

我已经提交了一份错误报告: https ://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1970898

nfs
  • 5 个回答
  • 4633 Views
Martin Hope
719016
Asked: 2015-11-18 01:35:16 +0800 CST

如何在 VirtualBox 5 中的 Ubuntu 客户机上启用 AVX2 扩展?

  • 4

我正在尝试编译一个程序,该程序使用来自相当新的 Intel Haswell 处理器的 AVX2 指令。

我检查过我正在使用的 Macbook Pro 有一个 Crystalwell 处理器,它应该有这样的 AVX2 扩展:

sysctl -n machdep.cpu.brand_string  
Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz

我的目的是使用 Ubuntu 15.10 64 位版本的 VirtualBox 映像编译此类程序,该映像具有最新版本的 gcc:

gcc (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010

当我检查 VirtualBox 机器中的扩展时,我没有看到列出的 avx2:

processor   : 3
vendor_id   : GenuineIntel
cpu family  : 6
model       : 70
model name  : Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
stepping    : 1
cpu MHz     : 2494.226
cache size  : 6144 KB
physical id : 0
siblings    : 4
core id     : 3
cpu cores   : 4
apicid      : 3
initial apicid  : 3
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm
bugs        :
bogomips    : 4988.45
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

有任何想法吗?

virtualbox
  • 1 个回答
  • 12882 Views
Martin Hope
719016
Asked: 2015-06-02 06:06:10 +0800 CST

MacBook Pro 键盘上的 Ubuntu 14.04 virtualbox ctrl 和 alt 键?

  • 1

我有一台 2015 款 MacBook Pro,我为 OS X 主机 x86/amd64 安装了 VirtualBox 4.3.28。然后我安装了 Ubuntu 14.04.2 和 Virtualbox 扩展。

我想以类似的方式使用 Ctrl 和 Alt 键,就像我在普通 PC 笔记本电脑中找到它们时使用空格键一样:

[ Control_L ] [ Alt ] [        Spacebar        ] [ Control_R ]

这是我过去经常在普通 PC 笔记本电脑上使用的键盘布局,所以我的大脑习惯了键盘布局,我基本上是左手拇指靠在键盘上Alt,右手拇指靠在键盘上R_Ctrl<'kbd> key.

编辑:

我找到了一个类似问题的答案,他们在其中描述了如何更改 Macctrl和cmd密钥。这让我更接近我想要的东西,正确的Ctrl键现在可以工作了:How do I switch the Command key and Control key on a MacBook Pro?

将以下内容放入~/.Xmodmap:

clear control
clear mod4

keycode 105 =
keycode 206 =

keycode 133 = Control_L NoSymbol Control_L
keycode 134 = Control_R NoSymbol Control_R
keycode 37 = Super_L NoSymbol Super_L

add control = Control_L
add control = Control_R
add mod4 = Super_L

要测试,请运行命令:

xmodmap ~/.Xmodmap

我现在要做的是通过左右交换左键Ctrl和Alt键来完成修改。但我不知道如何使用xmodmap. 有任何想法吗?

14.04
  • 1 个回答
  • 1977 Views
Martin Hope
719016
Asked: 2015-01-05 04:16:26 +0800 CST

两个屏幕水平设置中的 Ubuntu 14.10 Aero snap?

  • 1

我设法让Aero snap 在 metacity Ubuntu 14.10 中左右工作,现在我想提出正确的winctrl命令,以便我可以在两个屏幕设置上模拟相同的效果,其中两个屏幕水平放置在每个屏幕旁边其他如下图。我希望它能在 Metacity(GNOME 经典)上运行,我根本不愿意转移到其他窗口管理器,因为我知道其中一些已经内置了这些功能。因此,这是一个专门针对 Metacity GNOME 经典环境尝试寻找答案的问题:

在此处输入图像描述

我想要的是扩展我当前的winctrl命令。他们目前的工作方式是在屏幕总长度的左侧或右侧使用屏幕总宽度的一半。键入Super_L+left将使活动窗口使用左半部分,键入Super_L+right将使活动窗口使用总水平像素的右半部分。

[hpenvy15 ~] $ cat > ~/bin/left.sh
#!/bin/bash
sleep 0.1 && wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && wmctrl -r :ACTIVE: -e 0,0,0,`xwininfo -root | grep Width | awk '{ print (($2/2))}'`,`xwininfo -root | grep Height | awk '{ print $2 }'`
^C
[hpenvy15 ~] $ cat > ~/bin/right.sh
#!/bin/bash
sleep 0.1 && wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && wmctrl -r :ACTIVE: -e 0,`xwininfo -root | grep Width | awk '{ print (($2/2)+5) ",0," (($2/2)) }'`,`xwininfo -root | grep Height | awk '{ print $2 }'`
^C

在具有两个屏幕的新设置中,我有 1920+1920 像素宽。理想的窗宽是1920的一半,即1920/2=960。我想要新的left和right命令来计算当前找到的窗口在哪里,然后如果left键入,则转到最近的 960 宽像素块,在两个屏幕中存在的 4 个块中的任何一个,1920 + 1920 配置,但也适用于单屏 1920 配置中最近的 960 宽块。如下图所示:

这是当我在 1 和 2 中有外部屏幕,在 3 和 4 中有笔记本电脑屏幕时的配置。目前,单击Super_L+left 会将窗口移动到屏幕的 TotalWidth/2 左半部分,这太大了,将1+2。

我希望第一个left命令将它移动到窗格 3,然后下一个left命令将它移动到 2,然后下一个命令将它移动到 1。

   +-------------------++-------------------++-------------------++-------------------+
   |                   ||                   ||                   || +------------+    |
   |                   ||                   ||                   || |            |    |
   |                   ||                   ||           <-------++-+            |    |
   |                   ||                   ||                   || |            |    |
   |         1         ||         2         ||         3         || |       4    |    |
   |                   ||                   ||                   || |            |    |
   |                   ||                   ||                   || +------------+    |
   |                   ||                   ||                   ||                   |
   |                   ||                   ||                   ||                   |
   +-------------------++-------------------++-------------------++-------------------+

这是当我只有两半 960 像素宽的笔记本电脑屏幕时的配置。

目前,单击Super_L+right会将窗口移动到屏幕的 TotalWidth/2 右半部分,对应于数字 4。

   +-------------------++-------------------+
   | +------------+    ||                   |
   | |            |    ||                   |
   | |            |    ||                   |
   | |            |----++--->               |
   | |       3    |    ||         4         |
   | |            |    ||                   |
   | |            |    ||                   |
   | +------------+    ||                   |
   |                   ||                   |
   +-------------------++-------------------+

这是wmctrl两个屏幕打开时的输出:

wmctrl -d
0  * DG: 3840x1080  VP: 0,0  WA: 0,0 3840x1080  Workspace 1
1  - DG: 3840x1080  VP: N/A  WA: 0,0 3840x1080  Workspace 2
2  - DG: 3840x1080  VP: N/A  WA: 0,0 3840x1080  Workspace 3
3  - DG: 3840x1080  VP: N/A  WA: 0,0 3840x1080  Workspace 4

这是xrandr同时打开两个屏幕时的输出:

[hpenvy15 ~] $ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
eDP1 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 344mm x 193mm
   1920x1080      60.1*+   59.9     40.0  
   1680x1050      60.0     59.9  
   1600x1024      60.2  
   1400x1050      60.0  
   1280x1024      60.0  
   1440x900       59.9  
   1280x960       60.0  
   1360x768       59.8     60.0  
   1152x864       60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080      60.0*+   50.0     59.9     30.0     25.0     24.0     30.0     24.0  
   1920x1080i     60.1     50.0     60.0  
   1680x1050      59.9  
   1600x900       60.0  
   1280x1024      75.0     60.0  
   1440x900       59.9  
   1366x768       59.8  
   1280x800       59.9  
   1152x864       75.0  
   1280x720       60.0     50.0     59.9  
   1440x576i      50.1  
   1024x768       75.1     70.1     60.0  
   1440x480i      60.1     60.1  
   832x624        74.6  
   800x600        72.2     75.0     60.3  
   720x576        50.0  
   720x480        60.0     59.9  
   640x480        75.0     72.8     66.7     60.0     59.9  
   720x400        70.1  
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
multiple-monitors
  • 1 个回答
  • 1558 Views
Martin Hope
719016
Asked: 2014-12-29 07:23:06 +0800 CST

14.10 gnome classic metacity 无法将键盘快捷方式连接到二进制文件

  • 2

我正在尝试使用 Gnome Classic Metacity 在 Ubuntu 14.10 上获得 Aero Snap 效果。

如果我在终端窗口中执行,我发现了一个有效的命令:

wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && wmctrl -r :ACTIVE: -e 0,0,0,`xwininfo -root | grep Width | awk '{ print (($2/2))}'`,`xwininfo -root | grep Height | awk '{ print $2 }'`

我可以用 a 运行它,sleep 1以便有时间切换到我想调整大小的窗口:

sleep 1 && wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && wmctrl -r :ACTIVE: -e 0,0,0,`xwininfo -root | grep Width | awk '{ print (($2/2))}'`,`xwininfo -root | grep Height | awk '{ print $2 }'`

它运作良好。

我还可以在我的 $HOME/bin/left.sh 和 $HOME/bin/right.sh 中将其作为 bash 脚本运行,或更短,Alt+F2然后$HOME/bin/aaa用于左和$HOME/bin/fff右。Alt它也适用于+F2菜单后面的活动窗口。

现在我想将此命令连接到键盘快捷键。我试过了:

System Settings -> Keyboard -> Shortcuts -> Custom Shortcuts -> "Aero Left" - Super+Left

我将其链接到/bin/bash /home/myusername/bin/aero_left.sh上面的命令行。但它没有效果。同样,在终端窗口中运行 bash 命令确实有效,但键盘快捷键无效。

事实上,Custom Shortcuts我尝试设置的任何一个都没有发生太多事情:

/usr/bin/mplayer /usr/share/aisleriot/sounds/splat.ogg

or

/bin/bash -c "/usr/bin/mplayer /usr/share/aisleriot/sounds/splat.ogg"

并尝试将它连接到任何类型的键盘组合,它不起作用......

更新:我试过xbindkeys了,但我的例子都没有用。仍然对为什么Custom Shortcuts不做太多事情感到着迷。期待解决方案。

[hpenvy15 ~] $ mkdir ~/bin ; ls -l -d1 ~/bin | wc -l
1
[hpenvy15 ~] $ cat > ~/bin/left.sh
#!/bin/bash
sleep 0.1 && wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && wmctrl -r :ACTIVE: -e 0,0,0,`xwininfo -root | grep Width | awk '{ print (($2/2))}'`,`xwininfo -root | grep Height | awk '{ print $2 }'`
^C
[hpenvy15 ~] $ cat > ~/bin/right.sh
#!/bin/bash
sleep 0.1 && wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && wmctrl -r :ACTIVE: -e 0,`xwininfo -root | grep Width | awk '{ print (($2/2)+5) ",0," (($2/2)) }'`,`xwininfo -root | grep Height | awk '{ print $2 }'`
^C

[hpenvy15 ~] $ sudo apt-get install xbindkeys
Reading package lists... Done
Building dependency tree       
Reading state information... Done
xbindkeys is already the newest version.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

printf '"bash $HOME/bin/left.sh"\n Mod4+Super_L+Left\n' > ~/.xbindkeysrc
printf '"bash $HOME/bin/right.sh"\n Mod4+Super_L+Right\n' >> ~/.xbindkeysrc
xbindkeys

如果我然后键入control+alt+b我可以听到鼓声,但没有任何反应。

有任何想法吗?

command-line
  • 1 个回答
  • 583 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve