Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: mbertrand on January 10, 2014, 09:30:27 AM
-
At some point I've added 'NODELALLOC' to an existing line. This was a second drive. I did backup and all is fine. We have many test computers where we all do the same thing. Some of us started noticing that the extra option we added 'NODELALLOC' was gone.
Could this had happen? Could it be rebuildfstab script bug?
-
Rebuildfstab strips out any lines that contain "Added by TC" then add lines for each block device.
If you remove the "Added by TC" the line will not be touched, but you will still get an added line.
You could request a change so that a line not be added for $DEVROOT/$DEVNAME if it is already in $TMP.
-
I was actually thinking of that but that does not seem to work. Now for whatever reason I put back the option and keeped
the comment at the end did the backup, rebooted and the optoin is still there.
This is my line that I edited:
/dev/sdb1 /mnt/sdb1 ext4 noauto,users,exec,nodelalloc 0 0 # Added by TC
and it like that on reboot.
-
Run rebuildfstab and see if it is still there.
-
When is rebuildfstab executed? Before Restore?
-
I ran rebuildfstab and the line was removed. Just to be clear, the fstab is in the .filetool.lst .
Is rebuildfstab ran also at some othertime?
-
Many things trigger it, such as inserting or removing a USB device, or clicking refresh on mnttool.
I will submit a patch.
-
Yes I can confirm all of this. Putting my usb stick in removed my line. This would explain why, sometimes, when I do backup, I end up with my changes lost. I due allot of testing and backups and actually always inserting usb stick!!
So, How can I get around this? You mentioned a patch, for what exactly?
-
I submitted for approval a change to rebuildfstab to not replace fstab entries for a device that does not have "Added by TC" on the line.
If accepted, it will appear in a future release or release candidate.
-
Thats great thanks. I have no idea on the procedures for getting updates. These changes will come on the next update?
Or there will be a patch? How do I know its been changed? Sorry but I don't know how this works!
Also, in the meanwhile, any temp ideas to fix this? We have many pc out there that absolutely needs this fixed.
But at the same time I don't want to change TCs files from core.gz onles thats the only way for now. I believe that I can completely bypass the rebuilt with NOFSTAB but this only during boot?
-
If you mount the drive in bootlocal.sh, you can use a full mount command.
That would not even consult fstab.
Ex:
mount -ousers,exec,nodelloc /dev/sdb1 /mnt/sdb1
-
Ok thanks that sound like a good idea i'll try it.
-
Confused again!. I already have in my bootlocal mount command to mount sdb1 like this:
mount $SECOND_DRIVE_MOUNT_FOLDER. Si I guess with this syntax it is using fstab for mount?
So when is the first drive getting mounted and is it using fstab?
/dev/sda1 /mnt/sda1 ext4 noauto,users,exec 0 0 # Added by TC
/dev/sdb1 /mnt/sdb1 ext4 noauto,users,exec 0 0 # Added by TC
Is tc-config mounting? I thought that lines in fstab with noauto don't get mounted?
Maybe would be better just quick explanation of how TC does mounting.
Thanks
-
Core only mounts filesystems that are the target of tce=, home=, or opt=.
All other filesystems must be mounted by the user.
The tce, home, and opt filesystems are mounted using fstab created by rebuildfstab.
They will be mounted before restore is run, so you cannot change the options by backing up fstab.
You could use mount -oremount to change the mount options on the already mounted filesystems in bootlocal.sh.
I don't know why you are concerned about this though, because nodelalloc is the default.
-
We are concerned because we have customers that sometimes need to perform some function and then restart the pc and are loosing data. We found that nodelalloc solved this problem or we think it did. When you say it is the default you mean for ext4.
It does not seem that way. Can you elaborate on this and thinks for taking the time we appreciate it.
-
See for yourself
mount /mnt/sdb1
mount | grep sdb1
mount -oremount,delalloc /mnt/sdb1
mount | grep sdb1
mount -oremount,nodelalloc /mnt/sdb1
mount | grep sdb1
-
This is my out put of your test
tc@box:~$ mount /mnt/sdb1
tc@box:~$ mount | grep sdb1
/dev/sdb1 on /mnt/sdb1 type ext4 (rw,relatime,barrier=1,data=ordered)
tc@box:~$ sudo mount -oremount,delalloc /mnt/sdb1
tc@box:~$ mount | grep sdb1
/dev/sdb1 on /mnt/sdb1 type ext4 (rw,relatime,barrier=1,data=ordered)
tc@box:~$ sudo mount -oremount,nodelalloc /mnt/sdb1
tc@box:~$ mount | grep sdb1
/dev/sdb1 on /mnt/sdb1 type ext4 (rw,relatime,barrier=1,nodelalloc,data=ordered)
-
So delalloc is the default for ext4 and you now know what command you need to add to bootlocal.sh.
-
Thanks