bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18660: Partprobe and advanced format disks


From: Nuzhna Pomoshch
Subject: bug#18660: Partprobe and advanced format disks
Date: Mon, 6 Oct 2014 22:06:45 -0700

Partprobe is a fantastically useful too. It is absolutely
vital to access new partitions without rebooting, as
well as easily get to partitions on a mapped device.

However, I am having a large problem with it now
on a 4096 byte sector hard drive.

All of the filesystem tools work fine on the raw
device. However, since I want encryption (AND
separate partitions), I did:

# cryptsetup -v luksFormat /dev/sdx

WARNING!
========
This will overwrite data on /dev/sdd irrevocably.

Are you sure? (Type uppercase yes): YES
Enter passphrase: 
Verify passphrase: 
Command successful.

# cryptsetup open /dev/sdx disk
Enter passphrase for /dev/sdx:

# ls -al /dev/mapper/
total 0
drwxr-xr-x  2 root root     120 2014-10-07 03:35:21 ./
drwxr-xr-x 17 root root    5480 2014-10-07 03:35:21 ../
crw-------  1 root root 10, 236 2014-07-28 15:33:13 control
lrwxrwxrwx  1 root root       7 2014-10-07 03:35:21 disk -> ../dm-0

# gdisk /dev/mapper/disk
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.

Command (? for help): n
Partition number (1-128, default 1): 1
First sector (6-732566127, default = 256) or {+-}size{KMGTP}: 
Last sector (256-732566127, default = 732566127) or {+-}size{KMGTP}: +8G
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 
Changed type of partition to 'Linux filesystem'

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/mapper/disk.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.

# gdisk -l /dev/mapper/disk
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/mapper/disk: 732566133 sectors, 2.7 TiB
Logical sector size: 4096 bytes
Disk identifier (GUID): AF876611-E58D-481A-8836-3FF2CBF581D3
Partition table holds up to 128 entries
First usable sector is 6, last usable sector is 732566127
Partitions will be aligned on 256-sector boundaries
Total free space is 730468970 sectors (2.7 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1             256         2097407   8.0 GiB     8300  Linux filesystem


# /usr/sbin/partprobe

# ls -al /dev/mapper/
total 0
drwxr-xr-x  2 root root      140 2014-10-07 04:39:33 ./
drwxr-xr-x 17 root root     5500 2014-10-07 04:39:33 ../
crw-------  1 root root  10, 236 2014-07-28 15:33:13 control
lrwxrwxrwx  1 root root        7 2014-10-07 04:39:33 disk -> ../dm-0
brw-------  1 root root 253,   3 2014-10-07 04:39:33 disk1

# mke2fs -b 4096 -L disk -m 0 -v /dev/mapper/disk1
mke2fs 1.42.10 (18-May-2014)
fs_types for mke2fs.conf resolution: 'ext2'
Filesystem label=disk
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
0 blocks (0.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Filesystem UUID: 678b1ec9-9442-4af2-936b-e353a886b227
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376

Allocating group tables: done                            
Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done

# mount /dev/mapper/disk1 /mnt/disk/

# df
[...]
/dev/mapper/disk1    1032088      1284   1030804   1% /mnt/disk

# dd bs=1048576 if=/dev/zero of=/mnt/disk/file
dd: error writing ‘/mnt/disk/file’: No space left on device
1006+0 records in
1005+0 records out
1054507008 bytes (1.1 GB) copied, 24.6156 s, 42.8 MB/s

# df
[...]
/dev/mapper/disk1  1032088   1032088         0 100% /mnt/disk

I could show the results of more tools, but you get the idea -
there is only 1 GB of the 8 GB partition available. I suspect
(but don't know for certain) that partprobe is not passing
the correct parameters to the device mapper.

Thanks in advance for your help.

Nuzhna





reply via email to

[Prev in Thread] Current Thread [Next in Thread]