Tag Info

Hot answers tagged

27

Execute as root: # swapoff -a And to make that change permanent, edit /etc/fstab and remove or comment-out the swap entry.


18

Most probably this is ext2, ext3 or ext4 file system which reserve a few percent of disk space (by default 5%) to be used only by specified users (usually root). If you create file system with mke2fs then -m option is what you are looking for: -m reserved-blocks-percentage Specify the percentage of the filesystem blocks reserved for the ...


11

Comment/remove the relevant entry in the /etc/fstab to prevent it from being reenabled on the next boot, then reboot or run swapoff -a to disable the usage of the swap partition for the currently running system. Now delete the swap partition, extend your system partition over that unused space and extend the actual filesystem. I don't know whether your ...


6

GParted -> Swapoff, not closing it swapoff -a as root to make sure the swap is off cat /proc/swaps to make 100% sure the swap is off Commenting out the swap's UUID in /etc/fstab as root Removing the file /etc/initramfs-tools/conf.d/resume, which contained the UUID, as root Deleting the swap partition using GParted and applying the change. Not allocating the ...


5

Bits in the umask of the current process are cleared when the file is created. In this case, it looks like the umask is 0002 (no world write). Call umask() before calling open() to change that. Soapbox: please don't create world-writable files unless you're really sure that's what you want. umask exists to save you and your users from exactly that type ...


5

Tracking freed blocks is unavoidable in any decent file system and ZFS is no exception. There is however a simple way under ZFS to have a nearly instantaneous directory deletion by deferring the underlying cleanup. It is technically very similar to Gilles' suggestion but is inherently reliable without requiring extra code. If you create a snapshot of your ...


4

In general: Boot a livecd, containing all needed drivers (ZFS) Backup your partition Format it with ZFS Unpack the backup into the new partition Update initrd, make sure all needed modules are included (on debian update-initramfs and configuring /etc/initramfs-tools, but on redhat it will be different). Update grub (e.g. filesystem uuids) Maybe reinstall ...


4

What you're asking for is impossible. Or, more precisely, there's a cost to pay when deleting a directory and its files; if you don't pay it at the time of the deletion, you'll have to pay it elsewhere. You aren't just removing a directory — that would be near-instantaneous. You're removing a directory and all the files inside it and also recursively ...


3

I don't see any advantage to hard links. With hardlinks, you can move the original file (rename it) as needed without needing to recreate the link. That strikes me as a bug rather than a feature. If you want to disable a site (for example because you've just noticed that it has a major security hole), with symbolic links, you can just rename the ...


3

Yum will do that by default in Live mode; anything you install whilst running off a live optical disc is installed to RAM because you are running off of RAM as it is. If you want to do it explicitly, though, you can create a RAM disk: mkdir foo mount -t tmpfs -o size=4096M bar /foo where: mount is the command. -t tmpfs specifies the type of filesystem. ...


3

The method you are using by creating a /forcefsck file in the root directory of each filesystem you want to force a check on, only works in a pure SysVinit environment, or an older Upstart init environment. It doesn't work on a system using systemd init. I also am assuming you are on an ext4 filesystem. The way to run a one time filesystem check at boot ...


3

du and df do not count the same things so it is rare from them to give the same results, though the differences are usually attributable to administrative overheads and areas reserved for special purposes. However, with 89% and 96% used you have much larger, and more urgent, problems to deal with.


2

I don't know much about "Windows Share", do you mean the SMB protocol? I access files hosted on CentOS from Windows 7/8 machines with samba. No client side installation needed. https://www.samba.org/samba/docs/using_samba/ch03.html


2

The master boot record (MBR) at the beginning of a disk contains only 446 bytes of code, so it is tiny and cannot do much. Therefore, a common booting technique is to do what is called "chain loading," where the MBR loads code at the beginning of the active partition and jumps to that code. By leaving the first two sectors free, the EXT file system allows ...


2

The copy doesn't do any conversion itself. Basically the "conversion" happens as part of the read process. All file access is through VFS (virtual filesystem) calls. The copy reads data from one file using VFS calls and writes it to another the same way, equally for any file attributes it copies. Copy doesn't really know anything about disk formats like ...


