Hot answers tagged

11

Directories are special files, hence they have inodes. You can test that with ls: ls -li or using stat: stat -c '%F : %i : %n' * Example: % stat -c '%F : %i : %n' * regular file : 670637 : bar.csv regular file : 656301 : file.txt directory : 729178 : foobar The number in the middle is the inode number.


3

For changing the file system UUID you have to decrypt /dev/sda1 and then run tune2fs on the decrypted device mapper device. sda1 itself does not have a UUID thus it cannot be changed. The LUKS volume within sda1 does have a UUID (which is of limited use because you probably cannot use it for mounting), though. It can be changed with cryptsetup luksUUID ...


2

You still need to resize the filesystem contained in the LV (assuming it's one of the ext filesystems): resize2fs /dev/mapper/vg_condor-lv_root If you want to resize a logical volume and its filesystem in a single operation, use fsadm: fsadm resize /dev/mapper/vg_condor-lv_root This supports the ext filesystems as well as ReiserFS and XFS.


2

The kernel maintains a copy of the partition table in memory. It doesn't actually remember where the partition table is stored, so it doesn't detect that the partition table has changed on the disk. That's why you're still seeing the partition that was there before. You need to tell the kernel to parse the disk again to update its in-memory partition table. ...


2

Yes, it is. Use stat *directory name* in order to obtain inode number


2

Alignment is important on partitions containing data, in order to maximise the chance that block operations will match whatever the underlying block structure is (4K on modern hard drives, more than that on flash-based drives). Extended partitions don't contain data, they're simply containers for logical partitions. The only operation which is done on ...


1

If the decrypted volume is /dev/mapper/crypto then you can get the information with dmsetup table crypto 0 104853504 crypt aes-cbc-essiv:sha256 000[...]000 0 254:2 4096 If the encrypted volume is /dev/storage2/crypto then you get the information with cryptsetup luksDump /dev/storage2/crypto LUKS header information for /dev/storage2/crypto Version: ...


1

fdisk -l or sfdisk -l will do the trick and blkid yourdevice can give you informations about the type, the uid and the filesystem on your device


1

All applications ran by normal user need extra permission to access /dev/* (that is owned by root, and other users need to be added to groups, like You said, to be able to manipulate files there according to group permissions) To answer Your question mkfs is utility for formatting from commandline, for example mkfs.exfat (with arguments) to allow users to ...


1

It's the volume label. That's the -L flag in mkfs.ext4 or, I think, the -n in mkfs.vfat, and so on. You can change it by passing a new label to it with e2label, or by killing it entirely with dd.


1

From the above output (repeated below) the USB device does not contain a partition table. Instead the device is formatted entirely with the fat32 file system starting at 0. This means that no space was left at the start of the device for a partition table. Model: KINGSTON DataTraveler 3.0 (scsi) Disk /dev/sdc: 15,6GB Sector size (logical/physical): ...


1

In this particular scenario, you have 3 primary and 1 extended partition. If you look at the output of fdisk -l and pay attention to /dev/sda2 End and /dev/sda3 Start, you have a bit of space there. My guess is that your only option is to move data from /dev/sda3 (/boot) partition over network or with some external media (USB etc), unmount /boot, delete ...


1

These are logical volumes, so you can resize them using lvresize. However, that is just the resizing of the underlying block device, you still have to resize the filesystem on top of it, and the way to do this will depend on the filesystem type and its initial configuration. Most commonly used Linux filesystems support online resizing, ext2-based use ...


1

Well, hex 804 is actually two bytes, typically written as 0x0804. The first byte is 0x08 (the "major" number), the second is 0x04 (the "minor" number). Converting them to decimal, that's where 8, 4 comes from. You can find out what the 8 means from /proc/devices, which gives block device 8 as sd, which is SCSI disk. It's the first one in there, which is how ...


1

It is a bug in the documentation. When using the command line you cannot leave the "Partition name" portion blank. Also, the "parted: invalid token: mkpart" is because of the Warning: The existing disk label on /dev/xvdf will be destroyed and all data on this disk will be lost. Do you want to continue? Yes/No? Since mkpart is not Yes or No you get the ...


1

With 3.2 million inodes, you can have 3.2 million files and directories, total (but multiple hardlinks to a file only use one inode). Yes, it can be set when creating a filesystem on the partition. The options -T usage-type, -N number-of-inodes, or -i bytes-per-inode can all set the number of inodes. I generally use -i, after comparing the output of du -s ...



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