Verify it is not mounted ¬hing under it.
chflags -R noschg src/
Verify it is not mounted ¬hing under it.
ziomario,Hello.
I'm not able to rename the src directory to src-old. What's the reason ? How can I do this ? (I'm using a FreeBSD 13.1 VM).
Code:cd /usr mv src src-old Operation not supported
View attachment 15333
# cd /usr
# ls -la
# ls -la src
# df -h
Are you running ZFS with a default setup?
In that case /usr/src is a ZFS dataset, you can't rename that. Been there, done that, scratched my head for a second.
zfs list
root@Silicium ~# zfs list /usr/src
NAME USED AVAIL REFER MOUNTPOINT
flash/usr/src.releng.13.1 758M 45.9G 758M /usr/src
zfs set mountpoint=...
Are you running ZFS with a default setup?
In that case /usr/src is a ZFS dataset, you can't rename that. Been there, done that, scratched my head for a second.
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
zroot 39.6G 151G 768K /zroot
zroot/ROOT 10.5G 151G 768K none
zroot/ROOT/13.1-RELEASE-p4_2023-01-04_173043 64K 151G 9.24G /
zroot/ROOT/13.1-RELEASE_2022-11-22_155448 64K 151G 2.05G /
zroot/ROOT/default 10.5G 151G 10.2G /
zroot/tmp 1.25M 151G 1.25M /tmp
zroot/usr 29.1G 151G 768K /usr
zroot/usr/home 20.0G 151G 20.0G /usr/home
zroot/usr/ports 5.86G 151G 5.86G /usr/ports
zroot/usr/src 3.22G 151G 3.22G /usr/src
zroot/var 5.66M 151G 768K /var
zroot/var/audit 768K 151G 768K /var/audit
zroot/var/crash 768K 151G 768K /var/crash
zroot/var/log 1.62M 151G 1.62M /var/log
zroot/var/mail 1.03M 151G 1.03M /var/mail
zroot/var/tmp 768K 151G 768K /var/tmp
mkdir /mnt/src
zfs set mountpoint=/mnt/src zroot
cd /mnt/src
ls
nothing here.
zfs mount | grep /usr/src
mount -v | grep /usr/src
# zfs rename zroot/usr/src zroot/usr/src-old
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
zroot 39.6G 151G 768K /mnt/src
zroot/ROOT 10.5G 151G 768K none
zroot/ROOT/13.1-RELEASE-p4_2023-01-04_173043 64K 151G 9.24G /
zroot/ROOT/13.1-RELEASE_2022-11-22_155448 64K 151G 2.05G /
zroot/ROOT/default 10.5G 151G 10.2G /
zroot/tmp 1.25M 151G 1.25M /tmp
zroot/usr 29.1G 151G 768K /usr
zroot/usr/home 20.0G 151G 20.0G /usr/home
zroot/usr/ports 5.86G 151G 5.86G /usr/ports
----> zroot/usr/src-old 3.22G 151G 3.22G /usr/src-old
zroot/var 5.66M 151G 768K /var
zroot/var/audit 768K 151G 768K /var/audit
zroot/var/crash 768K 151G 768K /var/crash
zroot/var/log 1.62M 151G 1.62M /var/log
zroot/var/mail 1.03M 151G 1.03M /var/mail
zroot/var/tmp 768K 151G 768K /var/tmp
git clone https://github.com/beckhoff/freebsd-src /usr/src
# ls /usr
bin include lib32 libexec obj sbin src? tests
home lib libdata local ports share src-old
# cd src
src: No such file or directory.
# cd src?
/usr/src^M # ls
.arcconfig MAINTAINERS contrib secure
.arclint Makefile crypto share
.cirrus-ci Makefile.inc1 etc stand
.cirrus.yml Makefile.libcompat gnu sys
.clang-format Makefile.sys.inc include targets
.git ObsoleteFiles.inc kerberos5 tests
.gitattributes README.md lib tools
.github RELNOTES libexec usr.bin
.gitignore UPDATING release usr.sbin
COPYRIGHT bin rescue
LOCKS cddl sbin
Code:zfs mount | grep /usr/src mount -v | grep /usr/src
cd /usr
ls -al | grep src
[CODE]
# cd src?
/usr/src^M # ls
Good catch. I looked right past that.Looks like you created a directory with a Control-M in the name, somehow, maybe? From what you put above:So is the ^M really there? That is a carriage return (I think) control character.Code:# cd src? /usr/src^M # ls
Looks like you created a directory with a Control-M in the name, somehow, maybe? From what you put above:So is the ^M really there? That is a carriage return (I think) control character.Code:# cd src? /usr/src^M # ls
zfs rename zroot/usr/src zroot/usr/src-old
mkdir /usr/src
ZFS datasets are not directories.