2

fdisk -l shows that your new partition already occupies all 20GB of space, so all you need to do is resize the filesystem itself. There are various ways of doing this depending on the filesystem you're using; if you have fsadm installed, you can use that: fsadm resize /dev/vda1 (this will work for ext2/ext3/ext4 filesystems as well as ReiserFS and XFS). ...


1

The ext4 filesystem has no built-in snapshot feature. The generic way to make snapshots under Linux is at the level of the storage volume. Your filesystem must be on an LVM logical volume, which is Linux's own partition system, as opposed to directly on a platform-native disk partition. To create a snapshot of a logical volume, run lvcreate --snapshot. You ...


1

Right click on the swap partition in GParted, and click swapoff. Then delete your swap partition, remove it from /etc/fstab, and regenerate grub (maybe not necessary?) and your initramfs. The swap partition should not be added to the initramfs by the initramfs update script if the swap partition does not exist. EDIT According to this post, this is the ...


1

This should work: tune2fs -i180d <block device> The default unit is days, so 180 will be interpreted the same as 180d but explicit is better than implicit. For example: tune2fs -i180d /dev/sda3 Make sure you always use tune2fs when the filesystem is unmounted!


1

ctime, or status change time, refers to the time when the file metadata has changed. For example, $ ls -ltc under Linux will sort by and show the time of the last modification of file status information. To get a little deeper, ctime is the inode reported time since data blocks AND/OR the file metadata has changed. Changes in file metadata can refer here to ...


1

Your command is attempting to mount the device, rather than the partition. Instead of mount -t ext2 /dev/xvdb /mnt, try using: mount -t ext4 /dev/xvdb2 /mnt If you would like to automatically mount this partition at boot, you will also need to add the partition to your fstab file. You need to know the UUID of your disk, which you can find with ls -l ...


1

You can do this by setting up a loop through each directory in the source and if there's no directory in the target by that name, it moves it: bourne snippit: for dir in `cd "$sourcedir" ; ls -1F | grep '/'` do if [ ! -d "${targetdir}/${dir}" ] then mv "$dir" "${targetdir}/" fi done Note that this will either break or overwrite a file if you ...


1

I tried my googlefu and it seems really hard to get a straight answer :) and on top of that it also got me curios. I'm gonna post my findings because this might get higher in the google search results. The file contains information on the buddy group cache of that specific disk and it's useful for the fragmentation status of said disk. The fields which I ...


1

No. It consumes memory, but any disk usage is transient use of swap space that would not persist across a reboot.


1

In an aufs union-mount, a branch and the mountpoint cannot be the same. Use this: mount -t aufs -o dirs=/mnt/home/lucyvanpelt=rw:/home/schroeder=ro none /path/to/mountpoint Normally if you want to merge 2 directories, you have to specify what should happen if something is written on it. As you can see, you can specify each branch with rw (readwrite) or ro ...


1

To include the options you want, you should modify your fstab entry as shown below. Be careful, as adding an option that doesn't actually exist will cause your system not to boot. sshfs#wbarlow@remote:/home/wbarlow/dev /home/wbarlow/dev fuse defaults,users,noauto,idmap=user,Ciphers=arcfour,Compression=no,reconnect 0 0 I tested it by Inspecting the ...


1

If it has to be quick, I generate a new temporary directory, mv the directory below it and then recursively delete the temporary: t=`mktemp -d` mv certainFolder $t/ rm -rf $t &


1

I have bad news for you: if I'm reading the code in http://lxr.free-electrons.com/source/fs/efs/ correctly, Linux -- even the very newest version -- does not implement write access to EFS, probably because it was believed that the only use for a filesystem that old was to migrate data off of old disks.


1

Is Filesystem the mount point? You could try the mount -o remount,rw -t efs /dev/sdb1 Filesystem option to remount the filesystem as read-write.


1

Same problem after truncating a SD card image where the SD had a few blocks less than the original. Repartitioned the drive with fdisk (see above), but message "Size in superblock is different from the physical size of the partition" remained. Found the solution here: ...



Only top voted, non community-wiki answers of a minimum length are eligible